|
1 | 1 | // RUN: %empty-directory(%t)
|
2 |
| -// RUN: mkdir -p %t/sdk/usr/lib/swift/Normal.swiftmodule |
| 2 | +// RUN: mkdir -p %t/sdk/System/iOSSupport/usr/lib/swift/Normal.swiftmodule |
3 | 3 | // RUN: mkdir -p %t/sdk/System/Library/Frameworks/FMWK.framework/Modules/FMWK.swiftmodule
|
| 4 | +// RUN: %empty-directory(%t/sdk/usr/lib/swift/%target-sdk-name) |
| 5 | +// RUN: cp -r %platform-module-dir/{_Concurrency,_StringProcessing,Swift,SwiftOnoneSupport}.swiftmodule %t/sdk/usr/lib/swift/%target-sdk-name/ |
| 6 | +// RUN: cp -r %test-resource-dir/shims %t/sdk/usr/lib/swift |
4 | 7 |
|
5 |
| -// RUN: echo 'public func normal() {}' | %target-swift-frontend - -emit-module-interface-path %t/sdk/usr/lib/swift/Normal.swiftmodule/%target-swiftinterface-name -emit-module -o /dev/null -module-name Normal |
| 8 | +// RUN: echo 'public func normal() {}' | %target-swift-frontend - -emit-module-interface-path %t/sdk/System/iOSSupport/usr/lib/swift/Normal.swiftmodule/%target-swiftinterface-name -emit-module -o /dev/null -module-name Normal |
6 | 9 | // RUN: echo 'public func flat() {}' | %target-swift-frontend - -emit-module-interface-path %t/sdk/usr/lib/swift/Flat.swiftinterface -emit-module -o /dev/null -module-name Flat
|
7 | 10 | // RUN: echo 'public func fmwk() {}' | %target-swift-frontend - -emit-module-interface-path %t/sdk/System/Library/Frameworks/FMWK.framework/Modules/FMWK.swiftmodule/%target-swiftinterface-name -emit-module -o /dev/null -module-name FMWK
|
8 | 11 |
|
|
12 | 15 | // CHECK-DAG: Flat.swiftmodule
|
13 | 16 | // CHECK-DAG: FMWK.swiftmodule
|
14 | 17 |
|
15 |
| -// RUN: env SWIFT_OVERLOAD_PREBUILT_MODULE_CACHE_PATH=%t/prebuilt %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -module-cache-path %t/MCP |
16 |
| -// RUN: %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/*.swiftmodule |
| 18 | +// RUN: env SWIFT_OVERLOAD_PREBUILT_MODULE_CACHE_PATH=%t/prebuilt %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -I %t/sdk/System/iOSSupport/usr/lib/swift/ -module-cache-path %t/MCP |
| 19 | +// RUN: %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/{FMWK,Flat,Normal}-*.swiftmodule |
17 | 20 |
|
18 | 21 | // Touch a file in the SDK (to make it look like it changed) and try again.
|
19 | 22 | // This should still be able to use the prebuilt modules because they track
|
20 | 23 | // content hashes, not just size+mtime.
|
21 | 24 | // RUN: rm -rf %t/MCP
|
22 |
| -// RUN: %{python} %S/../ModuleCache/Inputs/make-old.py %t/sdk/usr/lib/swift/Normal.swiftmodule/%target-swiftinterface-name |
23 |
| -// RUN: env SWIFT_OVERLOAD_PREBUILT_MODULE_CACHE_PATH=%t/prebuilt %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -module-cache-path %t/MCP |
| 25 | +// RUN: %{python} %S/../ModuleCache/Inputs/make-old.py %t/sdk/System/iOSSupport/usr/lib/swift/Normal.swiftmodule/%target-swiftinterface-name |
| 26 | +// RUN: env SWIFT_OVERLOAD_PREBUILT_MODULE_CACHE_PATH=%t/prebuilt %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -I %t/sdk/System/iOSSupport/usr/lib/swift/ -module-cache-path %t/MCP |
24 | 27 | // RUN: ls %t/MCP/*.swiftmodule | %FileCheck -check-prefix CHECK-CACHE %s
|
25 |
| -// RUN: %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/*.swiftmodule |
| 28 | +// RUN: %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/{FMWK,Flat,Normal}-*.swiftmodule |
26 | 29 |
|
27 | 30 | // CHECK-CACHE-DAG: Normal-{{.+}}.swiftmodule
|
28 | 31 | // CHECK-CACHE-DAG: Flat-{{.+}}.swiftmodule
|
|
31 | 34 | // Actually change a file in the SDK, to check that we're tracking dependencies
|
32 | 35 | // at all.
|
33 | 36 | // RUN: rm -rf %t/MCP
|
34 |
| -// RUN: echo "public func another()" >> %t/sdk/usr/lib/swift/Normal.swiftmodule/%target-swiftinterface-name |
35 |
| -// RUN: env SWIFT_OVERLOAD_PREBUILT_MODULE_CACHE_PATH=%t/prebuilt %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -module-cache-path %t/MCP |
| 37 | +// RUN: echo "public func another()" >> %t/sdk/System/iOSSupport/usr/lib/swift/Normal.swiftmodule/%target-swiftinterface-name |
| 38 | +// RUN: env SWIFT_OVERLOAD_PREBUILT_MODULE_CACHE_PATH=%t/prebuilt %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -I %t/sdk/System/iOSSupport/usr/lib/swift/ -module-cache-path %t/MCP |
36 | 39 | // RUN: ls %t/MCP/*.swiftmodule | %FileCheck -check-prefix CHECK-CACHE %s
|
37 | 40 | // RUN: not %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/Normal-*.swiftmodule
|
38 | 41 | // RUN: %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/Flat-*.swiftmodule
|
|
41 | 44 | // Without the prebuilt cache everything should still work; it'll just take time
|
42 | 45 | // because we have to build the interfaces.
|
43 | 46 | // RUN: rm -rf %t/MCP
|
44 |
| -// RUN: %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -module-cache-path %t/MCP |
| 47 | +// RUN: %target-typecheck-verify-swift -sdk %t/sdk -Fsystem %t/sdk/System/Library/Frameworks -I %t/sdk/usr/lib/swift/ -I %t/sdk/System/iOSSupport/usr/lib/swift/ -module-cache-path %t/MCP |
45 | 48 | // RUN: ls %t/MCP/*.swiftmodule | %FileCheck -check-prefix CHECK-CACHE %s
|
46 | 49 | // RUN: not %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/Normal-*.swiftmodule
|
47 | 50 | // RUN: not %{python} %S/../ModuleCache/Inputs/check-is-forwarding-module.py %t/MCP/Flat-*.swiftmodule
|
|
0 commit comments