[llvm-commits] [llvm] r98741 - /llvm/trunk/utils/lit/lit/TestRunner.py

Jeffrey Yasskin jyasskin at google.com
Wed Mar 17 10:04:56 PDT 2010


Author: jyasskin
Date: Wed Mar 17 12:04:56 2010
New Revision: 98741

URL: http://llvm.org/viewvc/llvm-project?rev=98741&view=rev
Log:
Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
non-unit tests.

Modified:
    llvm/trunk/utils/lit/lit/TestRunner.py

Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=98741&r1=98740&r2=98741&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Wed Mar 17 12:04:56 2010
@@ -252,6 +252,18 @@
         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)





More information about the llvm-commits mailing list