From cfbb81c58f753db32562260a08b4c3d42eaf3f28 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 12 Jun 2018 11:51:22 +0000 Subject: [PATCH] Re-apply r334418 "Enable crash recovery tests on Windows, globs work in the lit internal shell now" Plus change run lines from not env FOO=bar %clang to env FOO=bar not %clang To not confuse the internal shell. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334494 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Driver/crash-report-header.h | 5 +---- test/Driver/crash-report-modules.m | 12 +++--------- test/Driver/crash-report-spaces.c | 5 +---- test/Driver/crash-report.c | 7 ++----- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/test/Driver/crash-report-header.h b/test/Driver/crash-report-header.h index e0193cbe45..c1b0ab3676 100644 --- a/test/Driver/crash-report-header.h +++ b/test/Driver/crash-report-header.h @@ -1,13 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s 2>&1 | FileCheck %s +// RUN: env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 not %clang -fsyntax-only %s 2>&1 | FileCheck %s // RUN: cat %t/crash-report-header-*.h | FileCheck --check-prefix=CHECKSRC "%s" // RUN: cat %t/crash-report-header-*.sh | FileCheck --check-prefix=CHECKSH "%s" // REQUIRES: crash-recovery -// because of the glob (*.h, *.sh) -// REQUIRES: shell - #pragma clang __debug parser_crash // CHECK: Preprocessed source(s) and associated run script(s) are located at: // CHECK-NEXT: note: diagnostic msg: {{.*}}.h diff --git a/test/Driver/crash-report-modules.m b/test/Driver/crash-report-modules.m index 16af75ca70..f5cf76e2a9 100644 --- a/test/Driver/crash-report-modules.m +++ b/test/Driver/crash-report-modules.m @@ -1,20 +1,14 @@ // RUN: rm -rf %t // RUN: mkdir -p %t/i %t/m %t -// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \ -// RUN: %clang -fsyntax-only %s -I %S/Inputs/module -isysroot %/t/i/ \ +// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \ +// RUN: not %clang -fsyntax-only %s -I %S/Inputs/module -isysroot %/t/i/ \ // RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | FileCheck %s // RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.m // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-report-*.sh // REQUIRES: crash-recovery -// because of the glob (*.m, *.sh) -// REQUIRES: shell - -// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it? -// XFAIL: mingw32 - @import simple; const int x = MODULE_MACRO; @@ -34,4 +28,4 @@ const int x = MODULE_MACRO; // CHECKSH: "-D" "FOO=BAR" // CHECKSH-NOT: "-fmodules-cache-path=" // CHECKSH: "crash-report-modules-{{[^ ]*}}.m" -// CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache/vfs/vfs.yaml" +// CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache{{(/|\\\\)}}vfs{{(/|\\\\)}}vfs.yaml" diff --git a/test/Driver/crash-report-spaces.c b/test/Driver/crash-report-spaces.c index 3e95a0de25..e6da087367 100644 --- a/test/Driver/crash-report-spaces.c +++ b/test/Driver/crash-report-spaces.c @@ -1,14 +1,11 @@ // RUN: rm -rf "%t" // RUN: mkdir "%t" // RUN: cp "%s" "%t/crash report spaces.c" -// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -fsyntax-only "%t/crash report spaces.c" 2>&1 | FileCheck "%s" +// RUN: env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 not %clang -fsyntax-only "%t/crash report spaces.c" 2>&1 | FileCheck "%s" // RUN: cat "%t/crash report spaces"-*.c | FileCheck --check-prefix=CHECKSRC "%s" // RUN: cat "%t/crash report spaces"-*.sh | FileCheck --check-prefix=CHECKSH "%s" // REQUIRES: crash-recovery -// because of the glob (*.c, *.sh) -// REQUIRES: shell - #pragma clang __debug parser_crash // CHECK: Preprocessed source(s) and associated run script(s) are located at: // CHECK-NEXT: note: diagnostic msg: {{.*}}.c diff --git a/test/Driver/crash-report.c b/test/Driver/crash-report.c index a3f1f9e72a..711b04ea4d 100644 --- a/test/Driver/crash-report.c +++ b/test/Driver/crash-report.c @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \ +// RUN: env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \ // RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \ -// RUN: %clang -fsyntax-only %s \ +// RUN: not %clang -fsyntax-only %s \ // RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \ // RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \ // RUN: -Xclang -internal-isystem -Xclang /tmp/ \ @@ -13,9 +13,6 @@ // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s // REQUIRES: crash-recovery -// because of the glob (*.c, *.sh) -// REQUIRES: shell - #pragma clang __debug parser_crash // CHECK: Preprocessed source(s) and associated run script(s) are located at: // CHECK-NEXT: note: diagnostic msg: {{.*}}crash-report-{{.*}}.c -- 2.40.0