1
1
// RUN: %empty-directory(%t)
2
2
// REQUIRES: VENDOR=apple
3
3
4
+ /// Prepare the SDK.
5
+ // RUN: cp -r %S/Inputs/public-private-sdk %t/sdk
6
+ // RUN: %target-swift-frontend -emit-module -module-name PublicSwift \
7
+ // RUN: %t/sdk/System/Library/Frameworks/PublicSwift.framework/Modules/PublicSwift.swiftmodule/source.swift \
8
+ // RUN: -o %t/sdk/System/Library/Frameworks/PublicSwift.framework/Modules/PublicSwift.swiftmodule/%target-swiftmodule-name
9
+ // RUN: %target-swift-frontend -emit-module -module-name PrivateSwift \
10
+ // RUN: %t/sdk/System/Library/PrivateFrameworks/PrivateSwift.framework/Modules/PrivateSwift.swiftmodule/source.swift \
11
+ // RUN: -o %t/sdk/System/Library/PrivateFrameworks/PrivateSwift.framework/Modules/PrivateSwift.swiftmodule/%target-swiftmodule-name
12
+
4
13
/// Expect warnings when building a public client.
5
- // RUN: %target-swift-frontend -sdk %S/Inputs/public-private- sdk -typecheck -module-cache-path %t %s \
6
- // RUN: -F %S/Inputs/public-private- sdk/System/Library/PrivateFrameworks/ \
14
+ // RUN: %target-swift-frontend -typecheck - sdk %t/ sdk -module-cache-path %t %s \
15
+ // RUN: -F %t/ sdk/System/Library/PrivateFrameworks/ \
7
16
// RUN: -library-level api -verify -D PUBLIC_IMPORTS
8
17
9
18
/// Expect no warnings when building an SPI client.
10
- // RUN: %target-swift-frontend -sdk %S/Inputs/public-private- sdk -typecheck -module-cache-path %t %s \
11
- // RUN: -F %S/Inputs/public-private- sdk/System/Library/PrivateFrameworks/ \
19
+ // RUN: %target-swift-frontend -typecheck - sdk %t/ sdk -module-cache-path %t %s \
20
+ // RUN: -F %t/ sdk/System/Library/PrivateFrameworks/ \
12
21
// RUN: -library-level spi -D PUBLIC_IMPORTS
13
22
14
23
/// Expect no warnings when building a client with some other library level.
15
- // RUN: %target-swift-frontend -sdk %S/Inputs/public-private- sdk -typecheck -module-cache-path %t %s \
16
- // RUN: -F %S/Inputs/public-private- sdk/System/Library/PrivateFrameworks/ \
24
+ // RUN: %target-swift-frontend -typecheck - sdk %t/ sdk -module-cache-path %t %s \
25
+ // RUN: -F %t/ sdk/System/Library/PrivateFrameworks/ \
17
26
// RUN: -D PUBLIC_IMPORTS
18
- // RUN: %target-swift-frontend -sdk %S/Inputs/public-private- sdk -typecheck -module-cache-path %t %s \
19
- // RUN: -F %S/Inputs/public-private- sdk/System/Library/PrivateFrameworks/ \
27
+ // RUN: %target-swift-frontend -typecheck - sdk %t/ sdk -module-cache-path %t %s \
28
+ // RUN: -F %t/ sdk/System/Library/PrivateFrameworks/ \
20
29
// RUN: -library-level other -D PUBLIC_IMPORTS
21
30
#if PUBLIC_IMPORTS
22
31
import PublicSwift
@@ -28,8 +37,8 @@ import FullyPrivateClang // expected-warning{{private module 'FullyPrivateClang'
28
37
import main // expected-warning{{'implementation-only-import-suggestion.swift' is part of module 'main'; ignoring import}}
29
38
30
39
/// Expect no warnings with implementation-only imports.
31
- // RUN: %target-swift-frontend -sdk %S/Inputs/public-private- sdk -typecheck -module-cache-path %t %s \
32
- // RUN: -F %S/Inputs/public-private- sdk/System/Library/PrivateFrameworks/ \
40
+ // RUN: %target-swift-frontend -typecheck - sdk %t/ sdk -module-cache-path %t %s \
41
+ // RUN: -F %t/ sdk/System/Library/PrivateFrameworks/ \
33
42
// RUN: -library-level api -D IMPL_ONLY_IMPORTS
34
43
#elseif IMPL_ONLY_IMPORTS
35
44
0 commit comments