aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-08-11 16:01:40 -0700
committerMichael Bebenita <[email protected]>2010-08-11 16:08:45 -0700
commitc56ecc1d560a51878ffa4648d08110671707ae30 (patch)
treebade159d984b8e8ba9a8cdf38fc33fa027c7ad00 /src
parentIncrement ref counts of objects sent along channels. (diff)
downloadrust-c56ecc1d560a51878ffa4648d08110671707ae30.tar.xz
rust-c56ecc1d560a51878ffa4648d08110671707ae30.zip
Added a -v(algrind) option to run.py.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/run.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/run.py b/src/run.py
index 247a90bc..6a2d3439 100755
--- a/src/run.py
+++ b/src/run.py
@@ -20,6 +20,8 @@ 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("-v", action="store_true", dest="valgrind", default=False,
+ help="runs under valgrind")
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,
@@ -72,7 +74,14 @@ for rustProgram in tests:
os.putenv("RUST_SEED", options.seed);
else:
os.putenv("RUST_SEED", str(i));
- result = os.system(rustProgram.replace(".rs", ".x86"));
+ command = rustProgram.replace(".rs", ".x86");
+ if (options.valgrind):
+ 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):