[cfe-commits] r77062 - in /cfe/trunk: test/CodeGen/ test/CodeGenObjC/ test/Driver/ test/Frontend/ test/Index/ test/Lexer/ test/Preprocessor/ utils/test/

Daniel Dunbar daniel at zuster.org
Sat Jul 25 04:28:12 PDT 2009


Author: ddunbar
Date: Sat Jul 25 06:27:37 2009
New Revision: 77062

URL: http://llvm.org/viewvc/llvm-project?rev=77062&view=rev
Log:
MultiTestRunner: Validate '&&' at the end of RUN lines.
 - This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)

Modified:
    cfe/trunk/test/CodeGen/2008-07-17-no-emit-on-error.c
    cfe/trunk/test/CodeGen/address-space-field4.c
    cfe/trunk/test/CodeGen/asm.c
    cfe/trunk/test/CodeGen/attributes.c
    cfe/trunk/test/CodeGen/blocks-2.c
    cfe/trunk/test/CodeGen/builtins-ffs_parity_popcount.c
    cfe/trunk/test/CodeGen/builtins-powi.c
    cfe/trunk/test/CodeGen/darwin-string-literals.c
    cfe/trunk/test/CodeGen/ext-vector-shuffle.c
    cfe/trunk/test/CodeGen/stdcall-fastcall.c
    cfe/trunk/test/CodeGen/struct-x86-darwin.c
    cfe/trunk/test/CodeGen/visibility.c
    cfe/trunk/test/CodeGen/x86.c
    cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m
    cfe/trunk/test/CodeGenObjC/messages.m
    cfe/trunk/test/CodeGenObjC/property-setter-attr.m
    cfe/trunk/test/Driver/clang-translation.c
    cfe/trunk/test/Driver/default-toolchain.c
    cfe/trunk/test/Driver/redzone.c
    cfe/trunk/test/Frontend/stdin.c
    cfe/trunk/test/Index/find-refs.c
    cfe/trunk/test/Lexer/dollar-idents.c
    cfe/trunk/test/Preprocessor/macro-multiline.c
    cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c
    cfe/trunk/test/Preprocessor/macro_paste_mscomment.c
    cfe/trunk/utils/test/TestRunner.py

Modified: cfe/trunk/test/CodeGen/2008-07-17-no-emit-on-error.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2008-07-17-no-emit-on-error.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/2008-07-17-no-emit-on-error.c (original)
+++ cfe/trunk/test/CodeGen/2008-07-17-no-emit-on-error.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
-// RUN: rm -f %t1.bc 
-// RUN: not clang-cc %s -emit-llvm-bc -o %t1.bc
+// RUN: rm -f %t1.bc &&
+// RUN: not clang-cc %s -emit-llvm-bc -o %t1.bc &&
 // RUN: not test -f %t1.bc
 
 void f() {

Modified: cfe/trunk/test/CodeGen/address-space-field4.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/address-space-field4.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/address-space-field4.c (original)
+++ cfe/trunk/test/CodeGen/address-space-field4.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
 // RUN: clang-cc -emit-llvm < %s -o %t &&
-// RUN: grep addrspace\(2\) %t | count 4
+// RUN: grep addrspace\(2\) %t | count 4 &&
 // RUN: grep addrspace\(3\) %t | count 4
 
 // Check the load and store are using the correct address space to access

Modified: cfe/trunk/test/CodeGen/asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asm.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/asm.c (original)
+++ cfe/trunk/test/CodeGen/asm.c Sat Jul 25 06:27:37 2009
@@ -33,7 +33,7 @@
   __asm__ volatile("T7 NAMED: %[input]" : "+r"(a): [input] "i" (4));
 }
 
-// RUN: grep "T8 NAMED MODIFIER: \${0:c}" %t
+// RUN: grep "T8 NAMED MODIFIER: \${0:c}" %t &&
 void t8() {
   __asm__ volatile("T8 NAMED MODIFIER: %c[input]" :: [input] "i" (4));
 }

