[llvm-commits] [llvm] r99103 - in /llvm/trunk: test/ test/TableGen/ utils/lit/lit/
Jeffrey Yasskin
jyasskin at google.com
Sat Mar 20 16:08:45 PDT 2010
Author: jyasskin
Date: Sat Mar 20 18:08:45 2010
New Revision: 99103
URL: http://llvm.org/viewvc/llvm-project?rev=99103&view=rev
Log:
Add support for XFAILing valgrind runs with memory leak checking independently
of runs without leak checking. We add -vg to the triple for non-checked runs,
or -vg_leak for checked runs. Also use this to XFAIL the TableGen tests, since
tablegen leaks like a sieve. This includes some valgrindArgs refactoring.
Modified:
llvm/trunk/test/TableGen/2003-08-03-PassCode.td
llvm/trunk/test/TableGen/2006-09-18-LargeInt.td
llvm/trunk/test/TableGen/AnonDefinitionOnDemand.td
llvm/trunk/test/TableGen/DagDefSubst.td
llvm/trunk/test/TableGen/DagIntSubst.td
llvm/trunk/test/TableGen/DefmInherit.td
llvm/trunk/test/TableGen/ForwardRef.td
llvm/trunk/test/TableGen/GeneralList.td
llvm/trunk/test/TableGen/IntBitInit.td
llvm/trunk/test/TableGen/LazyChange.td
llvm/trunk/test/TableGen/ListArgs.td
llvm/trunk/test/TableGen/ListArgsSimple.td
llvm/trunk/test/TableGen/ListConversion.td
llvm/trunk/test/TableGen/ListSlices.td
llvm/trunk/test/TableGen/MultiClass.td
llvm/trunk/test/TableGen/MultiClassDefName.td
llvm/trunk/test/TableGen/MultiClassInherit.td
llvm/trunk/test/TableGen/Slice.td
llvm/trunk/test/TableGen/String.td
llvm/trunk/test/TableGen/SuperSubclassSameName.td
llvm/trunk/test/TableGen/TargetInstrInfo.td
llvm/trunk/test/TableGen/TargetInstrSpec.td
llvm/trunk/test/TableGen/TemplateArgRename.td
llvm/trunk/test/TableGen/Tree.td
llvm/trunk/test/TableGen/TreeNames.td
llvm/trunk/test/TableGen/UnsetBitInit.td
llvm/trunk/test/TableGen/cast.td
llvm/trunk/test/TableGen/eq.td
llvm/trunk/test/TableGen/foreach.td
llvm/trunk/test/TableGen/if.td
llvm/trunk/test/TableGen/lisp.td
llvm/trunk/test/TableGen/nameconcat.td
llvm/trunk/test/TableGen/strconcat.td
llvm/trunk/test/TableGen/subst.td
llvm/trunk/test/TableGen/subst2.td
llvm/trunk/test/lit.cfg
llvm/trunk/utils/lit/lit/LitConfig.py
llvm/trunk/utils/lit/lit/TestFormats.py
llvm/trunk/utils/lit/lit/TestRunner.py
llvm/trunk/utils/lit/lit/lit.py
Modified: llvm/trunk/test/TableGen/2003-08-03-PassCode.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/2003-08-03-PassCode.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/2003-08-03-PassCode.td (original)
+++ llvm/trunk/test/TableGen/2003-08-03-PassCode.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
class test<code C> {
code Code = C;
Modified: llvm/trunk/test/TableGen/2006-09-18-LargeInt.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/2006-09-18-LargeInt.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/2006-09-18-LargeInt.td (original)
+++ llvm/trunk/test/TableGen/2006-09-18-LargeInt.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep -- 4294901760
+// XFAIL: vg_leak
def X {
int Y = 0xFFFF0000;
Modified: llvm/trunk/test/TableGen/AnonDefinitionOnDemand.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/AnonDefinitionOnDemand.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/AnonDefinitionOnDemand.td (original)
+++ llvm/trunk/test/TableGen/AnonDefinitionOnDemand.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen < %s
+// XFAIL: vg_leak
class foo<int X> { int THEVAL = X; }
def foo_imp : foo<1>;
Modified: llvm/trunk/test/TableGen/DagDefSubst.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/DagDefSubst.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/DagDefSubst.td (original)
+++ llvm/trunk/test/TableGen/DagDefSubst.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,6 @@
// RUN: tblgen %s | grep {dag d = (X Y)}
// RUN: tblgen %s | grep {dag e = (Y X)}
+// XFAIL: vg_leak
def X;
class yclass;
Modified: llvm/trunk/test/TableGen/DagIntSubst.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/DagIntSubst.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/DagIntSubst.td (original)
+++ llvm/trunk/test/TableGen/DagIntSubst.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {dag d = (X 13)}
+// XFAIL: vg_leak
def X;
class C<int N> {
Modified: llvm/trunk/test/TableGen/DefmInherit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/DefmInherit.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/DefmInherit.td (original)
+++ llvm/trunk/test/TableGen/DefmInherit.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {zing = 4} | count 4
+// XFAIL: vg_leak
class C1<int A, string B> {
int bar = A;
Modified: llvm/trunk/test/TableGen/ForwardRef.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/ForwardRef.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/ForwardRef.td (original)
+++ llvm/trunk/test/TableGen/ForwardRef.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s -o -
+// XFAIL: vg_leak
class bar {
list<bar> x;
Modified: llvm/trunk/test/TableGen/GeneralList.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/GeneralList.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/GeneralList.td (original)
+++ llvm/trunk/test/TableGen/GeneralList.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
//
// Test to make sure that lists work with any data-type
Modified: llvm/trunk/test/TableGen/IntBitInit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/IntBitInit.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/IntBitInit.td (original)
+++ llvm/trunk/test/TableGen/IntBitInit.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
def {
bit A = 1;
int B = A;
Modified: llvm/trunk/test/TableGen/LazyChange.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/LazyChange.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/LazyChange.td (original)
+++ llvm/trunk/test/TableGen/LazyChange.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,5 @@
// RUN: tblgen %s | grep {int Y = 3}
-
+// XFAIL: vg_leak
class C {
int X = 4;
Modified: llvm/trunk/test/TableGen/ListArgs.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/ListArgs.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/ListArgs.td (original)
+++ llvm/trunk/test/TableGen/ListArgs.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
class B<list<int> v> {
list<int> vals = v;
Modified: llvm/trunk/test/TableGen/ListArgsSimple.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/ListArgsSimple.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/ListArgsSimple.td (original)
+++ llvm/trunk/test/TableGen/ListArgsSimple.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
class B<int v> {
int val = v;
Modified: llvm/trunk/test/TableGen/ListConversion.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/ListConversion.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/ListConversion.td (original)
+++ llvm/trunk/test/TableGen/ListConversion.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
class A;
class B : A;
Modified: llvm/trunk/test/TableGen/ListSlices.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/ListSlices.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/ListSlices.td (original)
+++ llvm/trunk/test/TableGen/ListSlices.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
def A {
list<int> B = [10, 20, 30, 4, 1, 1231, 20];
Modified: llvm/trunk/test/TableGen/MultiClass.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiClass.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiClass.td (original)
+++ llvm/trunk/test/TableGen/MultiClass.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {zing = 4} | count 2
+// XFAIL: vg_leak
class C1<int A, string B> {
int bar = A;
Modified: llvm/trunk/test/TableGen/MultiClassDefName.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiClassDefName.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiClassDefName.td (original)
+++ llvm/trunk/test/TableGen/MultiClassDefName.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep WorldHelloCC | count 1
+// XFAIL: vg_leak
class C<string n> {
string name = n;
Modified: llvm/trunk/test/TableGen/MultiClassInherit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiClassInherit.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiClassInherit.td (original)
+++ llvm/trunk/test/TableGen/MultiClassInherit.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {zing = 4} | count 28
+// XFAIL: vg_leak
class C1<int A, string B> {
int bar = A;
Modified: llvm/trunk/test/TableGen/Slice.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/Slice.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/Slice.td (original)
+++ llvm/trunk/test/TableGen/Slice.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,6 @@
// RUN: tblgen %s | grep {\\\[(set} | count 2
// RUN: tblgen %s | grep {\\\[\\\]} | count 2
+// XFAIL: vg_leak
class ValueType<int size, int value> {
int Size = size;
Modified: llvm/trunk/test/TableGen/String.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/String.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/String.td (original)
+++ llvm/trunk/test/TableGen/String.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
class x {
string y = "missing terminating '\"' character";
}
Modified: llvm/trunk/test/TableGen/SuperSubclassSameName.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/SuperSubclassSameName.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/SuperSubclassSameName.td (original)
+++ llvm/trunk/test/TableGen/SuperSubclassSameName.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen < %s
+// XFAIL: vg_leak
// Test for template arguments that have the same name as superclass template
// arguments.
Modified: llvm/trunk/test/TableGen/TargetInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/TargetInstrInfo.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/TargetInstrInfo.td (original)
+++ llvm/trunk/test/TableGen/TargetInstrInfo.td Sat Mar 20 18:08:45 2010
@@ -1,6 +1,7 @@
// This test describes how we eventually want to describe instructions in
// the target independent code generators.
// RUN: tblgen %s
+// XFAIL: vg_leak
// Target indep stuff.
class Instruction { // Would have other stuff eventually
Modified: llvm/trunk/test/TableGen/TargetInstrSpec.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/TargetInstrSpec.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/TargetInstrSpec.td (original)
+++ llvm/trunk/test/TableGen/TargetInstrSpec.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,6 @@
// RUN: tblgen %s | grep {\\\[(set VR128:\$dst, (int_x86_sse2_add_pd VR128:\$src1, VR128:\$src2))\\\]} | count 1
// RUN: tblgen %s | grep {\\\[(set VR128:\$dst, (int_x86_sse2_add_ps VR128:\$src1, VR128:\$src2))\\\]} | count 1
+// XFAIL: vg_leak
class ValueType<int size, int value> {
int Size = size;
Modified: llvm/trunk/test/TableGen/TemplateArgRename.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/TemplateArgRename.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/TemplateArgRename.td (original)
+++ llvm/trunk/test/TableGen/TemplateArgRename.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
// Make sure there is no collision between XX and XX.
def S;
Modified: llvm/trunk/test/TableGen/Tree.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/Tree.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/Tree.td (original)
+++ llvm/trunk/test/TableGen/Tree.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,6 @@
// This tests to make sure we can parse tree patterns.
// RUN: tblgen %s
+// XFAIL: vg_leak
class TreeNode;
class RegisterClass;
Modified: llvm/trunk/test/TableGen/TreeNames.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/TreeNames.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/TreeNames.td (original)
+++ llvm/trunk/test/TableGen/TreeNames.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,6 @@
// This tests to make sure we can parse tree patterns with names.
// RUN: tblgen %s
+// XFAIL: vg_leak
class TreeNode;
class RegisterClass;
Modified: llvm/trunk/test/TableGen/UnsetBitInit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/UnsetBitInit.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/UnsetBitInit.td (original)
+++ llvm/trunk/test/TableGen/UnsetBitInit.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s
+// XFAIL: vg_leak
class x {
field bits<32> A;
}
Modified: llvm/trunk/test/TableGen/cast.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/cast.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/cast.td (original)
+++ llvm/trunk/test/TableGen/cast.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {add_ps} | count 3
+// XFAIL: vg_leak
class ValueType<int size, int value> {
int Size = size;
Modified: llvm/trunk/test/TableGen/eq.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/eq.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/eq.td (original)
+++ llvm/trunk/test/TableGen/eq.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | FileCheck %s
+// XFAIL: vg_leak
// CHECK: Value = 0
// CHECK: Value = 1
Modified: llvm/trunk/test/TableGen/foreach.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/foreach.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/foreach.td (original)
+++ llvm/trunk/test/TableGen/foreach.td Sat Mar 20 18:08:45 2010
@@ -1,6 +1,7 @@
// RUN: tblgen %s | grep {Jr} | count 2
// RUN: tblgen %s | grep {Sr} | count 2
// RUN: tblgen %s | grep {NAME} | count 1
+// XFAIL: vg_leak
// Variables for foreach
class decls {
Modified: llvm/trunk/test/TableGen/if.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/if.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/if.td (original)
+++ llvm/trunk/test/TableGen/if.td Sat Mar 20 18:08:45 2010
@@ -1,5 +1,6 @@
// RUN: tblgen %s | grep {\\\[1, 2, 3\\\]} | count 4
// RUN: tblgen %s | grep {\\\[4, 5, 6\\\]} | count 2
+// XFAIL: vg_leak
class A<list<list<int>> vals> {
list<int> first = vals[0];
Modified: llvm/trunk/test/TableGen/lisp.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/lisp.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/lisp.td (original)
+++ llvm/trunk/test/TableGen/lisp.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {}
+// XFAIL: vg_leak
class List<list<string> n> {
list<string> names = n;
Modified: llvm/trunk/test/TableGen/nameconcat.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/nameconcat.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/nameconcat.td (original)
+++ llvm/trunk/test/TableGen/nameconcat.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep {add_ps} | count 3
+// XFAIL: vg_leak
class ValueType<int size, int value> {
int Size = size;
Modified: llvm/trunk/test/TableGen/strconcat.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/strconcat.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/strconcat.td (original)
+++ llvm/trunk/test/TableGen/strconcat.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | grep fufoo
+// XFAIL: vg_leak
class Y<string S> {
string T = !strconcat(S, "foo");
Modified: llvm/trunk/test/TableGen/subst.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/subst.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/subst.td (original)
+++ llvm/trunk/test/TableGen/subst.td Sat Mar 20 18:08:45 2010
@@ -4,6 +4,7 @@
// RUN: tblgen %s | grep {LAST} | count 1
// RUN: tblgen %s | grep {TVAR} | count 2
// RUN: tblgen %s | grep {Bogus} | count 1
+// XFAIL: vg_leak
class Honorific<string t> {
string honorific = t;
Modified: llvm/trunk/test/TableGen/subst2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/subst2.td?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/subst2.td (original)
+++ llvm/trunk/test/TableGen/subst2.td Sat Mar 20 18:08:45 2010
@@ -1,4 +1,5 @@
// RUN: tblgen %s | FileCheck %s
+// XFAIL: vg_leak
// CHECK: No subst
// CHECK: No foo
// CHECK: RECURSE foo
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Sat Mar 20 18:08:45 2010
@@ -128,10 +128,9 @@
# Provide target_triple for use in XFAIL and XTARGET.
config.target_triple = site_exp['target_triplet']
-# When running under valgrind, we mangle '-vg' onto the end of the triple so we
-# can check it with XFAIL and XTARGET.
-if lit.useValgrind:
- config.target_triple += '-vg'
+# When running under valgrind, we mangle '-vg' or '-vg_leak' onto the end of the
+# triple so we can check it with XFAIL and XTARGET.
+config.target_triple += lit.valgrindTriple
# Provide llvm_supports_target for use in local configs.
targets = set(site_exp["TARGETS_TO_BUILD"].split())
Modified: llvm/trunk/utils/lit/lit/LitConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/LitConfig.py?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/LitConfig.py (original)
+++ llvm/trunk/utils/lit/lit/LitConfig.py Sat Mar 20 18:08:45 2010
@@ -15,7 +15,7 @@
import Util as util
def __init__(self, progname, path, quiet,
- useValgrind, valgrindArgs,
+ useValgrind, valgrindLeakCheck, valgrindArgs,
useTclAsSh,
noExecute, debug, isWindows,
params):
@@ -25,7 +25,8 @@
self.path = list(map(str, path))
self.quiet = bool(quiet)
self.useValgrind = bool(useValgrind)
- self.valgrindArgs = list(valgrindArgs)
+ self.valgrindLeakCheck = bool(valgrindLeakCheck)
+ self.valgrindUserArgs = list(valgrindArgs)
self.useTclAsSh = bool(useTclAsSh)
self.noExecute = noExecute
self.debug = debug
@@ -36,6 +37,19 @@
self.numErrors = 0
self.numWarnings = 0
+ self.valgrindArgs = []
+ self.valgrindTriple = ""
+ if self.useValgrind:
+ self.valgrindTriple = "-vg"
+ self.valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no',
+ '--tool=memcheck', '--trace-children=yes',
+ '--error-exitcode=123']
+ if self.valgrindLeakCheck:
+ self.valgrindTriple += "_leak"
+ self.valgrindArgs.append('--leak-check=full')
+ self.valgrindArgs.extend(self.valgrindUserArgs)
+
+
def load_config(self, config, path):
"""load_config(config, path) - Load a config object from an alternate
path."""
Modified: llvm/trunk/utils/lit/lit/TestFormats.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestFormats.py?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestFormats.py (original)
+++ llvm/trunk/utils/lit/lit/TestFormats.py Sat Mar 20 18:08:45 2010
@@ -73,12 +73,7 @@
cmd = [testPath, '--gtest_filter=' + testName]
if litConfig.useValgrind:
- valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no',
- '--tool=memcheck', '--trace-children=yes',
- '--error-exitcode=123']
- valgrindArgs.extend(litConfig.valgrindArgs)
-
- cmd = valgrindArgs + cmd
+ cmd = litConfig.valgrindArgs + cmd
out, err, exitCode = TestRunner.executeCommand(
cmd, env=test.config.environment)
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Sat Mar 20 18:08:45 2010
@@ -253,16 +253,12 @@
return (Test.FAIL, "Tcl 'exec' parse error on: %r" % ln)
if litConfig.useValgrind:
- valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no',
- '--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.args = litConfig.valgrindArgs + cmd.args
cmd = cmds[0]
for c in cmds[1:]:
@@ -339,12 +335,7 @@
if litConfig.useValgrind:
# FIXME: Running valgrind on sh is overkill. We probably could just
# run on clang with no real loss.
- valgrindArgs = ['valgrind', '-q', '--run-libc-freeres=no',
- '--tool=memcheck', '--trace-children=yes',
- '--error-exitcode=123']
- valgrindArgs.extend(litConfig.valgrindArgs)
-
- command = valgrindArgs + command
+ command = litConfig.valgrindArgs + command
return executeCommand(command, cwd=cwd, env=test.config.environment)
Modified: llvm/trunk/utils/lit/lit/lit.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/lit.py?rev=99103&r1=99102&r2=99103&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/lit.py (original)
+++ llvm/trunk/utils/lit/lit/lit.py Sat Mar 20 18:08:45 2010
@@ -362,6 +362,9 @@
group.add_option("", "--vg", dest="useValgrind",
help="Run tests under valgrind",
action="store_true", default=False)
+ group.add_option("", "--vg-leak", dest="valgrindLeakCheck",
+ help="Check for memory leaks under valgrind",
+ action="store_true", default=False)
group.add_option("", "--vg-arg", dest="valgrindArgs", metavar="ARG",
help="Specify an extra argument for valgrind",
type=str, action="append", default=[])
@@ -436,6 +439,7 @@
path = opts.path,
quiet = opts.quiet,
useValgrind = opts.useValgrind,
+ valgrindLeakCheck = opts.valgrindLeakCheck,
valgrindArgs = opts.valgrindArgs,
useTclAsSh = opts.useTclAsSh,
noExecute = opts.noExecute,
More information about the llvm-commits
mailing list