Skip to content

Commit 1e8ce47

Browse files
committed
tests: prepopulate SwiftShims dependencies for CAS
Ensure that we build the dependent modules when pre-populating the CAS as these are required for the modules to function. This allows us to make greater progress towards getting the tests to pass on Windows.
1 parent 3e2943f commit 1e8ce47

16 files changed

+164
-0
lines changed

test/CAS/Xcc_args.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
// RUN: -Xcc -I%t/empty.hmap -module-load-mode prefer-serialized \
99
// RUN: -file-compilation-dir %t
1010

11+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
12+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
13+
14+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
15+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
16+
17+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
18+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
19+
1120
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shims.cmd
1221
// RUN: %swift_frontend_plain @%t/shims.cmd
1322

test/CAS/Xcc_objc_direct.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
// RUN: -file-compilation-dir %t \
88
// RUN: -I %t/include -module-load-mode prefer-serialized
99

10+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
11+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
12+
13+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
14+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
15+
16+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
17+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
18+
1019
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shims.cmd
1120
// RUN: %swift_frontend_plain @%t/shims.cmd
1221

test/CAS/block-list.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,18 @@
77
// RUN: -scanner-prefix-map-paths %t /^tmp -I %t/include \
88
// RUN: %t/main.swift -o %t/deps.json -cache-compile-job -cas-path %t/cas
99

10+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
11+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
12+
13+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
14+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
15+
16+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
17+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
18+
1019
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shim.cmd
1120
// RUN: %swift_frontend_plain @%t/shim.cmd
21+
1222
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json A > %t/A.cmd
1323
// RUN: %swift_frontend_plain @%t/A.cmd
1424

test/CAS/bridging-header-prefix-map.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,20 @@
2525
// RUN: %{python} %S/Inputs/SwiftDepsExtractor.py %t/deps-2.json Test casFSRootID > %t/root-2.casid
2626
// RUN: diff %t/root-1.casid %t/root-2.casid
2727

28+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps-1.json clang:SAL > %t/SAL.cmd %}
29+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
30+
31+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps-1.json clang:vcruntime > %t/vcruntime.cmd %}
32+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
33+
34+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps-1.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
35+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
36+
2837
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps-1.json clang:SwiftShims > %t/shim.cmd
2938
// RUN: %swift_frontend_plain @%t/shim.cmd
39+
3040
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps-1.json bridgingHeader > %t/header.cmd
41+
3142
// RUN: %target-swift-frontend @%t/header.cmd /^header/Bridging.h -disable-implicit-swift-modules -O -o %t/bridging.pch
3243
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
3344
// RUN: %target-swift-frontend @%t/header.cmd /^header/Bridging.h -disable-implicit-swift-modules -O -o %t/bridging.pch > %t/keys.json

test/CAS/cached_diagnostics.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import \
55
// RUN: %s -o %t/deps.json -cache-compile-job -cas-path %t/cas -module-load-mode prefer-serialized -scanner-output-dir %t
66

7+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
8+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
9+
10+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
11+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
12+
13+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
14+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
15+
716
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shim.cmd
817
// RUN: %swift_frontend_plain @%t/shim.cmd
918

1019
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json bridgingHeader > %t/header.cmd
20+
1121
// RUN: %target-swift-frontend @%t/header.cmd %S/Inputs/objc.h -disable-implicit-swift-modules -O -o %t/objc.pch 2>&1 | %FileCheck %s -check-prefix CHECK-BRIDGE
1222
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-output-keys -- \
1323
// RUN: %target-swift-frontend @%t/header.cmd %S/Inputs/objc.h -disable-implicit-swift-modules -O -o %t/objc.pch > %t/keys.json

test/CAS/cached_diagnostics_macro.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
// RUN: %cache-tool -cas-path %t/cas -cache-tool-action print-include-tree-list @%t/fs.casid | %FileCheck %s --check-prefix=FS
1717

1818
// FS: MacroDefinition
19+
20+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
21+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
22+
23+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
24+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
25+
26+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
27+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
28+
1929
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/SwiftShims.cmd
2030
// RUN: %swift_frontend_plain @%t/SwiftShims.cmd
2131

test/CAS/cached_diagnostics_pcm.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import \
66
// RUN: %t/test.swift -o %t/deps.json -cache-compile-job -cas-path %t/cas -module-load-mode prefer-serialized
77

8+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
9+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
10+
11+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
12+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
13+
14+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
15+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
16+
817
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shim.cmd
918
// RUN: %swift_frontend_plain @%t/shim.cmd
1019

test/CAS/coverage-dir.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@
55
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import \
66
// RUN: %t/main.swift -o %t/deps.json -cache-compile-job -cas-path %t/cas -profile-coverage-mapping -profile-generate
77

8+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
9+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
10+
11+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
12+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
13+
14+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
15+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
16+
817
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shim.cmd
918
// RUN: %swift_frontend_plain @%t/shim.cmd
19+
1020
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json A > %t/A.cmd
1121
// RUN: %swift_frontend_plain @%t/A.cmd
1222

test/CAS/cross_import.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@
2121
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -O \
2222
// RUN: -o %t/deps.json -I %t -cache-compile-job -cas-path %t/cas -swift-version 5 -enable-cross-import-overlays -module-load-mode prefer-serialized
2323

24+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
25+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
26+
27+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
28+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
29+
30+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
31+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
32+
2433
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/shim.cmd
2534
// RUN: %swift_frontend_plain @%t/shim.cmd
35+
2636
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:C > %t/C.cmd
2737
// RUN: %swift_frontend_plain @%t/C.cmd
2838

test/CAS/macro_deps.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
// APP-DEPS: MacroTwo
2929

3030
/// Build all dependencies.
31+
32+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd %}
33+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/SAL.cmd %}
34+
35+
// RUN: %if OS=windows-msvc %{ %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd %}
36+
// RUN: %if OS=windows-msvc %{ %swift_frontend_plain @%t/vcruntime.cmd %}
37+
38+
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stdint > %t/_Builtin_stdint.cmd
39+
// RUN: %swift_frontend_plain @%t/_Builtin_stdint.cmd
40+
3141
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/SwiftShims.cmd
3242
// RUN: %swift_frontend_plain @%t/SwiftShims.cmd
3343

0 commit comments

Comments
 (0)