2014-06-21 06:59:50 +08:00
|
|
|
// RUN: rm -rf %t
|
2015-12-02 11:13:50 +08:00
|
|
|
// RUN: mkdir -p %t/i %t/m %t
|
2014-06-21 06:59:50 +08:00
|
|
|
|
|
|
|
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
|
2015-12-02 11:13:50 +08:00
|
|
|
// RUN: %clang -fsyntax-only %s -I %S/Inputs/module -isysroot %/t/i/ \
|
|
|
|
// RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | FileCheck %s
|
2014-06-21 06:59:50 +08:00
|
|
|
|
2014-06-24 16:01:01 +08:00
|
|
|
// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.m
|
2014-06-21 06:59:50 +08:00
|
|
|
// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-report-*.sh
|
|
|
|
// REQUIRES: crash-recovery
|
|
|
|
|
2015-07-26 13:15:24 +08:00
|
|
|
// because of the glob (*.m, *.sh)
|
|
|
|
// REQUIRES: shell
|
|
|
|
|
|
|
|
// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
|
|
|
|
// XFAIL: mingw32
|
2014-06-21 06:59:50 +08:00
|
|
|
|
|
|
|
@import simple;
|
|
|
|
const int x = MODULE_MACRO;
|
|
|
|
|
|
|
|
// CHECK: Preprocessed source(s) and associated run script(s) are located at:
|
2014-06-24 16:01:01 +08:00
|
|
|
// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
|
2014-06-21 06:59:50 +08:00
|
|
|
// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
|
|
|
|
|
|
|
|
// CHECKSRC: @import simple;
|
|
|
|
// CHECKSRC: const int x = 10;
|
|
|
|
|
2015-03-12 08:14:35 +08:00
|
|
|
// CHECKSH: # Crash reproducer
|
2015-07-09 14:58:31 +08:00
|
|
|
// CHECKSH-NEXT: # Driver args: "-fsyntax-only"
|
|
|
|
// CHECKSH-SAME: "-D" "FOO=BAR"
|
2015-03-12 08:14:35 +08:00
|
|
|
// CHECKSH-NEXT: # Original command: {{.*$}}
|
|
|
|
// CHECKSH-NEXT: "-cc1"
|
2015-12-02 11:13:50 +08:00
|
|
|
// CHECKSH: "-isysroot" "{{[^"]*}}/i/"
|
2014-10-22 02:03:08 +08:00
|
|
|
// CHECKSH: "-D" "FOO=BAR"
|
2015-12-02 11:13:50 +08:00
|
|
|
// CHECKSH-NOT: "-fmodules-cache-path="
|
2014-10-22 02:03:08 +08:00
|
|
|
// CHECKSH: "crash-report-modules-{{[^ ]*}}.m"
|
|
|
|
// CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache/vfs/vfs.yaml"
|