File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 6
6
// RUN: mkdir -p %t
7
7
// RUN: split-file %s %t
8
8
//
9
- // RUN: %clang -print-resource-dir > %t/resource-dir.txt && \
9
+ // RUN: EXPECTED_RESOURCE_DIR=` %clang -print-resource-dir` && \
10
10
// RUN: ln -s %clang++ %t/clang++ && \
11
- // RUN: sed "s|EXPECTED_RESOURCE_DIR|%{readfile:%t/resource-dir.txt} |g; s|DIR|%/t|g" %t/P1689.json.in > %t/P1689.json && \
12
- // RUN: env EXPECTED_RESOURCE_DIR=%{readfile:%t/resource-dir.txt} clang-scan-deps -compilation-database %t/P1689.json -format=p1689 | FileCheck %t/a.cpp -DPREFIX=%/t && \
13
- // RUN: env EXPECTED_RESOURCE_DIR=%{readfile:%t/resource-dir.txt} clang-scan-deps -format=p1689 \
11
+ // RUN: sed "s|EXPECTED_RESOURCE_DIR|$EXPECTED_RESOURCE_DIR |g; s|DIR|%/t|g" %t/P1689.json.in > %t/P1689.json && \
12
+ // RUN: clang-scan-deps -compilation-database %t/P1689.json -format=p1689 | FileCheck %t/a.cpp -DPREFIX=%/t && \
13
+ // RUN: clang-scan-deps -format=p1689 \
14
14
// RUN: -- %t/clang++ -std=c++20 -c -fprebuilt-module-path=%t %t/a.cpp -o %t/a.o \
15
- // RUN: -resource-dir %{env: EXPECTED_RESOURCE_DIR} | FileCheck %t/a.cpp -DPREFIX=%/t
15
+ // RUN: -resource-dir $ EXPECTED_RESOURCE_DIR | FileCheck %t/a.cpp -DPREFIX=%/t
16
16
17
17
// --- P1689.json.in
18
18
[
Original file line number Diff line number Diff line change 18
18
// GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|\\\\}}foo/bar.gcno"
19
19
20
20
/// GCC allows PWD to change the paths.
21
- // RUN: %if system-linux %{ env PWD=/proc/self/cwd %clang -### -c --coverage %s -o foo/bar.o 2>&1 | FileCheck --check-prefix=PWD %s %}
21
+ // RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### -c --coverage %s -o foo/bar.o 2>&1 | FileCheck --check-prefix=PWD %s %}
22
22
// PWD: "-coverage-notes-file=/proc/self/cwd/foo/bar.gcno" "-coverage-data-file=/proc/self/cwd/foo/bar.gcda"
23
23
24
24
/// Don't warn -Wunused-command-line-argument.
50
50
// LINK2: -cc1{{.*}} "-coverage-notes-file={{.*}}{{/|\\\\}}f/gb.gcno" "-coverage-data-file={{.*}}{{/|\\\\}}f/gb.gcda"
51
51
52
52
/// GCC allows PWD to change the paths.
53
- // RUN: %if system-linux %{ env PWD=/proc/self/cwd %clang -### --coverage d/a.c d/b.c -o e/x -fprofile-dir=f 2>&1 | FileCheck %s --check-prefix=LINK3 %}
53
+ // RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### --coverage d/a.c d/b.c -o e/x -fprofile-dir=f 2>&1 | FileCheck %s --check-prefix=LINK3 %}
54
54
// LINK3: -cc1{{.*}} "-coverage-notes-file=/proc/self/cwd/e/x-a.gcno" "-coverage-data-file=f/proc/self/cwd/e/x-a.gcda"
55
55
// LINK3: -cc1{{.*}} "-coverage-notes-file=/proc/self/cwd/e/x-b.gcno" "-coverage-data-file=f/proc/self/cwd/e/x-b.gcda"
Original file line number Diff line number Diff line change 87
87
88
88
/// <default-triple>-gcc has lowest priority so <triple>-gcc
89
89
/// on PATH beats default triple in program path
90
- // RUN: %t/clang --version | grep "Target:" | cut -d ' ' -f2 > %t/default-triple.txt
91
- // RUN: env DEFAULT_TRIPLE=%{readfile:%t/default-triple.txt} touch %t/%{env: DEFAULT_TRIPLE} -gcc && chmod +x %t/%{env: DEFAULT_TRIPLE} -gcc
90
+ // RUN: DEFAULT_TRIPLE=` %t/clang --version | grep "Target:" | cut -d ' ' -f2`
91
+ // RUN: touch %t/$ DEFAULT_TRIPLE-gcc && chmod +x %t/$ DEFAULT_TRIPLE-gcc
92
92
// RUN: touch %t/%target_triple-gcc && chmod +x %t/%target_triple-gcc
93
93
// RUN: env "PATH=%t/env/" %t/clang -### -target notreal-none-elf %s 2>&1 | \
94
94
// RUN: FileCheck --check-prefix=DEFAULT_TRIPLE_GCC %s
You can’t perform that action at this time.
0 commit comments