Modified: cfe/trunk/test/CodeGen/attributes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attributes.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/attributes.c (original)
+++ cfe/trunk/test/CodeGen/attributes.c Sat Jul 25 06:27:37 2009
@@ -12,7 +12,7 @@
 // RUN: grep '@t11().*section "SECT"' %t &&
 // RUN: grep '@t12 =.*section "SECT"' %t &&
 // RUN: grep '@t13 =.*section "SECT"' %t &&
-// RUN: grep '@t14.x =.*section "SECT"' %t
+// RUN: grep '@t14.x =.*section "SECT"' %t &&
 // RUN: grep 'declare extern_weak i32 @t15()' %t &&
 // RUN: grep '@t16 = extern_weak global i32' %t &&
 

Modified: cfe/trunk/test/CodeGen/blocks-2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/blocks-2.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/blocks-2.c (original)
+++ cfe/trunk/test/CodeGen/blocks-2.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -g %s -emit-llvm -o %t -fblocks 
+// RUN: clang-cc -g %s -emit-llvm -o %t -fblocks &&
 // RUN: grep "func.start" %t | count 4
 // 1 declaration, 1 bar, 1 test_block_dbg and 1 for the block.
 

Modified: cfe/trunk/test/CodeGen/builtins-ffs_parity_popcount.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-ffs_parity_popcount.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/builtins-ffs_parity_popcount.c (original)
+++ cfe/trunk/test/CodeGen/builtins-ffs_parity_popcount.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
-// RUN: clang-cc -emit-llvm -o - %s > %t
-// RUN: ! grep "__builtin" %t
+// RUN: clang-cc -emit-llvm -o - %s > %t &&
+// RUN: not grep "__builtin" %t
 
 #include <stdio.h>
 

Modified: cfe/trunk/test/CodeGen/builtins-powi.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-powi.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/builtins-powi.c (original)
+++ cfe/trunk/test/CodeGen/builtins-powi.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
-// RUN: clang-cc -emit-llvm -o - %s > %t
-// RUN: ! grep "__builtin" %t
+// RUN: clang-cc -emit-llvm -o - %s > %t &&
+// RUN: not grep "__builtin" %t
 
 #include <stdio.h>
 #include <stdlib.h>

Modified: cfe/trunk/test/CodeGen/darwin-string-literals.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/darwin-string-literals.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/darwin-string-literals.c (original)
+++ cfe/trunk/test/CodeGen/darwin-string-literals.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s
+// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix LSB %s &&
 
 // CHECK-LSB: @.str = private constant [8 x i8] c"string0\00"
 // CHECK-LSB: @.str1 = private constant [8 x i8] c"string1\00", section "__TEXT,__cstring,cstring_literals"

Modified: cfe/trunk/test/CodeGen/ext-vector-shuffle.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ext-vector-shuffle.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/ext-vector-shuffle.c (original)
+++ cfe/trunk/test/CodeGen/ext-vector-shuffle.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
-// RUN: clang-cc %s -emit-llvm -o - | not grep 'extractelement'
-// RUN: clang-cc %s -emit-llvm -o - | not grep 'insertelement'
+// RUN: clang-cc %s -emit-llvm -o - | not grep 'extractelement' &&
+// RUN: clang-cc %s -emit-llvm -o - | not grep 'insertelement' &&
 // RUN: clang-cc %s -emit-llvm -o - | grep 'shufflevector'
 
 typedef __attribute__(( ext_vector_type(2) )) float float2;

Modified: cfe/trunk/test/CodeGen/stdcall-fastcall.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/stdcall-fastcall.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/stdcall-fastcall.c (original)
+++ cfe/trunk/test/CodeGen/stdcall-fastcall.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -emit-llvm < %s | grep 'fastcallcc' | count 4
+// RUN: clang-cc -emit-llvm < %s | grep 'fastcallcc' | count 4 &&
 // RUN: clang-cc -emit-llvm < %s | grep 'stdcallcc' | count 4
 
 void __attribute__((fastcall)) f1(void);

