r220265 - Driver: Tighten up crash report tests

Justin Bogner mail at justinbogner.com
Mon Oct 20 22:13:09 PDT 2014


Author: bogner
Date: Tue Oct 21 00:13:09 2014
New Revision: 220265

URL: http://llvm.org/viewvc/llvm-project?rev=220265&view=rev
Log:
Driver: Tighten up crash report tests

These tests were a little bit too flexible in terms of filenames.

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

Added: cfe/trunk/test/Driver/crash-report-null.test
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report-null.test?rev=220265&view=auto
==============================================================================
--- cfe/trunk/test/Driver/crash-report-null.test (added)
+++ cfe/trunk/test/Driver/crash-report-null.test Tue Oct 21 00:13:09 2014
@@ -0,0 +1,7 @@
+// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
+
+// FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
+// XFAIL: mingw32
+
+// CHECK: Preprocessed source(s) and associated run script(s) are located at:
+// CHECK-NEXT: note: diagnostic msg: {{.*}}null-{{.*}}.c

Modified: cfe/trunk/test/Driver/crash-report.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report.c?rev=220265&r1=220264&r2=220265&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report.c (original)
+++ cfe/trunk/test/Driver/crash-report.c Tue Oct 21 00:13:09 2014
@@ -13,17 +13,13 @@
 // because of the glob (*.c, *.sh)
 // REQUIRES: shell
 
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
-
-// FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
-// XFAIL: mingw32
-
 #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: {{.*}}crash-report-{{.*}}.c
 FOO
 // CHECKSRC: FOO
 // CHECKSH: -cc1
+// CHECKSH: -main-file-name crash-report.c
 // CHECKSH: -D "FOO=BAR"
 // CHECKSH-NOT: -F/tmp/
 // CHECKSH-NOT: -I /tmp/





More information about the cfe-commits mailing list