1 // REQUIRES: crash-recovery, system-darwin
5 // RUN: cp %S/../VFS/Inputs/actual_module2.map %t/actual_module2.map
6 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" -e "s@OUT_DIR@%{/t:regex_replacement}/example@g" \
7 // RUN: %S/../VFS/Inputs/vfsoverlay2.yaml > %t/srcvfs.yaml
9 // RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
10 // RUN: ASAN_OPTIONS=detect_leaks=0 \
11 // RUN: not %clang -fsyntax-only -nostdinc %s \
12 // RUN: -I %S/Inputs/crash-recovery/usr/include \
13 // RUN: -ivfsoverlay %t/srcvfs.yaml \
14 // RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
16 // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh
17 // RUN: FileCheck --check-prefix=CHECKYAML %s -input-file \
18 // RUN: %t/crash-vfs-*.cache/vfs/vfs.yaml
19 // RUN: find %t/crash-vfs-*.cache/vfs | \
20 // RUN: grep "%t/actual_module2.map" | count 1
24 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
25 // CHECK-NEXT: note: diagnostic msg: {{.*}}.m
26 // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
28 // CHECKSH: # Crash reproducer
29 // CHECKSH-NEXT: # Driver args: "-fsyntax-only"
30 // CHECKSH-NEXT: # Original command: {{.*$}}
31 // CHECKSH-NEXT: "-cc1"
32 // CHECKSH: "crash-vfs-{{[^ ]*}}.m"
33 // CHECKSH: "-ivfsoverlay" "crash-vfs-{{[^ ]*}}.cache/vfs/vfs.yaml"
34 // CHECKSH: "-fmodules-cache-path=crash-vfs-{{[^ ]*}}.cache/repro-modules"
36 // CHECKYAML: 'case-sensitive':
37 // CHECKYAML-NEXT: 'use-external-names': 'false',
38 // CHECKYAML-NEXT: 'overlay-relative': 'true',
39 // CHECKYAML: 'type': 'directory'
40 // CHECKYAML: 'name': "/[[PATH:.*]]/example"
41 // CHECKYAML: 'contents': [
43 // CHECKYAML-NEXT: 'type': 'file',
44 // CHECKYAML-NEXT: 'name': "module.modulemap",
45 // CHECKYAML-NEXT: 'external-contents': "/[[OTHERPATH:.*]]/actual_module2.map"