|
47 | 47 | // RUN: llvm-bcanalyzer -dump %t/MCP/ExportedLib-*.swiftmodule | %FileCheck %s -check-prefix=PREBUILT
|
48 | 48 | //
|
49 | 49 | // Check we didn't emit anything from the cache in the .d file either
|
| 50 | +// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE |
50 | 51 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
51 | 52 | //
|
52 |
| -// DEPFILE-NOT: /MCP/ |
53 |
| -// DEPFILE-NOT: /prebuilt-cache/ |
| 53 | +// DEPFILE-NEGATIVE-NOT: /MCP/ |
| 54 | +// DEPFILE-NEGATIVE-NOT: /prebuilt-cache/ |
| 55 | +// |
| 56 | +// DEPFILE-DAG: SomeCModule.h |
| 57 | +// DEPFILE-DAG: SdkLib.swiftinterface |
| 58 | +// DEPFILE-DAG: ExportedLib.swiftinterface |
| 59 | +// DEPFILE-DAG: SDKDependencies.swift |
54 | 60 | //
|
55 | 61 | // RUN: %empty-directory(%t/MCP)
|
56 | 62 | // RUN: echo '2: PASSED'
|
|
90 | 96 | // NOCACHE-NOT: /MCP/
|
91 | 97 | //
|
92 | 98 | // Check we didn't emit anything from the cache in the .d file either
|
| 99 | +// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE |
93 | 100 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
94 | 101 | //
|
95 | 102 | // RUN: %empty-directory(%t/MCP)
|
|
126 | 133 | // RUN: cat %t/MCP/SdkLib-*.swiftmodule | %FileCheck %s -check-prefix=NOCACHE -DLIB_NAME=SdkLib
|
127 | 134 | //
|
128 | 135 | // Check we didn't emit anything from the cache in the .d file either
|
| 136 | +// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE |
129 | 137 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
130 | 138 | //
|
131 | 139 | // RUN: %empty-directory(%t/MCP)
|
|
170 | 178 | // RUN: llvm-bcanalyzer -dump %t/MCP/SdkLib-*.swiftmodule | %FileCheck %s -check-prefix=PREBUILT
|
171 | 179 | //
|
172 | 180 | // Check we didn't emit anything from the cache in the .d file either
|
| 181 | +// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE-NEGATIVE |
173 | 182 | // RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPFILE
|
174 | 183 | //
|
175 | 184 | // RUN: echo '5: PASSED'
|
176 | 185 |
|
| 186 | + |
| 187 | +// 6) Keeping the existing cache, update ExportedLib to no longer depend on SomeCModule |
| 188 | +// |
| 189 | +// RUN: grep -v import %t/my-new-sdk/ExportedLib.swiftinterface > %t/my-new-sdk/ExportedLib.swiftinterface.updated |
| 190 | +// RUN: mv %t/my-new-sdk/ExportedLib.swiftinterface.updated %t/my-new-sdk/ExportedLib.swiftinterface |
| 191 | +// |
| 192 | +// RUN: sed -e 's/x > 3/5 > 3/g' %s | %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 - |
| 193 | +// |
| 194 | +// Check we don't have SomeCModule listed in dependencies |
| 195 | +// RUN: cat %t/dummy.d | %FileCheck %s -check-prefixes=DEPFILE-NEGATIVE,DEPCHANGE-NEGATIVE |
| 196 | +// RUN: cat %t/dummy.d | %FileCheck %s -check-prefix=DEPCHANGE |
| 197 | +// |
| 198 | +// DEPCHANGE-NEGATIVE-NOT: SomeCModule.h |
| 199 | +// |
| 200 | +// DEPCHANGE-DAG: SdkLib.swiftinterface |
| 201 | +// DEPCHANGE-DAG: ExportedLib.swiftinterface |
| 202 | +// DEPCHANGE-DAG: SDKDependencies.swift |
| 203 | + |
177 | 204 | import SdkLib
|
178 | 205 |
|
179 | 206 | func foo() -> ExportedInterface {
|
|
0 commit comments