Skip to content

Commit 6b91728

Browse files
authored
Merge pull request #6164 from akyrtzi/pr/stable2/non-default-cas-path-for-tests
[test/CAS] Make sure tests use non-default CAS path
2 parents e911554 + 8d9206a commit 6b91728

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

clang/test/CAS/daemon-cwd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
// RUN: -fdepscan-prefix-map=%t=/^build \
1212
// RUN: -fdepscan-prefix-map-toolchain=/^toolchain \
1313
// RUN: -fdepscan-daemon=%{clang-daemon-dir}/%basename_t \
14+
// RUN: -Xclang -fcas-path -Xclang %t/cas -Xclang -faction-cache-path -Xclang %t/cache \
1415
// RUN: -MD -MF %t/test.d -Iinclude \
1516
// RUN: -fsyntax-only -x c %s >> %t/cmd.sh
1617
// RUN: chmod +x %t/cmd.sh
1718

18-
// RUN: %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t -cas-args -fcas-path %t/cas -faction-cache-path %t/cache -- \
19-
// RUN: %t/cmd.sh
19+
// RUN: %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t \
20+
// RUN: -cas-args -fcas-path %t/cas -faction-cache-path %t/cache -- %t/cmd.sh
2021
// RUN: (cd %t && %clang -target x86_64-apple-macos11 -MD -MF %t/test2.d \
2122
// RUN: -Iinclude -fsyntax-only -x c %s)
2223
// RUN: diff %t/test.d %t/test2.d

clang/test/CAS/depscan-prefix-map.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// RUN: -resource-dir %S/Inputs/toolchain_dir/usr/lib/clang/1000 \
1616
// RUN: -internal-isystem %S/Inputs/toolchain_dir/usr/lib/clang/1000/include \
1717
// RUN: -working-directory %t.d \
18-
// RUN: -fcas-path %t.d/cas \
18+
// RUN: -fcas-path %t.d/cas -faction-cache-path %t.d/cache \
1919
// RUN: | FileCheck %s -DPREFIX=%t.d
2020
// RUN: %clang -cc1depscan -dump-depscan-tree=%t.root -fdepscan=inline \
2121
// RUN: -fdepscan-prefix-map=%S=/^source \
@@ -28,9 +28,10 @@
2828
// RUN: -resource-dir %S/Inputs/toolchain_dir/lib/clang/1000 \
2929
// RUN: -internal-isystem %S/Inputs/toolchain_dir/lib/clang/1000/include \
3030
// RUN: -working-directory %t.d \
31-
// RUN: -fcas-path %t.d/cas \
31+
// RUN: -fcas-path %t.d/cas -faction-cache-path %t.d/cache \
3232
// RUN: | FileCheck %s -DPREFIX=%t.d
33-
// RUN: %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t -cas-args -fcas-path %t.d/cas -- \
33+
// RUN: %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t \
34+
// RUN: -cas-args -fcas-path %t.d/cas -faction-cache-path %t.d/cache -- \
3435
// RUN: %clang -cc1depscan -dump-depscan-tree=%t.root -fdepscan=daemon \
3536
// RUN: -fdepscan-daemon=%{clang-daemon-dir}/%basename_t \
3637
// RUN: -fdepscan-prefix-map=%S=/^source \
@@ -43,7 +44,7 @@
4344
// RUN: -resource-dir %S/Inputs/toolchain_dir/usr/lib/clang/1000 \
4445
// RUN: -internal-isystem %S/Inputs/toolchain_dir/usr/lib/clang/1000/include \
4546
// RUN: -working-directory %t.d \
46-
// RUN: -fcas-path %t.d/cas \
47+
// RUN: -fcas-path %t.d/cas -faction-cache-path %t.d/cache \
4748
// RUN: | FileCheck %s -DPREFIX=%t.d
4849
//
4950
// CHECK: "-fcas-path" "[[PREFIX]]/cas"
@@ -63,27 +64,33 @@
6364
// CHECK-ROOT-NEXT: file {{.*}} /^source/depscan-prefix-map.c{{$}}
6465
// CHECK-ROOT-NEXT: file {{.*}} /^toolchain/usr/lib/clang/1000/include/stdarg.h{{$}}
6566

