[cfe-commits] [PATCH] move a non portable test to FileCheck
Jonathan Gray
jsg at jsg.id.au
Wed Mar 21 03:07:42 PDT 2012
In test/Driver/clang-g-opts.c with tests of the form
// RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g
using 'not' here isn't portable and doesn't work on at least
OpenBSD and likely other systems (bash builtin?).
patch to move this to FileCheck attached
-------------- next part --------------
Index: test/Driver/clang-g-opts.c
===================================================================
--- test/Driver/clang-g-opts.c (revision 153174)
+++ test/Driver/clang-g-opts.c (working copy)
@@ -1,5 +1,14 @@
-// RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g 2>&1 | grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g0 2>&1 | not grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | not grep -w -- -g
-// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | grep -w -- -g
+// RUN: %clang -S -v -o %t %s 2>&1 | FileCheck %s
+// CHECK-NOT: -g
+
+// RUN: %clang -S -v -o %t %s -g 2>&1 | FileCheck %s
+// CHECK: -g
+
+// RUN: %clang -S -v -o %t %s -g0 2>&1 | FileCheck %s
+// CHECK-NOT: -g
+
+// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | FileCheck %s
+// CHECK-NOT: -g
+
+// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | FileCheck %s
+// CHECK: -g
More information about the cfe-commits
mailing list