Skip to content

Commit 0eef51b

Browse files
Merge pull request swiftlang#71200 from cachemeifyoucan/eng/PR-swift-caching-tests-improvements
Improve swift caching tests
2 parents 7b6f45c + f3c5e6a commit 0eef51b

18 files changed

+347
-268
lines changed

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,9 +1279,6 @@ def always_compile_output_files :
12791279
HelpText<"Always compile output files even it might not change the results">;
12801280

12811281
// CAS/Caching related options.
1282-
def allow_unstable_cache_key_for_testing: Flag<["-"], "allow-unstable-cache-key-for-testing">,
1283-
HelpText<"Allow compilation caching with unstable inputs for testing purpose">;
1284-
12851282
def input_file_key : Separate<["-"], "input-file-key">,
12861283
HelpText<"Cache Key for input file">;
12871284
def bridging_header_pch_key : Separate<["-"], "bridging-header-pch-key">,

lib/Frontend/ArgsToFrontendOptionsConverter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,8 @@ bool ArgsToFrontendOptionsConverter::convert(
275275
if (Opts.EnableCaching && Opts.CASFSRootIDs.empty() &&
276276
Opts.ClangIncludeTrees.empty() &&
277277
FrontendOptions::supportCompilationCaching(Opts.RequestedAction)) {
278-
if (!Args.hasArg(OPT_allow_unstable_cache_key_for_testing)) {
279-
Diags.diagnose(SourceLoc(), diag::error_caching_no_cas_fs);
280-
return true;
281-
}
278+
Diags.diagnose(SourceLoc(), diag::error_caching_no_cas_fs);
279+
return true;
282280
}
283281

284282
if (FrontendOptions::doesActionGenerateIR(Opts.RequestedAction)) {

test/CAS/Inputs/BuildCommandExtractor.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,22 @@
1717
mode = 'swiftPrebuiltExternal'
1818
module_name = module_name[22:]
1919

20+
21+
def printCmd(cmd):
22+
for c in cmd:
23+
print('"{}"'.format(c))
24+
25+
2026
with open(input_json, 'r') as file:
2127
deps = json.load(file)
22-
module_names = deps['modules'][::2]
23-
module_details = deps['modules'][1::2]
24-
for name, detail in zip(module_names, module_details):
25-
if name.get(mode, '') != module_name:
26-
continue
27-
28-
cmd = detail['details'][mode]['commandLine']
29-
for c in cmd:
30-
print('"{}"'.format(c))
31-
break
28+
if module_name == 'bridgingHeader':
29+
cmd = deps['modules'][1]['details']['swift']['bridgingHeader']['commandLine']
30+
printCmd(cmd)
31+
else:
32+
module_names = deps['modules'][::2]
33+
module_details = deps['modules'][1::2]
34+
for name, detail in zip(module_names, module_details):
35+
if name.get(mode, '') != module_name:
36+
continue
37+
38+
printCmd(detail['details'][mode]['commandLine'])

test/CAS/Inputs/ExtractOutputKey.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
#!/usr/bin/env python3
22
#
3-
# Usage: ExtractOutputKey.py file.json OutputPath
3+
# Usage: ExtractOutputKey.py file.json InputPath
44

55
import json
66
import sys
77

88
input_json = sys.argv[1]
9-
output_path = sys.argv[2]
9+
input_path = sys.argv[2]
1010

1111

1212
with open(input_json, 'r') as file:
1313
entries = json.load(file)
1414
for entry in entries:
15-
for output in entry["Outputs"]:
16-
if output['Path'] != output_path:
17-
continue
18-
print(entry['CacheKey'])
15+
if entry['Input'] != input_path:
16+
continue
17+
print(entry['CacheKey'])
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Usage: GenerateExplicitModuleMap.py file.json
4+
5+
import json
6+
import sys
7+
8+
input_json = sys.argv[1]
9+
10+
modules = []
11+
12+
with open(input_json, 'r') as file:
13+
deps = json.load(file)
14+
main_module_name = deps['mainModuleName']
15+
module_names = deps['modules'][::2]
16+
module_details = deps['modules'][1::2]
17+
# add all modules other than the main module into the module map.
18+
for name, detail in zip(module_names, module_details):
19+
kind, name = list(name.items())[0]
20+
if name == main_module_name:
21+
continue
22+
23+
module = {}
24+
module["moduleName"] = name
25+
module["isFramework"] = False
26+
if kind == "clang":
27+
module["clangModulePath"] = name + ".pcm"
28+
module["clangModuleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
29+
else:
30+
module["modulePath"] = name + ".swiftmdoule"
31+
module["moduleCacheKey"] = detail['details'][kind]["moduleCacheKey"]
32+
33+
modules.append(module)
34+
35+
36+
json.dump(modules, sys.stdout, indent=2)

test/CAS/cache_key_compute.swift

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,77 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: mkdir -p %t/cas
2+
// RUN: split-file %s %t
3+
4+
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O \
5+
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
6+
// RUN: %t/a.swift %t/b.swift -o %t/deps.json -cache-compile-job -cas-path %t/cas
7+
8+
// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json
9+
// RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid
10+
11+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd
12+
// RUN: echo "\"-disable-implicit-string-processing-module-import\"" >> %t/MyApp.cmd
13+
// RUN: echo "\"-disable-implicit-concurrency-module-import\"" >> %t/MyApp.cmd
14+
// RUN: echo "\"-parse-stdlib\"" >> %t/MyApp.cmd
315

416
/// Doesn't run because the command doesn't have CAS enabled.
517
// RUN: not %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
6-
// RUN: %target-swift-frontend %s -c -allow-unstable-cache-key-for-testing 2>&1 | \
18+
// RUN: %target-swift-frontend %t/a.swift -c @%t/MyApp.cmd 2>&1 | \
719
// RUN: %FileCheck %s --check-prefix=NO-CAS
820

921
// NO-CAS: Requested command-line arguments do not enable CAS
1022

1123
/// Check few working cases.
1224
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
13-
// RUN: %target-swift-frontend -cache-compile-job %s -c -allow-unstable-cache-key-for-testing > %t1.casid
25+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp.cmd > %t1.casid
1426
/// A different CAS doesn't affect base key.
1527
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
16-
// RUN: %target-swift-frontend -cache-compile-job %s -c -allow-unstable-cache-key-for-testing -cas-path %t > %t2.casid
28+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp.cmd -cas-path %t > %t2.casid
1729
/// Output path doesn't affect base key.
1830
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
19-
// RUN: %target-swift-frontend -cache-compile-job %s -c -allow-unstable-cache-key-for-testing -o %t/test.o > %t3.casid
31+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp.cmd -o %t/test.o > %t3.casid
2032
/// Add -D will change.
2133
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
22-
// RUN: %target-swift-frontend -cache-compile-job %s -c -allow-unstable-cache-key-for-testing -DTEST > %t4.casid
34+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -c @%t/MyApp.cmd -DTEST > %t4.casid
2335

2436
// RUN: diff %t1.casid %t2.casid
2537
// RUN: diff %t1.casid %t3.casid
2638
// RUN: not diff %t1.casid %t4.casid
2739

2840
/// Check filelist option.
29-
// RUN: echo "%s" > %t/filelist-1
30-
// RUN: echo "%s" > %t/filelist-2
31-
// RUN: cp %s %t/temp.swift
32-
// RUN: echo "%t/temp.swift" > %t/filelist-3
41+
// RUN: echo "%t/a.swift" > %t/filelist-1
42+
// RUN: echo "%t/a.swift" > %t/filelist-2
43+
// RUN: echo "%t/b.swift" > %t/filelist-3
3344
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
34-
// RUN: %target-swift-frontend -cache-compile-job -filelist %t/filelist-1 -c -allow-unstable-cache-key-for-testing > %t5.casid
45+
// RUN: %target-swift-frontend -cache-compile-job -filelist %t/filelist-1 -c @%t/MyApp.cmd > %t5.casid
3546
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
36-
// RUN: %target-swift-frontend -cache-compile-job -filelist %t/filelist-2 -c -allow-unstable-cache-key-for-testing > %t6.casid
47+
// RUN: %target-swift-frontend -cache-compile-job -filelist %t/filelist-2 -c @%t/MyApp.cmd > %t6.casid
3748
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-base-key -- \
38-
// RUN: %target-swift-frontend -cache-compile-job -filelist %t/filelist-3 -c -allow-unstable-cache-key-for-testing > %t7.casid
49+
// RUN: %target-swift-frontend -cache-compile-job -filelist %t/filelist-3 -c @%t/MyApp.cmd > %t7.casid
3950
// RUN: diff %t5.casid %t6.casid
4051
// RUN: not diff %t5.casid %t7.casid
4152

4253
/// Test output keys.
4354
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
44-
// RUN: %target-swift-frontend -cache-compile-job %s -emit-module -c -emit-dependencies \
45-
// RUN: -emit-tbd -emit-tbd-path %t/test.tbd -o %t/test.o -allow-unstable-cache-key-for-testing | %FileCheck %s
55+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -emit-module -c -emit-dependencies \
56+
// RUN: -emit-tbd -emit-tbd-path %t/test.tbd -o %t/test.o @%t/MyApp.cmd | %FileCheck %s
4657

4758
/// Test plugin CAS.
59+
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O \
60+
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
61+
// 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 \
62+
// RUN: -cas-plugin-option first-prefix=myfirst-
63+
64+
// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/plugin_deps.json > %t/plugin_map.json
65+
// RUN: llvm-cas --cas %t/cas --make-blob --data %t/plugin_map.json > %t/map.casid
66+
67+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/plugin_deps.json Test > %t/plugin_MyApp.cmd
4868
// RUN: %cache-tool -cas-path %t/cas -cas-plugin-path %llvm_libs_dir/libCASPluginTest%llvm_plugin_ext \
4969
// RUN: -cas-plugin-option first-prefix=myfirst- -cache-tool-action print-output-keys -- \
50-
// RUN: %target-swift-frontend -cache-compile-job %s -emit-module -c -emit-dependencies \
51-
// RUN: -emit-tbd -emit-tbd-path %t/test.tbd -o %t/test.o -allow-unstable-cache-key-for-testing | %FileCheck %s --check-prefix=CHECK --check-prefix=PLUGIN
70+
// RUN: %target-swift-frontend -cache-compile-job %t/a.swift -emit-module -c -emit-dependencies \
71+
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
72+
// 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
5273

53-
// CHECK: "Input": "{{.*}}{{/|\\}}cache_key_compute.swift"
74+
// CHECK: "Input": "{{.*}}{{/|\\}}a.swift"
5475
// CHECK-NEXT: "CacheKey"
5576
// PLUGIN-SAME: myfirst-llvmcas://
5677

@@ -81,3 +102,8 @@
81102
// CHECK-NEXT: }
82103
// CHECK-NEXT: ]
83104

105+
//--- a.swift
106+
func a() {}
107+
108+
//--- b.swift
109+
func b() {}

test/CAS/cache_replay.swift

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,56 @@
11
// RUN: %empty-directory(%t)
22
// RUN: split-file %s %t
33

4+
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O -module-cache-path %t/clang-module-cache \
5+
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
6+
// RUN: %t/test.swift -I %t -o %t/deps.json -cache-compile-job -cas-path %t/cas
7+
8+
/// Check clang module
9+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:Dummy > %t/dummy.cmd
10+
// RUN: %swift_frontend_plain @%t/dummy.cmd -Rcache-compile-job 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
11+
// RUN: %swift_frontend_plain @%t/dummy.cmd -Rcache-compile-job 2>&1 | %FileCheck --check-prefix=CACHE-HIT-CLANG %s
12+
13+
// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json
14+
// RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid
15+
16+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd
17+
// RUN: echo "\"-disable-implicit-string-processing-module-import\"" >> %t/MyApp.cmd
18+
// RUN: echo "\"-disable-implicit-concurrency-module-import\"" >> %t/MyApp.cmd
19+
// RUN: echo "\"-disable-implicit-swift-modules\"" >> %t/MyApp.cmd
20+
// RUN: echo "\"-parse-stdlib\"" >> %t/MyApp.cmd
21+
// RUN: echo "\"-explicit-swift-module-map-file\"" >> %t/MyApp.cmd
22+
// RUN: echo "\"@%t/map.casid\"" >> %t/MyApp.cmd
23+
424
/// Run the command first time, expect cache miss.
5-
/// FIXME: This command doesn't use `-cas-fs` so it is not a good cache entry. It is currently allowed so it is easier to write tests.
6-
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -emit-module -emit-module-path %t/Test.swiftmodule -c -emit-dependencies \
7-
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
25+
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -O -emit-module -emit-module-path %t/Test.swiftmodule -c -emit-dependencies \
26+
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
827

928
/// Expect cache hit for second time.
10-
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -emit-module -emit-module-path %t/Test.swiftmodule -c -emit-dependencies \
11-
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
29+
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -O -emit-module -emit-module-path %t/Test.swiftmodule -c -emit-dependencies \
30+
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
1231

1332
/// Expect cache miss a subset of outputs.
14-
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -emit-module -emit-module-path %t/Test.swiftmodule -c \
15-
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
33+
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -O -emit-module -emit-module-path %t/Test.swiftmodule -c \
34+
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
1635

1736
/// Cache hit for retry.
18-
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -emit-module -emit-module-path %t/Test.swiftmodule -c \
19-
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
37+
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -O -emit-module -emit-module-path %t/Test.swiftmodule -c \
38+
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
2039

2140
/// Skip cache
22-
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job -cache-disable-replay %t/test.swift -emit-module -emit-module-path %t/Test.swiftmodule -c \
23-
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --allow-empty --check-prefix=SKIP-CACHE %s
24-
25-
/// Check clang module
26-
// RUN: %target-swift-frontend -emit-pcm -module-name Dummy %t/module.modulemap -cache-compile-job -Rcache-compile-job -cas-path %t/cas \
27-
// RUN: -allow-unstable-cache-key-for-testing -o %t/dummy.pcm 2>&1 | %FileCheck --allow-empty --check-prefix=CACHE-MISS %s
28-
// RUN: %target-swift-frontend -emit-pcm -module-name Dummy %t/module.modulemap -cache-compile-job -Rcache-compile-job -cas-path %t/cas \
29-
// RUN: -allow-unstable-cache-key-for-testing -o %t/dummy.pcm 2>&1 | %FileCheck --allow-empty --check-prefix=CACHE-HIT-CLANG %s
41+
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job -cache-disable-replay %t/test.swift -O -emit-module -emit-module-path %t/Test.swiftmodule -c \
42+
// RUN: -module-name Test -o %t/test.o -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --allow-empty --check-prefix=SKIP-CACHE %s
3043

3144
// CACHE-MISS: remark: cache miss for input
3245
// CACHE-HIT: remark: replay output file '<cached-diagnostics>': key 'llvmcas://{{.*}}'
3346
// CACHE-HIT: remark: replay output file '{{.*}}{{/|\\}}test.o': key 'llvmcas://{{.*}}'
3447
// CACHE-HIT: remark: replay output file '{{.*}}{{/|\\}}Test.swiftmodule': key 'llvmcas://{{.*}}'
3548
// CACHE-HIT-CLANG: remark: replay output file '<cached-diagnostics>': key 'llvmcas://{{.*}}'
36-
// CACHE-HIT-CLANG: remark: replay output file '{{.*}}{{/|\\}}dummy.pcm': key 'llvmcas://{{.*}}'
49+
// CACHE-HIT-CLANG: remark: replay output file '{{.*}}{{/|\\}}Dummy-{{.*}}.pcm': key 'llvmcas://{{.*}}'
3750
// SKIP-CACHE-NOT: remark:
3851

3952
//--- test.swift
53+
import Dummy
4054
func testFunc() {}
4155

4256
//--- module.modulemap

test/CAS/cache_replay_multiple_files.swift

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
// RUN: %empty-directory(%t)
22
// RUN: split-file %s %t
33

4+
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -O \
5+
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
6+
// RUN: %t/test.swift %t/foo.swift -o %t/deps.json -cache-compile-job -cas-path %t/cas
7+
8+
// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json
9+
// RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid
10+
11+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd
12+
// RUN: echo "\"-disable-implicit-string-processing-module-import\"" >> %t/MyApp.cmd
13+
// RUN: echo "\"-disable-implicit-concurrency-module-import\"" >> %t/MyApp.cmd
14+
// RUN: echo "\"-parse-stdlib\"" >> %t/MyApp.cmd
15+
416
/// Test compile multiple inputs with batch mode.
517
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift %t/foo.swift -emit-module -o %t/Test.swiftmodule \
6-
// RUN: -module-name Test -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
18+
// RUN: -module-name Test -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
719
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job -primary-file %t/test.swift %t/foo.swift -c -o %t/test.o \
8-
// RUN: -module-name Test -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
20+
// RUN: -module-name Test -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
921
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -primary-file %t/foo.swift -c -o %t/foo.o \
10-
// RUN: -module-name Test -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
22+
// RUN: -module-name Test -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-MISS %s
1123

1224
/// Expect cache hit second time
1325
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift %t/foo.swift -emit-module -o %t/Test.swiftmodule \
14-
// RUN: -module-name Test -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
26+
// RUN: -module-name Test -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
1527
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job -primary-file %t/test.swift %t/foo.swift -c -o %t/test.o \
16-
// RUN: -module-name Test -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
28+
// RUN: -module-name Test -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
1729
// RUN: %target-swift-frontend -cache-compile-job -Rcache-compile-job %t/test.swift -primary-file %t/foo.swift -c -o %t/foo.o \
18-
// RUN: -module-name Test -cas-path %t/cas -allow-unstable-cache-key-for-testing 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
30+
// RUN: -module-name Test -cas-path %t/cas @%t/MyApp.cmd 2>&1 | %FileCheck --check-prefix=CACHE-HIT %s
1931

2032
//--- test.swift
2133
func testFunc() {}

0 commit comments

Comments
 (0)