diff options
-rwxr-xr-x | utils/test/MultiTestRunner.py | 4 | ||||
-rwxr-xr-x | utils/test/TestRunner.py | 7 | ||||
-rw-r--r-- | utils/test/TestingConfig.py | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/utils/test/MultiTestRunner.py b/utils/test/MultiTestRunner.py index c94f114e3c..6e15f1cd8f 100755 --- a/utils/test/MultiTestRunner.py +++ b/utils/test/MultiTestRunner.py @@ -257,6 +257,9 @@ def main(): group.add_option("", "--vg", dest="useValgrind", help="Run tests under valgrind", action="store_true", default=False) + group.add_option("", "--vg-arg", dest="valgrindArgs", + help="Specify an extra argument for valgrind", + type=str, action="append", default=[]) group.add_option("", "--time-tests", dest="timeTests", help="Track elapsed wall time for each test", action="store_true", default=False) @@ -320,6 +323,7 @@ def main(): cfg.clang = opts.clang cfg.clangcc = opts.clangcc cfg.useValgrind = opts.useValgrind + cfg.valgrindArgs = opts.valgrindArgs cfg.useExternalShell = opts.useExternalShell # FIXME: It could be worth loading these in parallel with testing. diff --git a/utils/test/TestRunner.py b/utils/test/TestRunner.py index 3c0c8072c2..2fdede0c0d 100755 --- a/utils/test/TestRunner.py +++ b/utils/test/TestRunner.py @@ -149,9 +149,10 @@ def executeScript(cfg, script, commands, cwd): if cfg.useValgrind: # FIXME: Running valgrind on sh is overkill. We probably could just # run on clang with no real loss. - command = ['valgrind', '-q', - '--tool=memcheck', '--leak-check=no', '--trace-children=yes', - '--error-exitcode=123'] + command + valgrindArgs = ['valgrind', '-q', + '--tool=memcheck', '--trace-children=yes', + '--error-exitcode=123'] + cfg.valgrindArgs + command = valgrindArgs + command p = subprocess.Popen(command, cwd=cwd, stdin=subprocess.PIPE, diff --git a/utils/test/TestingConfig.py b/utils/test/TestingConfig.py index a43bd76560..b611d78e14 100644 --- a/utils/test/TestingConfig.py +++ b/utils/test/TestingConfig.py @@ -20,6 +20,7 @@ class TestingConfig: self.root = None self.useValgrind = None self.useExternalShell = None + self.valgrindArgs = [] # FIXME: These need to move into a substitutions mechanism. self.clang = None |