@@ -73,7 +73,6 @@ final class EndToEndTests: XCTestCase {
73
73
// This takes a lock on `.build`, but if the tests are being run by `swift test` the outer Swift Package Manager
74
74
// instance will already hold this lock, causing the test to deadlock. We can work around this by giving
75
75
// the `swift run swift-sdk-generator` instance its own scratch directory.
76
- #if !os(macOS)
77
76
func buildSDK( inDirectory packageDirectory: FilePath , scratchPath: String , withArguments runArguments: String ) async throws -> String {
78
77
let generatorOutput = try await Shell . readStdout (
79
78
" cd \( packageDirectory) && swift run --scratch-path \" \( scratchPath) \" swift-sdk-generator \( runArguments) "
@@ -101,7 +100,9 @@ final class EndToEndTests: XCTestCase {
101
100
}
102
101
103
102
func testPackageInitExecutable( ) async throws {
104
- throw XCTSkip ( " EndToEnd tests currently deadlock under `swift test`: https://github.com/swiftlang/swift-sdk-generator/issues/143 " )
103
+ if ProcessInfo . processInfo. environment. keys. contains ( " JENKINS_URL " ) {
104
+ throw XCTSkip ( " EndToEnd tests cannot currently run in CI: https://github.com/swiftlang/swift-sdk-generator/issues/145 " )
105
+ }
105
106
106
107
var packageDirectory = FilePath ( #filePath)
107
108
packageDirectory. removeLastComponent ( )
@@ -118,6 +119,12 @@ final class EndToEndTests: XCTestCase {
118
119
}
119
120
120
121
for runArguments in possibleArguments {
122
+ if runArguments. contains ( " rhel " ) {
123
+ // Temporarily skip the RHEL-based SDK. XCTSkip() is not suitable as it would skipping the entire test case
124
+ logger. warning ( " RHEL-based SDKs currently do not work with Swift 6.0: https://github.com/swiftlang/swift-sdk-generator/issues/138 " )
125
+ continue
126
+ }
127
+
121
128
let bundleName = try await FileManager . default. withTemporaryDirectory ( logger: logger) { tempDir in
122
129
try await buildSDK ( inDirectory: packageDirectory, scratchPath: tempDir. path, withArguments: runArguments)
123
130
}
@@ -149,7 +156,9 @@ final class EndToEndTests: XCTestCase {
149
156
}
150
157
151
158
func testRepeatedSDKBuilds( ) async throws {
152
- throw XCTSkip ( " EndToEnd tests currently deadlock under `swift test`: https://github.com/swiftlang/swift-sdk-generator/issues/143 " )
159
+ if ProcessInfo . processInfo. environment. keys. contains ( " JENKINS_URL " ) {
160
+ throw XCTSkip ( " EndToEnd tests cannot currently run in CI: https://github.com/swiftlang/swift-sdk-generator/issues/145 " )
161
+ }
153
162
154
163
var packageDirectory = FilePath ( #filePath)
155
164
packageDirectory. removeLastComponent ( )
@@ -166,11 +175,16 @@ final class EndToEndTests: XCTestCase {
166
175
}
167
176
168
177
for runArguments in possibleArguments {
178
+ if runArguments. contains ( " rhel " ) {
179
+ // Temporarily skip the RHEL-based SDK. XCTSkip() is not suitable as it would skipping the entire test case
180
+ logger. warning ( " RHEL-based SDKs currently do not work with Swift 6.0: https://github.com/swiftlang/swift-sdk-generator/issues/138 " )
181
+ continue
182
+ }
183
+
169
184
try await FileManager . default. withTemporaryDirectory ( logger: logger) { tempDir in
170
185
let _ = try await buildSDK ( inDirectory: packageDirectory, scratchPath: tempDir. path, withArguments: runArguments)
171
186
let _ = try await buildSDK ( inDirectory: packageDirectory, scratchPath: tempDir. path, withArguments: runArguments)
172
187
}
173
188
}
174
189
}
175
- #endif
176
190
}
0 commit comments