[cfe-commits] r80981 - in /cfe/trunk/utils/test: MultiTestRunner.py TestRunner.py TestingConfig.py
Daniel Dunbar
daniel at zuster.org
Thu Sep 3 19:53:50 PDT 2009
Author: ddunbar
Date: Thu Sep 3 21:53:50 2009
New Revision: 80981
URL: http://llvm.org/viewvc/llvm-project?rev=80981&view=rev
Log:
Add --vg-arg option to clang test runner.
- Passes additional argument through to valgrind.
Also, don't run valgrind with --leak-check=no by default.
Modified:
cfe/trunk/utils/test/MultiTestRunner.py
cfe/trunk/utils/test/TestRunner.py
cfe/trunk/utils/test/TestingConfig.py
Modified: cfe/trunk/utils/test/MultiTestRunner.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/MultiTestRunner.py?rev=80981&r1=80980&r2=80981&view=diff
==============================================================================
--- cfe/trunk/utils/test/MultiTestRunner.py (original)
+++ cfe/trunk/utils/test/MultiTestRunner.py Thu Sep 3 21:53:50 2009
@@ -257,6 +257,9 @@
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 @@
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.
Modified: cfe/trunk/utils/test/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/TestRunner.py?rev=80981&r1=80980&r2=80981&view=diff
==============================================================================
--- cfe/trunk/utils/test/TestRunner.py (original)
+++ cfe/trunk/utils/test/TestRunner.py Thu Sep 3 21:53:50 2009
@@ -149,9 +149,10 @@
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,
Modified: cfe/trunk/utils/test/TestingConfig.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/TestingConfig.py?rev=80981&r1=80980&r2=80981&view=diff
==============================================================================
--- cfe/trunk/utils/test/TestingConfig.py (original)
+++ cfe/trunk/utils/test/TestingConfig.py Thu Sep 3 21:53:50 2009
@@ -20,6 +20,7 @@
self.root = None
self.useValgrind = None
self.useExternalShell = None
+ self.valgrindArgs = []
# FIXME: These need to move into a substitutions mechanism.
self.clang = None
More information about the cfe-commits
mailing list