summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/lit/TestFormats.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/TestFormats.py b/llvm/utils/lit/lit/TestFormats.py
index d87a467559c..6ab3f9c4626 100644
--- a/llvm/utils/lit/lit/TestFormats.py
+++ b/llvm/utils/lit/lit/TestFormats.py
@@ -72,6 +72,14 @@ class GoogleTest(object):
testName = os.path.join(namePrefix, testName)
cmd = [testPath, '--gtest_filter=' + testName]
+ if litConfig.useValgrind:
+ valgrindArgs = ['valgrind', '-q',
+ '--tool=memcheck', '--trace-children=yes',
+ '--error-exitcode=123']
+ valgrindArgs.extend(litConfig.valgrindArgs)
+
+ cmd = valgrindArgs + cmd
+
out, err, exitCode = TestRunner.executeCommand(
cmd, env=test.config.environment)
OpenPOWER on IntegriCloud