Skip to content

Commit 6f720c4

Browse files
Merge pull request #82418 from cachemeifyoucan/eng/PR-caching-plugin-cas-path
[TEST-ONLY][Caching] Don't assume pluginCAS can be shared with builtinCAS
2 parents 705b1a6 + 7d10bca commit 6f720c4

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

test/CAS/cache_key_compute.swift

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@
5050
// RUN: diff %t5.casid %t6.casid
5151
// RUN: not diff %t5.casid %t7.casid
5252

53-
/// Check switching CAS plugin path.
54-
// RUN: %cache-tool -cas-path %t/cas -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext -cache-tool-action print-base-key -- \
55-
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp.cmd -cas-path %t/cas -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext > %t8.casid
56-
// RUN: ln -s %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext %t/libCASPluginTest%llvm_plugin_ext
57-
// RUN: %cache-tool -cas-path %t/cas -cas-plugin-path %t/libCASPluginTest%llvm_plugin_ext -cache-tool-action print-base-key -- \
58-
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp.cmd -cas-path %t/cas -cas-plugin-path %t/libCASPluginTest%llvm_plugin_ext > %t9.casid
59-
// RUN: diff %t8.casid %t9.casid
60-
6153
/// Test output keys.
6254
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
6355
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -emit-module -c -emit-dependencies \
@@ -66,19 +58,33 @@
6658
/// Test plugin CAS.
6759
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O \
6860
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
69-
// RUN: %t/a.swift -o %t/plugin_deps.json -cache-compile-job -cas-path %t/cas -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext \
61+
// RUN: %t/a.swift -o %t/plugin_deps.json -cache-compile-job -cas-path %t/cas-plugin -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext \
7062
// RUN: -cas-plugin-option first-prefix=myfirst-
7163

7264
// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/plugin_deps.json > %t/plugin_map.json
7365
// RUN: llvm-cas --cas %t/cas --make-blob --data %t/plugin_map.json > %t/map.casid
7466

7567
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/plugin_deps.json Test > %t/plugin_MyApp.cmd
76-
// RUN: %cache-tool -cas-path %t/cas -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext \
68+
// RUN: %cache-tool -cas-path %t/cas-plugin -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext \
7769
// RUN: -cas-plugin-option first-prefix=myfirst- -cache-tool-action print-output-keys -- \
7870
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -emit-module -c -emit-dependencies \
7971
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
8072
// RUN: -emit-tbd -emit-tbd-path %t/test.tbd -o %t/test.o @%t/plugin_MyApp.cmd | %FileCheck %s --check-prefix=CHECK --check-prefix=PLUGIN
8173

74+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/plugin_deps.json Test > %t/MyApp-plugin.cmd
75+
// RUN: echo "\"-disable-implicit-string-processing-module-import\"" >> %t/MyApp-plugin.cmd
76+
// RUN: echo "\"-disable-implicit-concurrency-module-import\"" >> %t/MyApp-plugin.cmd
77+
// RUN: echo "\"-parse-stdlib\"" >> %t/MyApp-plugin.cmd
78+
79+
/// Check switching CAS plugin path.
80+
// RUN: %cache-tool -cas-path %t/cas-plugin -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext -cas-plugin-option first-prefix=myfirst- -cache-tool-action print-base-key -- \
81+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp-plugin.cmd -cas-path %t/cas-plugin -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext > %t8.casid
82+
// RUN: ln -s %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext %t/libCASPluginTest%llvm_plugin_ext
83+
// RUN: %cache-tool -cas-path %t/cas-plugin -cas-plugin-path %t/libCASPluginTest%llvm_plugin_ext -cas-plugin-option first-prefix=myfirst- -cache-tool-action print-base-key -- \
84+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp-plugin.cmd -cas-path %t/cas-plugin -cas-plugin-path %t/libCASPluginTest%llvm_plugin_ext > %t9.casid
85+
// RUN: diff %t8.casid %t9.casid
86+
87+
8288
// CHECK: "Input": "{{.*}}{{/|\\}}a.swift"
8389
// CHECK-NEXT: "CacheKey"
8490
// PLUGIN-SAME: myfirst-llvmcas://

0 commit comments

Comments
 (0)