[llvm-commits] [llvm] r159524 - in /llvm/trunk/test: Assembler/2003-04-15-ConstantInitAssertion.ll Assembler/2003-05-21-MalformedShiftCrash.ll Assembler/2003-05-21-MalformedStructCrash.ll Assembler/2006-09-28-CrashOnInvalid.ll Assembler/2007-03-18-InvalidNumberedVar.ll Assembler/2007-08-06-AliasInvalid.ll Assembler/getelementptr_struct.ll Bitcode/null-type.ll Verifier/2006-10-15-AddrLabel.ll

Chandler Carruth chandlerc at gmail.com
Mon Jul 2 05:23:19 PDT 2012


Author: chandlerc
Date: Mon Jul  2 07:23:19 2012
New Revision: 159524

URL: http://llvm.org/viewvc/llvm-project?rev=159524&view=rev
Log:
Make tests which first provide a negative assertion via 'not', then
a pipeline, and then a positive assertion via grep, use two RUN lines
instead.

Supporting these complex ideas of 'success' and 'failure' across
multiple stages of a pipeline is brittle in the shell world, and would
block switching to ShTest format; it only worked due to contrivances
introduced by the TclTest format.

Writing this as two separate RUN lines seems clearer in any event.

This is another step toward completely removing TclTests from lit.

Modified:
    llvm/trunk/test/Assembler/2003-04-15-ConstantInitAssertion.ll
    llvm/trunk/test/Assembler/2003-05-21-MalformedShiftCrash.ll
    llvm/trunk/test/Assembler/2003-05-21-MalformedStructCrash.ll
    llvm/trunk/test/Assembler/2006-09-28-CrashOnInvalid.ll
    llvm/trunk/test/Assembler/2007-03-18-InvalidNumberedVar.ll
    llvm/trunk/test/Assembler/2007-08-06-AliasInvalid.ll
    llvm/trunk/test/Assembler/getelementptr_struct.ll
    llvm/trunk/test/Bitcode/null-type.ll
    llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll

Modified: llvm/trunk/test/Assembler/2003-04-15-ConstantInitAssertion.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-04-15-ConstantInitAssertion.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2003-04-15-ConstantInitAssertion.ll (original)
+++ llvm/trunk/test/Assembler/2003-04-15-ConstantInitAssertion.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s >/dev/null |& grep {struct initializer doesn't match struct element type}
+; RUN: not llvm-as < %s >/dev/null 2> %t
+; RUN: grep "struct initializer doesn't match struct element type" %t
 ; Test the case of a misformed constant initializer
 ; This should cause an assembler error, not an assertion failure!
 constant { i32 } { float 1.0 }

Modified: llvm/trunk/test/Assembler/2003-05-21-MalformedShiftCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-05-21-MalformedShiftCrash.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2003-05-21-MalformedShiftCrash.ll (original)
+++ llvm/trunk/test/Assembler/2003-05-21-MalformedShiftCrash.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
 ; Found by inspection of the code
-; RUN: not llvm-as < %s > /dev/null |& grep {constexpr requires integer operands}
+; RUN: not llvm-as < %s > /dev/null 2> %t
+; RUN: grep "constexpr requires integer operands" %t
 
 global i32 ashr (float 1.0, float 2.0)

Modified: llvm/trunk/test/Assembler/2003-05-21-MalformedStructCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-05-21-MalformedStructCrash.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2003-05-21-MalformedStructCrash.ll (original)
+++ llvm/trunk/test/Assembler/2003-05-21-MalformedStructCrash.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
 ; Found by inspection of the code
-; RUN: not llvm-as < %s  > /dev/null |& grep {initializer with struct type has wrong # elements}
+; RUN: not llvm-as < %s  > /dev/null 2> %t
+; RUN: grep "initializer with struct type has wrong # elements" %t
 
 global {} { i32 7, float 1.0, i32 7, i32 8 }

Modified: llvm/trunk/test/Assembler/2006-09-28-CrashOnInvalid.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2006-09-28-CrashOnInvalid.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2006-09-28-CrashOnInvalid.ll (original)
+++ llvm/trunk/test/Assembler/2006-09-28-CrashOnInvalid.ll Mon Jul  2 07:23:19 2012
@@ -1,6 +1,7 @@
 ; Test for PR902.  This program is erroneous, but should not crash llvm-as.
 ; This tests that a simple error is caught and processed correctly.
-; RUN: not llvm-as < %s >/dev/null |& grep {floating point constant invalid for type}
+; RUN: not llvm-as < %s >/dev/null 2> %t
+; RUN: grep "floating point constant invalid for type" %t
 
 define void @test() {
   add i32 1, 2.0

Modified: llvm/trunk/test/Assembler/2007-03-18-InvalidNumberedVar.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-03-18-InvalidNumberedVar.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2007-03-18-InvalidNumberedVar.ll (original)
+++ llvm/trunk/test/Assembler/2007-03-18-InvalidNumberedVar.ll Mon Jul  2 07:23:19 2012
@@ -1,5 +1,6 @@
 ; PR 1258
-; RUN: not llvm-as < %s >/dev/null |& grep {'%0' defined with type 'i1'}
+; RUN: not llvm-as < %s >/dev/null 2> %t
+; RUN: grep "'%0' defined with type 'i1'" %t
 
 define i32 @test1(i32 %a, i32 %b) {
 entry:

Modified: llvm/trunk/test/Assembler/2007-08-06-AliasInvalid.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-08-06-AliasInvalid.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2007-08-06-AliasInvalid.ll (original)
+++ llvm/trunk/test/Assembler/2007-08-06-AliasInvalid.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s > /dev/null |& grep {expected top-level entity}
+; RUN: not llvm-as < %s > /dev/null 2> %t
+; RUN: grep "expected top-level entity" %t
 ; PR1577
 
 @anInt = global i32 1 

Modified: llvm/trunk/test/Assembler/getelementptr_struct.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/getelementptr_struct.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/getelementptr_struct.ll (original)
+++ llvm/trunk/test/Assembler/getelementptr_struct.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s >/dev/null |& FileCheck %s
+; RUN: not llvm-as < %s >/dev/null 2> %t
+; RUN: FileCheck %s < %t
 ; Test the case of a incorrect indices type into struct
 
 ; CHECK: invalid getelementptr indices

Modified: llvm/trunk/test/Bitcode/null-type.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/null-type.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/null-type.ll (original)
+++ llvm/trunk/test/Bitcode/null-type.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
-; RUN: not llvm-dis < %s.bc > /dev/null |& FileCheck %s
+; RUN: not llvm-dis < %s.bc > /dev/null 2> %t
+; RUN: FileCheck %s < %t
 ; PR8494
 
 ; CHECK: Invalid MODULE_CODE_FUNCTION record

Modified: llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll?rev=159524&r1=159523&r2=159524&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll (original)
+++ llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll Mon Jul  2 07:23:19 2012
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s > /dev/null |& grep {basic block pointers are invalid}
+; RUN: not llvm-as < %s > /dev/null 2> %t
+; RUN: grep "basic block pointers are invalid" %t
 
 define i32 @main() {
          %foo  = call i8* %llvm.stacksave()





More information about the llvm-commits mailing list