Modified: cfe/trunk/test/CodeGen/struct-x86-darwin.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/struct-x86-darwin.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/struct-x86-darwin.c (original)
+++ cfe/trunk/test/CodeGen/struct-x86-darwin.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc < %s -emit-llvm > %t1 -triple=i686-apple-darwin9
+// RUN: clang-cc < %s -emit-llvm > %t1 -triple=i686-apple-darwin9 &&
 // Run  grep "STest1 = type <{ i32, \[4 x i16\], double }>" %t1 &&
 // RUN: grep "STest2 = type <{ i16, i16, i32, i32 }>" %t1 &&
 // RUN: grep "STest3 = type <{ i8, i8, i16, i32 }>" %t1 &&

Modified: cfe/trunk/test/CodeGen/visibility.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/visibility.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/visibility.c (original)
+++ cfe/trunk/test/CodeGen/visibility.c Sat Jul 25 06:27:37 2009
@@ -15,7 +15,7 @@
 // RUN: grep 'define internal void @f_deferred()' %t &&
 // RUN: grep 'define protected i32 @f_def()' %t &&
 // RUN: clang-cc -triple i386-unknown-unknown -fvisibility=hidden -emit-llvm -o %t %s &&
-// RUN: grep '@g_com = common hidden global i32 0' %t &&a
+// RUN: grep '@g_com = common hidden global i32 0' %t &&
 // RUN: grep '@g_def = hidden global i32 0' %t &&
 // RUN: grep '@g_ext = external global i32' %t &&
 // RUN: grep '@g_deferred = internal global' %t &&

Modified: cfe/trunk/test/CodeGen/x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/x86.c (original)
+++ cfe/trunk/test/CodeGen/x86.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1
+// RUN: clang-cc %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1 &&
 // RUN: grep "ax" %t1 &&
 // RUN: grep "bx" %t1 &&
 // RUN: grep "cx" %t1 &&

Modified: cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m (original)
+++ cfe/trunk/test/CodeGenObjC/debug-info-linkagename.m Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc  -g -S -o %t %s
+// RUN: clang-cc  -g -S -o %t %s &&
 // RUN: not grep 001 %t
 
 @interface F 

Modified: cfe/trunk/test/CodeGenObjC/messages.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/messages.m?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/messages.m (original)
+++ cfe/trunk/test/CodeGenObjC/messages.m Sat Jul 25 06:27:37 2009
@@ -3,7 +3,7 @@
 // RUN: clang-cc -fgnu-runtime --emit-llvm -o %t %s &&
 // RUN: grep "objc_msg_lookup" %t | count 6 &&
 // RUN: clang-cc -fgnu-runtime -fobjc-sender-dependent-dispatch --emit-llvm -o %t %s &&
