1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's

non-unit tests.

llvm-svn: 98741
This commit is contained in:
Jeffrey Yasskin 2010-03-17 17:04:56 +00:00
parent 45030b2aec
commit 6973958dee

View File

@ -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)