66-
// RUN: not %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t -cas-args -fcas-path %t.d/cas -- \
67+
// RUN: not %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t \
68+
// RUN: -cas-args -fcas-path %t.d/cas -faction-cache-path %t.d/cache -- \
6769
// RUN: %clang -cc1depscan -dump-depscan-tree=%t.root -fdepscan=daemon \
6870
// RUN: -fdepscan-daemon=%{clang-daemon-dir}/%basename_t \
6971
// RUN: -fdepscan-prefix-map=/=/^foo \
7072
// RUN: -cc1-args -triple x86_64-apple-macos11.0 -x c %s -o %t.d/out.o \
73+
// RUN: -fcas-path %t.d/cas -faction-cache-path %t.d/cache \
7174
// RUN: 2>&1 | FileCheck %s -DPREFIX=%t.d -check-prefix=ERROR_ROOT
7275
// ERROR_ROOT: invalid prefix map: '/=/^foo'
7376

74-
// RUN: not %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t -cas-args -fcas-path %t.d/cas -- \
77+
// RUN: not %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t \
78+
// RUN: -cas-args -fcas-path %t.d/cas -faction-cache-path %t.d/cache -- \
7579
// RUN: %clang -cc1depscan -dump-depscan-tree=%t.root -fdepscan=daemon \
7680
// RUN: -fdepscan-daemon=%{clang-daemon-dir}/%basename_t \
7781
// RUN: -fdepscan-prefix-map==/^foo \
7882
// RUN: -cc1-args -triple x86_64-apple-macos11.0 -x c %s -o %t.d/out.o \
83+
// RUN: -fcas-path %t.d/cas -faction-cache-path %t.d/cache \
7984
// RUN: 2>&1 | FileCheck %s -DPREFIX=%t.d -check-prefix=ERROR_EMPTY
8085
// ERROR_EMPTY: invalid prefix map: '=/^foo'
8186

82-
// RUN: not %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t -cas-args -fcas-path %t.d/cas -- \
87+
// RUN: not %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t \
88+
// RUN: -cas-args -fcas-path %t.d/cas -faction-cache-path %t.d/cache -- \
8389
// RUN: %clang -cc1depscan -dump-depscan-tree=%t.root -fdepscan=daemon \
8490
// RUN: -fdepscan-daemon=%{clang-daemon-dir}/%basename_t \
8591
// RUN: -fdepscan-prefix-map=relative=/^foo \
8692
// RUN: -cc1-args -triple x86_64-apple-macos11.0 -x c %s -o %t.d/out.o \
93+
// RUN: -fcas-path %t.d/cas -faction-cache-path %t.d/cache \
8794
// RUN: 2>&1 | FileCheck %s -DPREFIX=%t.d -check-prefix=ERROR_RELATIVE
8895
// ERROR_RELATIVE: invalid prefix map: 'relative=/^foo'
8996

clang/test/CAS/fdepscan-daemon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// RUN: rm -rf %t
66
// RUN: %clang -cc1depscand -execute %{clang-daemon-dir}/%basename_t -cas-args -fcas-path %t/cas -faction-cache-path %t/cache -- \
77
// RUN: %clang -target x86_64-apple-macos11 -I %S/Inputs \
8+
// RUN: -Xclang -fcas-path -Xclang %t/cas -Xclang -faction-cache-path -Xclang %t/cache \
89
// RUN: -fdepscan=daemon -fdepscan-daemon=%{clang-daemon-dir}/%basename_t -fsyntax-only -x c %s
910

1011
#include "test.h"

0 commit comments

Comments
 (0)