blob: 66ebaa750ddca710ae1604dceeea28bfb69be9f4 [file] [log] [blame]
Stephen Hinesc568f1e2014-07-21 00:47:37 -07001// RUN: rm -rf %t
2// RUN: mkdir %t
3
4// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07005// RUN: %clang -fsyntax-only %s -I %S/Inputs/module -isysroot /tmp/ \
Stephen Hinesc568f1e2014-07-21 00:47:37 -07006// RUN: -fmodules -fmodules-cache-path=/tmp/ -DFOO=BAR 2>&1 | FileCheck %s
7
8// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.m
9// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-report-*.sh
10// REQUIRES: crash-recovery
11
12// because of the glob (*.m, *.sh)
13// REQUIRES: shell
14
15// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
16// XFAIL: mingw32
17
18@import simple;
19const int x = MODULE_MACRO;
20
21// CHECK: Preprocessed source(s) and associated run script(s) are located at:
22// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
23// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
24
25// CHECKSRC: @import simple;
26// CHECKSRC: const int x = 10;
27
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070028// CHECKSH: # Crash reproducer
29// CHECKSH-NEXT: # Original command: {{.*$}}
30// CHECKSH-NEXT: "-cc1"
31// CHECKSH: "-isysroot" "/tmp/"
Stephen Hines176edba2014-12-01 14:53:08 -080032// CHECKSH: "-D" "FOO=BAR"
33// CHECKSH-NOT: "-fmodules-cache-path=/tmp/"
34// CHECKSH: "crash-report-modules-{{[^ ]*}}.m"
35// CHECKSH: "-ivfsoverlay" "crash-report-modules-{{[^ ]*}}.cache/vfs/vfs.yaml"