Multiple tests in a single test file must be linked with '&&'.
Otherwise, failing tests other than the last one will not be reported.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52231 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/address-space.c b/test/CodeGen/address-space.c
index 20f4182..1c295a2 100644
--- a/test/CodeGen/address-space.c
+++ b/test/CodeGen/address-space.c
@@ -1,5 +1,5 @@
-// RUN: clang -emit-llvm < %s 2>&1 | grep '@foo.*global.*addrspace(1)'
-// RUN: clang -emit-llvm < %s 2>&1 | grep '@ban.*global.*addrspace(1)'
+// RUN: clang -emit-llvm < %s 2>&1 | grep '@foo.*global.*addrspace(1)' &&
+// RUN: clang -emit-llvm < %s 2>&1 | grep '@ban.*global.*addrspace(1)' &&
// RUN: clang -emit-llvm < %s 2>&1 | grep 'load.*addrspace(1)' | count 2
int foo __attribute__((address_space(1)));
int ban[10] __attribute__((address_space(1)));
diff --git a/test/CodeGen/atomic.c b/test/CodeGen/atomic.c
index a80d466..0d2ea5a 100644
--- a/test/CodeGen/atomic.c
+++ b/test/CodeGen/atomic.c
@@ -1,14 +1,14 @@
-// RUN: clang %s -emit-llvm -o - > %t1
-// RUN: grep @llvm.atomic.las.i32 %t1
-// RUN: grep @llvm.atomic.lss.i32 %t1
-// RUN: grep @llvm.atomic.load.min.i32 %t1
-// RUN: grep @llvm.atomic.load.max.i32 %t1
-// RUN: grep @llvm.atomic.load.umin.i32 %t1
-// RUN: grep @llvm.atomic.load.umax.i32 %t1
-// RUN: grep @llvm.atomic.swap.i32 %t1
-// RUN: grep @llvm.atomic.lcs.i32 %t1
-// RUN: grep @llvm.atomic.load.and.i32 %t1
-// RUN: grep @llvm.atomic.load.or.i32 %t1
+// RUN: clang %s -emit-llvm -o - > %t1 &&
+// RUN: grep @llvm.atomic.las.i32 %t1 &&
+// RUN: grep @llvm.atomic.lss.i32 %t1 &&
+// RUN: grep @llvm.atomic.load.min.i32 %t1 &&
+// RUN: grep @llvm.atomic.load.max.i32 %t1 &&
+// RUN: grep @llvm.atomic.load.umin.i32 %t1 &&
+// RUN: grep @llvm.atomic.load.umax.i32 %t1 &&
+// RUN: grep @llvm.atomic.swap.i32 %t1 &&
+// RUN: grep @llvm.atomic.lcs.i32 %t1 &&
+// RUN: grep @llvm.atomic.load.and.i32 %t1 &&
+// RUN: grep @llvm.atomic.load.or.i32 %t1 &&
// RUN: grep @llvm.atomic.load.xor.i32 %t1
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c
index 95273f8..950a7a7 100644
--- a/test/CodeGen/attributes.c
+++ b/test/CodeGen/attributes.c
@@ -1,27 +1,27 @@
-// RUN: clang -emit-llvm < %s | grep 't1.*noreturn'
+// RUN: clang -emit-llvm < %s | grep 't1.*noreturn' &&
void t1() __attribute__((noreturn));
void t1() {}
-// RUN: clang -emit-llvm < %s | grep 't2.*nounwind'
+// RUN: clang -emit-llvm < %s | grep 't2.*nounwind' &&
void t2() __attribute__((nothrow));
void t2() {}
-// RUN: clang -emit-llvm < %s | grep 'weak.*t3'
+// RUN: clang -emit-llvm < %s | grep 'weak.*t3' &&
void t3() __attribute__((weak));
void t3() {}
-// RUN: clang -emit-llvm < %s | grep 'hidden.*t4'
+// RUN: clang -emit-llvm < %s | grep 'hidden.*t4' &&
void t4() __attribute__((visibility("hidden")));
void t4() {}
-// RUN: clang -emit-llvm < %s | grep 't5.*weak'
+// RUN: clang -emit-llvm < %s | grep 't5.*weak' &&
int t5 __attribute__((weak)) = 2;
-// RUN: clang -emit-llvm < %s | grep 't6.*protected'
+// RUN: clang -emit-llvm < %s | grep 't6.*protected' &&
int t6 __attribute__((visibility("protected")));
-// RUN: clang -emit-llvm < %s | grep 't7.*noreturn'
-// RUN: clang -emit-llvm < %s | grep 't7.*nounwind'
+// RUN: clang -emit-llvm < %s | grep 't7.*noreturn' &&
+// RUN: clang -emit-llvm < %s | grep 't7.*nounwind' &&
void t7() __attribute__((noreturn, nothrow));
void t7() {}
diff --git a/test/CodeGen/builtin-count-zeros.c b/test/CodeGen/builtin-count-zeros.c
index 26b139a..5453cb1 100644
--- a/test/CodeGen/builtin-count-zeros.c
+++ b/test/CodeGen/builtin-count-zeros.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s -o - | grep 'cttz' | count 2
+// RUN: clang -emit-llvm %s -o - | grep 'cttz' | count 2 &&
// RUN: clang -emit-llvm %s -o - | grep 'ctlz' | count 2
int a(int a) {return __builtin_ctz(a) + __builtin_clz(a);}
diff --git a/test/CodeGen/builtin-stackaddress.c b/test/CodeGen/builtin-stackaddress.c
index 950723d..ddfb9dc 100644
--- a/test/CodeGen/builtin-stackaddress.c
+++ b/test/CodeGen/builtin-stackaddress.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm < %s | grep "llvm.returnaddress"
+// RUN: clang -emit-llvm < %s | grep "llvm.returnaddress" &&
// RUN: clang -emit-llvm < %s | grep "llvm.frameaddress"
void* a(unsigned x) {
return __builtin_return_address(0);
diff --git a/test/CodeGen/constant-comparison.c b/test/CodeGen/constant-comparison.c
index bc48ac4..b7b2a0e 100644
--- a/test/CodeGen/constant-comparison.c
+++ b/test/CodeGen/constant-comparison.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s -o - 2>&1 | not grep warning
+// RUN: clang -emit-llvm %s -o - 2>&1 | not grep warning &&
// RUN: clang -emit-llvm %s -o - | grep @b | count 1
int a, b;
diff --git a/test/CodeGen/string-init.c b/test/CodeGen/string-init.c
index 1d1a740..c703c62 100644
--- a/test/CodeGen/string-init.c
+++ b/test/CodeGen/string-init.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s -o - | not grep "[5 x i8]"
+// RUN: clang -emit-llvm %s -o - | not grep "[5 x i8]" &&
// RUN: clang -emit-llvm %s -o - | not grep "store"
void test(void) {
diff --git a/test/CodeGen/struct-x86-darwin.c b/test/CodeGen/struct-x86-darwin.c
index 68e6d72..7a2e7de 100644
--- a/test/CodeGen/struct-x86-darwin.c
+++ b/test/CodeGen/struct-x86-darwin.c
@@ -5,8 +5,8 @@
// RUN: grep "STestB1 = type <{ i8, i8 }>" %t1 &&
// RUN: grep "STestB2 = type <{ i8, i8, i8 }>" %t1 &&
// RUN: grep "STestB3 = type <{ i8, i8 }>" %t1 &&
-// RUN: grep "STestB4 = type <{ i8, i8, i8, i8 }>" %t1
-// RUN: grep "STestB5 = type <{ i8, i8, i8, i8, i8, i8 }>" %t1
+// RUN: grep "STestB4 = type <{ i8, i8, i8, i8 }>" %t1 &&
+// RUN: grep "STestB5 = type <{ i8, i8, i8, i8, i8, i8 }>" %t1 &&
// RUN: grep "STestB6 = type <{ i8, i8, i8, i8 }>" %t1
// Test struct layout for x86-darwin target
diff --git a/test/CodeGen/x86-inline-asm.c b/test/CodeGen/x86-inline-asm.c
index 41fd7a7..7bdea97 100644
--- a/test/CodeGen/x86-inline-asm.c
+++ b/test/CodeGen/x86-inline-asm.c
@@ -1,11 +1,11 @@
// RUN: clang %s -triple=i686-pc-linux-gnu -emit-llvm -o - > %t1
-// RUN: grep "ax" %t1
-// RUN: grep "bx" %t1
-// RUN: grep "cx" %t1
-// RUN: grep "dx" %t1
-// RUN: grep "di" %t1
-// RUN: grep "si" %t1
-// RUN: grep "st" %t1
+// RUN: grep "ax" %t1 &&
+// RUN: grep "bx" %t1 &&
+// RUN: grep "cx" %t1 &&
+// RUN: grep "dx" %t1 &&
+// RUN: grep "di" %t1 &&
+// RUN: grep "si" %t1 &&
+// RUN: grep "st" %t1 &&
// RUN: grep "st(1)" %t1
void f() {