[cfe-commits] r159605 - /cfe/trunk/test/Driver/crash-report.c

David Blaikie dblaikie at gmail.com
Mon Jul 2 15:07:20 PDT 2012


Author: dblaikie
Date: Mon Jul  2 17:07:20 2012
New Revision: 159605

URL: http://llvm.org/viewvc/llvm-project?rev=159605&view=rev
Log:
Improve crash reporting test coverage.

This adds validation that the
* repro source is only rewrite-includes processed, not fully preprocessed.
* repro script contains macro definitions (-DFOO=BAR).

Based on suggestions/help by Matt Beaumont-Gay.

Modified:
    cfe/trunk/test/Driver/crash-report.c

Modified: cfe/trunk/test/Driver/crash-report.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report.c?rev=159605&r1=159604&r2=159605&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report.c (original)
+++ cfe/trunk/test/Driver/crash-report.c Mon Jul  2 17:07:20 2012
@@ -1,7 +1,13 @@
-// RUN: %clang -fsyntax-only %s 2>&1 | FileCheck %s
+// RUN: rm %T/crash-report-*.c %T/crash-report-*.sh
+// RUN: TMP=%T %clang -fsyntax-only %s -DFOO=BAR 2>&1 | FileCheck %s
+// RUN: FileCheck --check-prefix=CHECKSRC %s < %T/crash-report-*.c
+// RUN: FileCheck --check-prefix=CHECKSH %s < %T/crash-report-*.sh
 // REQUIRES: crash-recovery
 // XFAIL: mingw32,win32
 
 #pragma clang __debug parser_crash
 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
-// CHECK-NEXT: {{.*}}: note: diagnostic msg: {{.*}}.c
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.c
+FOO
+// CHECKSRC: FOO
+// CHECKSH: -D FOO=BAR





More information about the cfe-commits mailing list