aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-11 14:28:01 -0700
committerGraydon Hoare <[email protected]>2010-08-11 14:28:01 -0700
commit9faaf9eaf499d6184df18e9fb09235de46b659b5 (patch)
treeb9994bf15d55226ec8de541a643a7c84227e2830 /src
parentChange dwarf output on linux to switch from relative to absolute addresses ba... (diff)
downloadrust-9faaf9eaf499d6184df18e9fb09235de46b659b5.tar.xz
rust-9faaf9eaf499d6184df18e9fb09235de46b659b5.zip
Tidy up run script.
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/run.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/run.py b/src/run.py
index 4cce4102..247a90bc 100644..100755
--- a/src/run.py
+++ b/src/run.py
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+
import os
import sys
import time
@@ -14,16 +16,16 @@ rustTestRunBenchDir = rustTestDir + "/run-bench";
parser = OptionParser()
parser.set_usage("run.py [options] pattern : run.py -n 100 \"bas*\" -q");
-parser.add_option("-n", dest="repetitions",
+parser.add_option("-n", dest="repetitions",
help="number of repetitions", metavar="NUMBER")
-parser.add_option("-q", action="store_true", dest="quiet", default=False,
+parser.add_option("-q", action="store_true", dest="quiet", default=False,
help="suppresses rust log output")
-parser.add_option("-p", action="store_true", dest="printSource",
+parser.add_option("-p", action="store_true", dest="printSource",
default=False, help="prints the test case's source")
parser.add_option("-s", dest="seed", metavar="NUMBER", default=-1,
help="seeds the rust scheduler, use -1 to generate seeds, "
+ " or >= 0 to specify a seed")
-
+
(options, args) = parser.parse_args()
def getRustTests(filter):
@@ -41,7 +43,7 @@ if len(args) != 1:
tests = getRustTests(args[0]);
-# Make
+# Make
for rustProgram in tests:
print "Making: " + rustProgram;
result = os.system("make " + rustProgram.replace(".rs", ".x86")) >> 8;
@@ -54,6 +56,7 @@ if (options.quiet):
# Rut
totalPassed = 0;
+repetitions = 1;
for rustProgram in tests:
repetitions = 1;
if (options.repetitions):
@@ -78,4 +81,4 @@ for rustProgram in tests:
" of " + str(repetitions) + " passed.";
totalPassed += passed;
print "Total: " + str(totalPassed) + " of " + \
- str(len(tests) * repetitions) + " passed." \ No newline at end of file
+ str(len(tests) * repetitions) + " passed."