|
| 1 | +// XFAIL: * |
| 2 | + |
1 | 3 | // RUN: %empty-directory(%t)
|
2 | 4 |
|
3 | 5 | // 1) Build a prebuilt cache for our SDK
|
|
32 | 34 |
|
33 | 35 | // 2) Baseline check: Make sure we use the interface when not passing the prebuilt module cache path
|
34 | 36 | //
|
35 |
| -// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s |
| 37 | +// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s |
36 | 38 | //
|
37 | 39 | // Check SdkLib and ExportedLib are in the module cache
|
38 | 40 | // RUN: test -f %t/MCP/ExportedLib-*.swiftmodule
|
|
58 | 60 | // DEPFILE-DAG: ExportedLib.swiftinterface
|
59 | 61 | // DEPFILE-DAG: SDKDependencies.swift
|
60 | 62 | //
|
| 63 | +// Check we didn't emit anything from the cache in the trace file either |
| 64 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE |
| 65 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE |
| 66 | +// |
| 67 | +// TRACEFILE-NEGATIVE-NOT: {{[/\\]MCP[/\\]}} |
| 68 | +// TRACEFILE-NEGATIVE-NOT: {{[/\\]prebuilt-cache[/\\]}} |
| 69 | +// |
| 70 | +// TRACEFILE-DAG: SdkLib.swiftinterface |
| 71 | +// TRACEFILE-DAG: ExportedLib.swiftinterface |
| 72 | +// |
61 | 73 | // RUN: %empty-directory(%t/MCP)
|
62 | 74 | // RUN: echo '2: PASSED'
|
63 | 75 |
|
64 | 76 |
|
65 | 77 | // 3) Baseline check: Make sure we use the the prebuilt module cache when using the SDK it was built with
|
66 | 78 | //
|
67 |
| -// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s |
| 79 | +// RUN: %target-swift-frontend -typecheck -I %t/my-sdk -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s |
68 | 80 | //
|
69 | 81 | // Check SdkLib and ExportedLib are in the module cache
|
70 | 82 | // RUN: test -f %t/MCP/SdkLib-*.swiftmodule
|
|
99 | 111 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE
|
100 | 112 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
101 | 113 | //
|
| 114 | +// Check we didn't emit anything from the cache in the trace file either |
| 115 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE |
| 116 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE |
| 117 | +// |
102 | 118 | // RUN: %empty-directory(%t/MCP)
|
103 | 119 | // RUN: echo '3: PASSED'
|
104 | 120 |
|
|
108 | 124 | // RUN: mv %t/my-sdk %t/my-new-sdk
|
109 | 125 | // RUN: mkdir %t/new-dir
|
110 | 126 | // RUN: mv %t/prebuilt-cache %t/new-dir/
|
111 |
| -// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s |
| 127 | +// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s |
112 | 128 | //
|
113 | 129 | // Check SdkLib and ExportedLib are in the module cache
|
114 | 130 | // RUN: test -f %t/MCP/SdkLib-*.swiftmodule
|
|
136 | 152 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE
|
137 | 153 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
138 | 154 | //
|
| 155 | +// Check we didn't emit anything from the cache in the trace file either |
| 156 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE |
| 157 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE |
| 158 | +// |
139 | 159 | // RUN: %empty-directory(%t/MCP)
|
140 | 160 | // RUN: echo '4: PASSED'
|
141 | 161 |
|
142 | 162 |
|
143 | 163 | // 5) Now change the SDK's content and check it no longer uses the prebuilt modules
|
144 | 164 | //
|
145 | 165 | // RUN: echo "// size change" >> %t/my-new-sdk/SdkLib.swiftinterface
|
146 |
| -// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies %s |
| 166 | +// RUN: %target-swift-frontend -typecheck -I %t/my-new-sdk -sdk %t/my-new-sdk -prebuilt-module-cache-path %t/new-dir/prebuilt-cache -module-cache-path %t/MCP -emit-dependencies-path %t/dummy.d -track-system-dependencies -emit-loaded-module-trace-path %t/trace.json %s |
147 | 167 | //
|
148 | 168 | // Check SDKLib and ExportedLib are in the module cache
|
149 | 169 | // RUN: test -f %t/MCP/SdkLib-*.swiftmodule
|
|
181 | 201 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE
|
182 | 202 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
183 | 203 | //
|
| 204 | +// Check we didn't emit anything from the cache in the trace file either |
| 205 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE-NEGATIVE |
| 206 | +// RUN: cat %t/trace.json | %FileCheck %s -check-prefix=TRACEFILE |
| 207 | +// |
184 | 208 | // RUN: echo '5: PASSED'
|
185 | 209 |
|
186 | 210 |
|
|
0 commit comments