2014-06-21 06:59:50 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
|
|
|
|
|
|
|
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
|
2015-03-12 08:52:56 +08:00
|
|
|
// RUN: %clang -fsyntax-only %s -I %S/Inputs/module -isysroot /tmp/ \
|
2014-06-21 06:59:50 +08:00
|
|
|
// RUN: -fmodules -fmodules-cache-path=/tmp/ -DFOO=BAR 2>&1 | FileCheck %s
|
|
|
|
|
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
|
|
|
|
|
2014-06-24 16:01:01 +08:00
|
|
|
// because of the glob (*.m, *.sh)
|
2014-06-21 06:59:50 +08:00
|
|
|
// 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;
|
|
|
|
|
|
|
|
// 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
|
|
|
|
// CHECKSH-NEXT: # Original command: {{.*$}}
|
|
|
|
// CHECKSH-NEXT: "-cc1"
|
2015-03-12 08:52:56 +08:00
|
|
|
// CHECKSH: "-isysroot" "/tmp/"
|
2014-10-22 02:03:08 +08:00
|
|
|
// CHECKSH: "-D" "FOO=BAR"
|
|
|
|
// CHECKSH-NOT: "-fmodules-cache-path=/tmp/"
|
|
|
|
// CHECKSH: "crash-report-modules-{{[^ ]*}}.m"
|
|
|
|
// CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache/vfs/vfs.yaml"
|