|
1 | | -// RUN: %empty-directory(%t/BuildDir/Lib.framework/Modules/Lib.swiftmodule) |
2 | | -// RUN: %empty-directory(%t/SecondBuildDir/Lib.framework/Modules/Lib.swiftmodule) |
| 1 | +// RUN: %empty-directory(%t/Build1/Lib.framework/Modules/Lib.swiftmodule) |
| 2 | +// RUN: %empty-directory(%t/Build2/Lib.framework/Modules/Lib.swiftmodule) |
3 | 3 | // RUN: %empty-directory(%t/ModuleCache) |
4 | 4 |
|
5 | 5 | // RUN: echo 'public func showsUpInBothPlaces() {}' > %t/Lib.swift |
6 | 6 |
|
7 | 7 | // 1. Create a .swiftinterface file containing just one API, and put it inside a second build dir (without a .swiftmodule) |
8 | | -// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-module-interface-path %t/SecondBuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-swiftinterface-name -module-name Lib |
| 8 | +// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-module-interface-path %t/Build2/Lib.framework/Modules/Lib.swiftmodule/%target-swiftinterface-name -module-name Lib |
9 | 9 |
|
10 | 10 | // 2. Add a new API to the module, and compile just the serialized version in the build dir. |
11 | 11 | // RUN: echo 'public func onlyInTheCompiledModule() {}' >> %t/Lib.swift |
12 | | -// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-swiftmodule-name -emit-module-interface-path %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-swiftinterface-name -module-name Lib |
| 12 | +// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/Build1/Lib.framework/Modules/Lib.swiftmodule/%target-swiftmodule-name -emit-module-interface-path %t/Build1/Lib.framework/Modules/Lib.swiftmodule/%target-swiftinterface-name -module-name Lib |
13 | 13 |
|
14 | 14 | // 3. Make sure when we compile this test file, we can access both APIs since we'll |
15 | 15 | // load the compiled .swiftmodule instead of the .swiftinterface in the SDK. |
16 | | -// RUN: %target-swift-frontend -typecheck %s -F %t/BuildDir -F %t/SecondBuildDir -module-cache-path %t/ModuleCache |
| 16 | +// RUN: %target-swift-frontend -typecheck %s -F %t/Build1 -F %t/Build2 -module-cache-path %t/ModuleCache |
17 | 17 |
|
18 | 18 | // 4. Make sure we didn't compile any .swiftinterfaces into the module cache. |
19 | 19 | // RUN: ls %t/ModuleCache | not grep 'swiftmodule' |
20 | 20 |
|
21 | 21 | // 5. This should also work if the swiftinterface isn't present in the first build dir. |
22 | | -// RUN: rm %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-swiftinterface-name |
23 | | -// RUN: %target-swift-frontend -typecheck %s -F %t/BuildDir -F %t/SecondBuildDir -module-cache-path %t/ModuleCache |
| 22 | +// RUN: rm %t/Build1/Lib.framework/Modules/Lib.swiftmodule/%target-swiftinterface-name |
| 23 | +// RUN: %target-swift-frontend -typecheck %s -F %t/Build1 -F %t/Build2 -module-cache-path %t/ModuleCache |
24 | 24 |
|
25 | 25 | // 6. Make sure we /still/ didn't compile any .swiftinterfaces into the module cache. |
26 | 26 | // RUN: ls %t/ModuleCache | not grep 'swiftmodule' |
|
0 commit comments