-// RUN: grep "objc_msg_lookup_sender" %t | count 6
+// RUN: grep "objc_msg_lookup_sender" %t | count 6 &&
 // RUN: true
 
 typedef struct {

Modified: cfe/trunk/test/CodeGenObjC/property-setter-attr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property-setter-attr.m?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/property-setter-attr.m (original)
+++ cfe/trunk/test/CodeGenObjC/property-setter-attr.m Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -emit-llvm -triple=i686-apple-darwin8 -o %t %s
+// RUN: clang-cc -emit-llvm -triple=i686-apple-darwin8 -o %t %s &&
 // RUN: grep -e "SiSetOtherThings:" %t
 
 @interface A 

Modified: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (original)
+++ cfe/trunk/test/Driver/clang-translation.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm 2> %t.log
+// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm 2> %t.log &&
 // RUN: grep '"-triple" "i386-unknown-unknown"' %t.log &&
 // RUN: grep '"-S"' %t.log &&
 // RUN: grep '"-disable-free"' %t.log &&
@@ -9,8 +9,8 @@
 // RUN: grep '"-Os"' %t.log &&
 // RUN: grep '"-o" .*clang-translation.*' %t.log &&
 // RUN: grep '"--asm-verbose"' %t.log &&
-// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log &&
 // RUN: grep '"--mcpu=yonah"' %t.log &&
-// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log
+// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log &&
 // RUN: grep '"--mcpu=core2"' %t.log &&
 // RUN: true

Modified: cfe/trunk/test/Driver/default-toolchain.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/default-toolchain.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Driver/default-toolchain.c (original)
+++ cfe/trunk/test/Driver/default-toolchain.c Sat Jul 25 06:27:37 2009
@@ -1,8 +1,8 @@
-// RUN: clang -ccc-host-triple i386-unknown-unknown -m64 -v 2> %t
+// RUN: clang -ccc-host-triple i386-unknown-unknown -m64 -v 2> %t &&
 // RUN: grep 'Target: x86_64-unknown-unknown' %t &&
 
-// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc -m64 -v 2> %t
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc -m64 -v 2> %t &&
 // RUN: grep 'Target: powerpc64-apple-darwin9' %t &&
 
-// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc64 -m32 -v 2> %t
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc64 -m32 -v 2> %t &&
 // RUN: grep 'Target: powerpc-apple-darwin9' %t

Modified: cfe/trunk/test/Driver/redzone.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/redzone.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Driver/redzone.c (original)
+++ cfe/trunk/test/Driver/redzone.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
 // RUN: clang -mno-red-zone %s -S -emit-llvm -o %t.log &&
-// RUN: grep 'noredzone' %t.log 
+// RUN: grep 'noredzone' %t.log &&
 // RUN: clang -mred-zone %s -S -emit-llvm -o %t.log &&
 // RUN: grep -v 'noredzone' %t.log 
 

Modified: cfe/trunk/test/Frontend/stdin.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/stdin.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Frontend/stdin.c (original)
+++ cfe/trunk/test/Frontend/stdin.c Sat Jul 25 06:27:37 2009
@@ -1,3 +1,3 @@
-// RUN: clang-cc -E - < /dev/null > %t
+// RUN: clang-cc -E - < /dev/null > %t &&
 // RUN: grep '<built-in>' %t
  

Modified: cfe/trunk/test/Index/find-refs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/find-refs.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Index/find-refs.c (original)
+++ cfe/trunk/test/Index/find-refs.c Sat Jul 25 06:27:37 2009
@@ -38,7 +38,7 @@
 
 // RUN: index-test %t1.ast %t2.ast -point-at %S/t1.c:16:7 -print-refs > %t &&
 // RUN: cat %t | count 1 &&
-// RUN: grep 't1.c:22:3,' %t
+// RUN: grep 't1.c:22:3,' %t &&
 
 // RUN: index-test %t1.ast %t2.ast -point-at %S/foo.h:7:11 -print-refs > %t &&
 // RUN: cat %t | count 2 &&

Modified: cfe/trunk/test/Lexer/dollar-idents.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/dollar-idents.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Lexer/dollar-idents.c (original)
+++ cfe/trunk/test/Lexer/dollar-idents.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
 // RUN: clang-cc -dump-tokens %s 2> %t &&
-// RUN: grep "identifier '\$A'" %t
+// RUN: grep "identifier '\$A'" %t &&
 // RUN: clang-cc -dump-tokens -x assembler-with-cpp %s 2> %t &&
 // RUN: grep "identifier 'A'" %t
 // PR3808

Modified: cfe/trunk/test/Preprocessor/macro-multiline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro-multiline.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/macro-multiline.c (original)
+++ cfe/trunk/test/Preprocessor/macro-multiline.c Sat Jul 25 06:27:37 2009
@@ -1,4 +1,4 @@
-// RUN: clang -E %s "-DX=A
+// RUN: clang -E %s "-DX=A &&
 // RUN: THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" > %t &&
 // RUN: grep "GOOD: A" %t &&
 // RUN: not grep THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT %t

Modified: cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c (original)
+++ cfe/trunk/test/Preprocessor/macro_fn_comma_swallow.c Sat Jul 25 06:27:37 2009
@@ -1,7 +1,7 @@
 // Test the GNU comma swallowing extension.
 // RUN: clang-cc %s -E | grep 'foo{A, }' && 
 // RUN: clang-cc %s -E | grep 'fo2{A,}' && 
-// RUN: clang-cc %s -E | grep '{foo}'
+// RUN: clang-cc %s -E | grep '{foo}' &&
 
 #define X(Y) foo{A, Y}
 X()

Modified: cfe/trunk/test/Preprocessor/macro_paste_mscomment.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/macro_paste_mscomment.c?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/test/Preprocessor/macro_paste_mscomment.c (original)
+++ cfe/trunk/test/Preprocessor/macro_paste_mscomment.c Sat Jul 25 06:27:37 2009
@@ -1,5 +1,5 @@
-// RUN: clang-cc -P -E -fms-extensions %s | sed '/^#.\+/d' | tr -d '\n' |
-// RUN:   grep '^int foo;int bar;int baz;$' | count 1
+// RUN: clang-cc -P -E -fms-extensions %s | sed '/^#.\+/d' | tr -d '\n' > %t &&
+// RUN: grep '^int foo;int bar;int baz;$' %t | count 1
 // This horrible stuff should preprocess into (other than whitespace):
 //   int foo;
 //   int bar;

Modified: cfe/trunk/utils/test/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/test/TestRunner.py?rev=77062&r1=77061&r2=77062&view=diff

==============================================================================
--- cfe/trunk/utils/test/TestRunner.py (original)
+++ cfe/trunk/utils/test/TestRunner.py Sat Jul 25 06:27:37 2009
@@ -122,23 +122,46 @@
                      ('%t',TEMPOUTPUT),
                      (' clang ', ' ' + CLANG + ' '),
                      (' clang-cc ', ' ' + CLANGCC + ' ')]
