summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-03-17 17:04:56 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-03-17 17:04:56 +0000
commit11122eafe7c86fe7ef95ee1cdd805de3fb2ec07a (patch)
treee76f74471326ad0e266adf7833ca23f5672860d7 /llvm/utils
parentf475990d86f8ebbf6edb2ae09e45dc1b2e949000 (diff)
downloadbcm5719-llvm-11122eafe7c86fe7ef95ee1cdd805de3fb2ec07a.tar.gz
bcm5719-llvm-11122eafe7c86fe7ef95ee1cdd805de3fb2ec07a.zip
Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
non-unit tests. llvm-svn: 98741
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/lit/lit/TestRunner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index 20fbc6c13a9..d5bd01f89c6 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/utils/lit/lit/TestRunner.py
@@ -252,6 +252,18 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd):
except:
return (Test.FAIL, "Tcl 'exec' parse error on: %r" % ln)
+ if litConfig.useValgrind:
+ valgrindArgs = ['valgrind', '-q',
+ '--tool=memcheck', '--trace-children=yes',
+ '--error-exitcode=123']
+ valgrindArgs.extend(litConfig.valgrindArgs)
+ for pipeline in cmds:
+ if pipeline.commands:
+ # Only valgrind the first command in each pipeline, to avoid
+ # valgrinding things like grep, not, and FileCheck.
+ cmd = pipeline.commands[0]
+ cmd.args = valgrindArgs + cmd.args
+
cmd = cmds[0]
for c in cmds[1:]:
cmd = ShUtil.Seq(cmd, '&&', c)
OpenPOWER on IntegriCloud