path: root/piglit-run.py
diff options
authorKenneth Graunke <kenneth@whitecape.org>2012-03-02 17:07:57 -0800
committerKenneth Graunke <kenneth@whitecape.org>2012-03-12 16:30:08 -0700
commitfefa962e6e373c67570988db264c0664cf71110d (patch)
tree66f7dc219f8e9efbf0aa482c7968c155cbe47fc2 /piglit-run.py
parent55107415f69101523f105da8db63d65a8bc3c3eb (diff)
Make valgrind testing a command line option rather than extra tests.
Valgrind testing is useful, but really should be done as a separate exercise from the usual regression testing, as it takes way too long. Rather than including it by default in all.tests and making people exclude it with the -x valgrind option (or by using quick.tests), it makes sense to explicitly request valgrind testing with --valgrind. To perform valgrind testing: $ piglit-run.py --valgrind <options> tests/quick.tests results/vg-1 The ExecTest class now handles Valgrind wrapping natively, rather than relying on the tests/valgrind-test/valgrind-test shell script wrapper. This provides a huge benefit: we can leverage the interpretResult() function to make it work properly for any subclass of ExecTest. The old shell script only worked for PlainExecTest (piglit) and GleanTest. Another small benefit is that you can now use --valgrind with any test profile (such as quick.tests). Also, you can use all.tests without having to remember to specify "-x valgrind". Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'piglit-run.py')
1 files changed, 4 insertions, 0 deletions
diff --git a/piglit-run.py b/piglit-run.py
index 296d4632..e24cf2af 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -52,6 +52,7 @@ Options:
-n name, --name=name Name of the testrun
-c bool, --concurrent=bool Enable/disable concurrent test runs. Valid
option values are: 0, 1, on, off. (default: on)
+ --valgrind Run tests in valgrind's memcheck.
%(progName)s tests/all.tests results/all
Run all tests, store the results in the directory results/all
@@ -78,6 +79,7 @@ def main():
+ "valgrind",
@@ -99,6 +101,8 @@ def main():
env.execute = False
elif name in ('-r', '--resume'):
OptionResume = True
+ elif name in ('--valgrind'):
+ env.valgrind = True
elif name in ('-t', '--tests'):