+
+    # Collect the test lines from the script.
     scriptLines = []
     xfailLines = []
     for ln in open(scriptFile):
         if 'RUN:' in ln:
-            # Isolate run parameters
+            # Isolate the command to run.
             index = ln.index('RUN:')
             ln = ln[index+4:]
-
-            # Apply substitutions
-            for a,b in substitutions:
-                ln = ln.replace(a,b)
-
-            if useDGCompat:
-                ln = re.sub(r'\{(.*)\}', r'"\1"', ln)
-            scriptLines.append(ln)
+            
+            # Strip whitespace and append.
+            scriptLines.append(ln.strip())
         elif 'XFAIL' in ln:
             xfailLines.append(ln)
+        
+        # FIXME: Support something like END, in case we need to process large
+        # files.
+
+    # Validate interior lines for '&&', a lovely historical artifact.
+    for i in range(len(scriptLines) - 1):
+        ln = scriptLines[i]
+
+        if not ln.endswith('&&'):
+            print >>output, "MISSING \'&&\': %s" % ln
+            print >>output, "FOLLOWED BY   : %s" % scriptLines[i + 1]
+            return TestStatus.Fail
+    
+        # Strip off '&&'
+        scriptLines[i] = ln[:-2]
+    
+    # Apply substitutions to the script.
+    def processLine(ln):
+        # Apply substitutions
+        for a,b in substitutions:
+            ln = ln.replace(a,b)
+
+        if useDGCompat:
+            ln = re.sub(r'\{(.*)\}', r'"\1"', ln)
+        return ln
+    scriptLines = map(processLine, scriptLines)
     
     if xfailLines:
         print >>output, "XFAILED '%s':"%(TESTNAME,)
@@ -146,7 +169,7 @@
 
     # Write script file
     f = open(SCRIPT,'w')
-    f.write(''.join(scriptLines))
+    f.write(' &&\n'.join(scriptLines))
     f.close()
 
     outputFile = open(OUTPUT,'w')





More information about the cfe-commits mailing list