Skip to content

Commit

Permalink
tests: Run tests on Linux CI
Browse files Browse the repository at this point in the history
The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are not compiled on macOS, but this commit marks
them with `XCTSkip` so they are not run on Linux either.

Future commits will loosen these restrictions.

Fixes swiftlang#45
  • Loading branch information
euanh committed Nov 8, 2024
1 parent fd3aef5 commit 95b78b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:

test:
<<: *common
command: /bin/bash -xcl "./Utilities/test.sh $${WARN_AS_ERROR_ARG-} $${SANITIZER_ARG-} $${IMPORT_CHECK_ARG-}"
command: /bin/bash -xcl "swift test $${WARN_AS_ERROR_ARG-} $${SANITIZER_ARG-} $${IMPORT_CHECK_ARG-}"

# util

Expand Down
4 changes: 4 additions & 0 deletions Tests/SwiftSDKGeneratorTests/EndToEndTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ final class EndToEndTests: XCTestCase {

#if !os(macOS)
func testPackageInitExecutable() async throws {
throw XCTSkip("EndToEnd tests currently deadlock under `swift test`: https://github.com/swiftlang/swift-sdk-generator/issues/143")

let fm = FileManager.default

var packageDirectory = FilePath(#filePath)
Expand Down Expand Up @@ -102,6 +104,8 @@ final class EndToEndTests: XCTestCase {
}

func testRepeatedSDKBuilds() async throws {
throw XCTSkip("EndToEnd tests currently deadlock under `swift test`: https://github.com/swiftlang/swift-sdk-generator/issues/143")

let fm = FileManager.default

var packageDirectory = FilePath(#filePath)
Expand Down
20 changes: 0 additions & 20 deletions Utilities/test.sh

This file was deleted.

0 comments on commit 95b78b4

Please sign in to comment.