]> granicus.if.org Git - clang/commitdiff
Improve crash reporting test coverage.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 2 Jul 2012 22:07:20 +0000 (22:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 2 Jul 2012 22:07:20 +0000 (22:07 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159605 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/crash-report.c

index 9ec32081404efce525a330dec160a14cd124bc90..75340035dd5a4e024bc444172f45488565c684ed 100644 (file)
@@ -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