Skip to content

Commit 9eb63de

Browse files
committed
tests: Enable EndToEnd tests on macOS
The EndToEnd tests no longer deadlock under `swift test` and can now be run on macOS. The CI cannot currently run the end to end tests because SDK generator cannot use the CI HTTP proxy to download packages. This commit enables the tests on macOS, so they can be run locally, but disables them in CI by skipping them in Utilities/test.sh. Fixes: #143
1 parent 6047f59 commit 9eb63de

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Tests/SwiftSDKGeneratorTests/EndToEndTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ final class EndToEndTests: XCTestCase {
6666
// This takes a lock on `.build`, but if the tests are being run by `swift test` the outer Swift Package Manager
6767
// instance will already hold this lock, causing the test to deadlock. We can work around this by giving
6868
// the `swift run swift-sdk-generator` instance its own scratch directory.
69-
#if !os(macOS)
7069
func buildSDK(inDirectory packageDirectory: FilePath, scratchPath: String, withArguments runArguments: String) async throws -> String {
7170
let generatorOutput = try await Shell.readStdout(
7271
"cd \(packageDirectory) && swift run --scratch-path \(scratchPath) swift-sdk-generator \(runArguments)"
@@ -161,5 +160,4 @@ final class EndToEndTests: XCTestCase {
161160
}
162161
}
163162
}
164-
#endif
165163
}

Utilities/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
set -ex
1515

1616
if [ "$(uname)" = Darwin ]; then
17-
swift test $@
17+
swift test --skip EndToEndTests $@
1818
else
1919
swift build --build-tests $@
2020
fi

0 commit comments

Comments
 (0)