diff options
| author | Michael Bebenita <mbebenita@mozilla.com> | 2010-08-17 23:10:20 -0700 |
|---|---|---|
| committer | Michael Bebenita <mbebenita@mozilla.com> | 2010-08-17 23:49:57 -0700 |
| commit | 028702a798988a86da3f5700a9a4daea01dbe0b0 (patch) | |
| tree | a2cb1db8d55ebd19c0621b091eeaa4eeae4c8298 /src | |
| parent | 766b91d88b19aa0c2030e6d96c3fd8f4a7255891 (diff) | |
| download | rust-028702a798988a86da3f5700a9a4daea01dbe0b0.tar.gz rust-028702a798988a86da3f5700a9a4daea01dbe0b0.zip | |
Updates to run.py. You can now pass in the rust_log and a flag to terminate on the first failure.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/run.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/run.py b/src/run.py index 6a2d3439d5c..6077166a856 100755 --- a/src/run.py +++ b/src/run.py @@ -20,8 +20,12 @@ parser.add_option("-n", dest="repetitions", help="number of repetitions", metavar="NUMBER") parser.add_option("-q", action="store_true", dest="quiet", default=False, help="suppresses rust log output") +parser.add_option("-l", dest="log", default="", + help="rust log") parser.add_option("-v", action="store_true", dest="valgrind", default=False, help="runs under valgrind") +parser.add_option("-t", action="store_true", dest="terminate", default=False, + help="terminate on first failure") 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, @@ -53,8 +57,11 @@ for rustProgram in tests: print "Make failed!"; sys.exit(1); +if (options.log != ""): + os.putenv("RUST_LOG", options.log); + if (options.quiet): - os.putenv("RUST_LOG", "none") + os.putenv("RUST_LOG", "none"); # Rut totalPassed = 0; @@ -76,16 +83,18 @@ for rustProgram in tests: os.putenv("RUST_SEED", str(i)); command = rustProgram.replace(".rs", ".x86"); if (options.valgrind): - command = "valgrind --leak-check=full " + \ - "--quiet --vex-iropt-level=0 " + \ - "--suppressions=etc/x86.supp " + \ - command; + command = "valgrind --leak-check=full " + \ + "--quiet --vex-iropt-level=0 " + \ + "--suppressions=etc/x86.supp " + \ + command; print "Running Command: " + command; result = os.system(command); exitStatus = result >> 8; signalNumber = result & 0xF; if (result == 0): passed += 1; + elif (options.terminate): + sys.exit(1); print "Result for: " + rustProgram + " " + str(passed) + \ " of " + str(repetitions) + " passed."; totalPassed += passed; |
