<div class="gmail_quote">On Mon, Apr 30, 2012 at 6:42 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: dgregor<br>
Date: Mon Apr 30 20:42:40 2012<br>
New Revision: 155874<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=155874&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=155874&view=rev</a><br>
Log:<br>
Move a non portable test to FileCheck, from Jonathan Gray!<br></blockquote><div><br></div><div>This patch changes the test dramatically, I don't think it's correct..</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
cfe/trunk/test/Driver/clang-g-opts.c<br>
<br>
Modified: cfe/trunk/test/Driver/clang-g-opts.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-g-opts.c?rev=155874&r1=155873&r2=155874&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-g-opts.c?rev=155874&r1=155873&r2=155874&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/clang-g-opts.c (original)<br>
+++ cfe/trunk/test/Driver/clang-g-opts.c Mon Apr 30 20:42:40 2012<br>
@@ -1,5 +1,14 @@<br>
-// RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g<br>
-// RUN: %clang -S -v -o %t %s -g 2>&1 | grep -w -- -g<br>
-// RUN: %clang -S -v -o %t %s -g0 2>&1 | not grep -w -- -g<br>
-// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | not grep -w -- -g<br>
-// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | grep -w -- -g<br>
+// RUN: %clang -S -v -o %t %s 2>&1 | FileCheck %s<br>
+// CHECK-NOT: -g<br>
+<br>
+// RUN: %clang -S -v -o %t %s -g 2>&1 | FileCheck %s<br>
+// CHECK: -g<br></blockquote><div><br></div><div>How can this work? Every invocation of FlieCheck in this test uses *all* of the CHECK assertions, and applies them to a single clang invocation. I think we need to use the --check-prefix option to separate out the different assertions being made.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+// RUN: %clang -S -v -o %t %s -g0 2>&1 | FileCheck %s<br>
+// CHECK-NOT: -g<br>
+<br>
+// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | FileCheck %s<br>
+// CHECK-NOT: -g<br>
+<br>
+// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | FileCheck %s<br>
+// CHECK: -g<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br>