summaryrefslogtreecommitdiff
path: root/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
commitb5e9770aef7176668cb1a1d97c085c061798cfd3 (patch)
tree446b6d0820248fd65c9b6c9ea29de9f60ef9ad24 /utils
parentb34500fae586a3fb09ba9d169297409b4ab3bbec (diff)
downloadllvm-b5e9770aef7176668cb1a1d97c085c061798cfd3.tar.gz
llvm-b5e9770aef7176668cb1a1d97c085c061798cfd3.tar.bz2
llvm-b5e9770aef7176668cb1a1d97c085c061798cfd3.tar.xz
Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
non-unit tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/lit/lit/TestRunner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index 20fbc6c13a..d5bd01f89c 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/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)