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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80981 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/test/TestRunner.py b/utils/test/TestRunner.py
index 3c0c807..2fdede0 100755
--- a/utils/test/TestRunner.py
+++ b/utils/test/TestRunner.py
@@ -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,