Skip to content

Commit d2fabf9

Browse files
authored
[test] Test compiling the overlay swiftinterfaces to binary form (#19438)
1 parent 209d6d9 commit d2fabf9

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: for x in %platform-sdk-overlay-dir/*.swiftinterface; do [[ $(basename "$x") = Swift.swiftinterface || $(basename "$x") = simd.swiftinterface ]] && continue; %target-swift-frontend "$x" -emit-module -o %t/$(basename "${x/.*}").swiftmodule -disable-objc-attr-requires-foundation-module -enable-resilience -Fsystem %sdk/System/Library/PrivateFrameworks/ -swift-version 4 || echo '%target-os:' $(basename "$x") >> %t/failures.txt; done
3+
// RUN: diff <(grep '%target-os:' %s) <(sort -f %t/failures.txt)
4+
5+
// REQUIRES: nonexecutable_test
6+
7+
// The following textual interfaces (in alphabetical order) are known not to
8+
// work with these settings.
9+
10+
// Needs to be built as Swift 4.2.
11+
macosx: CloudKit.swiftinterface
12+
ios: CloudKit.swiftinterface
13+
tvos: CloudKit.swiftinterface
14+
watchos: CloudKit.swiftinterface
15+
16+
// Missing search path for sourcekitd.framework.
17+
macosx: SwiftLang.swiftinterface
18+
19+
// Needs to be built as Swift 4.2.
20+
ios: UIKit.swiftinterface
21+
tvos: UIKit.swiftinterface
22+
watchos: UIKit.swiftinterface
23+
24+
// Missing search path for XCTest.framework.
25+
macosx: XCTest.swiftinterface
26+
ios: XCTest.swiftinterface
27+
tvos: XCTest.swiftinterface
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: for x in %platform-sdk-overlay-dir/*.swiftinterface; do [[ $(basename "$x") = Swift.swiftinterface || $(basename "$x") = simd.swiftinterface ]] && continue; %target-swift-frontend "$x" -emit-module -o %t/$(basename "${x/.*}").swiftmodule -disable-objc-attr-requires-foundation-module -enable-resilience -Fsystem %sdk/System/Library/PrivateFrameworks/ -swift-version 4 -O || echo '%target-os:' $(basename "$x") >> %t/failures.txt; done
3+
// RUN: diff <(grep '%target-os:' %s) <(sort -f %t/failures.txt)
4+
5+
// REQUIRES: nonexecutable_test
6+
7+
// The following textual interfaces (in alphabetical order) are known not to
8+
// work with these settings.
9+
10+
// Needs to be built as Swift 4.2.
11+
macosx: CloudKit.swiftinterface
12+
ios: CloudKit.swiftinterface
13+
tvos: CloudKit.swiftinterface
14+
watchos: CloudKit.swiftinterface
15+
16+
// Missing search path for sourcekitd.framework.
17+
macosx: SwiftLang.swiftinterface
18+
19+
// Needs to be built as Swift 4.2.
20+
ios: UIKit.swiftinterface
21+
tvos: UIKit.swiftinterface
22+
watchos: UIKit.swiftinterface
23+
24+
// Missing search path for XCTest.framework.
25+
macosx: XCTest.swiftinterface
26+
ios: XCTest.swiftinterface
27+
tvos: XCTest.swiftinterface

0 commit comments

Comments
 (0)