[llvm] r179036 - Rewrite test/Verifier tests to use FileCheck instead of grep

Eli Bendersky eliben at google.com
Mon Apr 8 11:33:51 PDT 2013


Author: eliben
Date: Mon Apr  8 13:33:51 2013
New Revision: 179036

URL: http://llvm.org/viewvc/llvm-project?rev=179036&view=rev
Log:
Rewrite test/Verifier tests to use FileCheck instead of grep

Modified:
    llvm/trunk/test/Verifier/2002-04-13-RetTypes.ll
    llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll
    llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll
    llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll
    llvm/trunk/test/Verifier/2006-12-12-IntrinsicDefine.ll
    llvm/trunk/test/Verifier/2008-03-01-AllocaSized.ll
    llvm/trunk/test/Verifier/2008-08-22-MemCpyAlignment.ll
    llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll
    llvm/trunk/test/Verifier/2010-08-07-PointerIntrinsic.ll
    llvm/trunk/test/Verifier/AmbiguousPhi.ll
    llvm/trunk/test/Verifier/PhiGrouping.ll
    llvm/trunk/test/Verifier/SelfReferential.ll
    llvm/trunk/test/Verifier/aliasing-chain.ll

Modified: llvm/trunk/test/Verifier/2002-04-13-RetTypes.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2002-04-13-RetTypes.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2002-04-13-RetTypes.ll (original)
+++ llvm/trunk/test/Verifier/2002-04-13-RetTypes.ll Mon Apr  8 13:33:51 2013
@@ -1,7 +1,8 @@
-; RUN: not llvm-as < %s 2>&1 | grep "value doesn't match function result type 'i32'"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
 
 ; Verify the operand type of the ret instructions in a function match the
-; delcared return type of the function they live in.
+; declared return type of the function they live in.
+; CHECK: value doesn't match function result type 'i32'
 ;
 
 define i32 @testfunc() {

Modified: llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll (original)
+++ llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "invalid getelementptr indices"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: invalid getelementptr indices
 
 ; This testcase is invalid because we are indexing into a pointer that is 
 ; contained WITHIN a structure.

Modified: llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll (original)
+++ llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,6 @@
-; RUN: llvm-as < %s 2>&1 | not grep "Instruction operands must be first-class"
+; RUN: llvm-as < %s 2>&1 | FileCheck %s 
+
+; CHECK-NOT: Instruction operands must be first-class
 
 ; This previously was for PR826, but structs are now first-class so
 ; the following is now valid.

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=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll (original)
+++ llvm/trunk/test/Verifier/2006-10-15-AddrLabel.ll Mon Apr  8 13:33:51 2013
@@ -1,5 +1,6 @@
 ; RUN: not llvm-as < %s > /dev/null 2> %t
-; RUN: grep "basic block pointers are invalid" %t
+; RUN: FileCheck %s --input-file=%t
+; CHECK: basic block pointers are invalid
 
 define i32 @main() {
          %foo  = call i8* %llvm.stacksave()

Modified: llvm/trunk/test/Verifier/2006-12-12-IntrinsicDefine.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2006-12-12-IntrinsicDefine.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2006-12-12-IntrinsicDefine.ll (original)
+++ llvm/trunk/test/Verifier/2006-12-12-IntrinsicDefine.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "llvm intrinsics cannot be defined"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: llvm intrinsics cannot be defined
 ; PR1047
 
 define void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) {

Modified: llvm/trunk/test/Verifier/2008-03-01-AllocaSized.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2008-03-01-AllocaSized.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2008-03-01-AllocaSized.ll (original)
+++ llvm/trunk/test/Verifier/2008-03-01-AllocaSized.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,5 @@
-; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Cannot allocate unsized type"
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: Cannot allocate unsized type
 ; PR2113
 
 define void @test() {

Modified: llvm/trunk/test/Verifier/2008-08-22-MemCpyAlignment.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2008-08-22-MemCpyAlignment.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2008-08-22-MemCpyAlignment.ll (original)
+++ llvm/trunk/test/Verifier/2008-08-22-MemCpyAlignment.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,5 @@
-; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "alignment argument of memory intrinsics must be a constant int"
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: alignment argument of memory intrinsics must be a constant int
 ; PR2318
 
 define void @x(i8* %a, i8* %src, i64 %len, i32 %align) nounwind  {

Modified: llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll (original)
+++ llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "value doesn't match function result type 'void'"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: value doesn't match function result type 'void'
 
 define void @foo() {
   ret i32 0

Modified: llvm/trunk/test/Verifier/2010-08-07-PointerIntrinsic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2010-08-07-PointerIntrinsic.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/2010-08-07-PointerIntrinsic.ll (original)
+++ llvm/trunk/test/Verifier/2010-08-07-PointerIntrinsic.ll Mon Apr  8 13:33:51 2013
@@ -1,5 +1,6 @@
 ; RUN: not llvm-as < %s 2> %t
-; RUN: grep "Broken module" %t
+; RUN: FileCheck %s --input-file=%t
+; CHECK: Broken module
 ; PR7316
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32"

Modified: llvm/trunk/test/Verifier/AmbiguousPhi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/AmbiguousPhi.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/AmbiguousPhi.ll (original)
+++ llvm/trunk/test/Verifier/AmbiguousPhi.ll Mon Apr  8 13:33:51 2013
@@ -1,6 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "multiple entries for the same basic block"
-
-
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: multiple entries for the same basic block
 
 define i32 @test(i32 %i, i32 %j, i1 %c) {
 	br i1 %c, label %A, label %A

Modified: llvm/trunk/test/Verifier/PhiGrouping.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/PhiGrouping.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/PhiGrouping.ll (original)
+++ llvm/trunk/test/Verifier/PhiGrouping.ll Mon Apr  8 13:33:51 2013
@@ -1,6 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "PHI nodes not grouped at top"
-
-
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: PHI nodes not grouped at top
 
 define i32 @test(i32 %i, i32 %j, i1 %c) {
 	br i1 %c, label %A, label %B

Modified: llvm/trunk/test/Verifier/SelfReferential.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/SelfReferential.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/SelfReferential.ll (original)
+++ llvm/trunk/test/Verifier/SelfReferential.ll Mon Apr  8 13:33:51 2013
@@ -1,4 +1,5 @@
-; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Only PHI nodes may reference their own value"
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: Only PHI nodes may reference their own value
 
 ; Test that self referential instructions are not allowed
 

Modified: llvm/trunk/test/Verifier/aliasing-chain.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/aliasing-chain.ll?rev=179036&r1=179035&r2=179036&view=diff
==============================================================================
--- llvm/trunk/test/Verifier/aliasing-chain.ll (original)
+++ llvm/trunk/test/Verifier/aliasing-chain.ll Mon Apr  8 13:33:51 2013
@@ -1,5 +1,5 @@
-; RUN:  not llvm-as %s -o /dev/null 2>&1 | grep "Aliasing chain should end with function or global variable"
-
+; RUN:  not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: Aliasing chain should end with function or global variable
 ; Test that alising chain does not create a cycle
 
 @b1 = alias i32* @c1





More information about the llvm-commits mailing list