-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build-script] Build & test XCTest (on OS X, too) #1316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build-script] Build & test XCTest (on OS X, too) #1316
Conversation
/cc @mike-ferris-apple and @briancroom for their swift-corelibs-xctest expertise. |
@swift-ci Please test |
@modocache Xcode 7.3 beta introduces the possibility of requesting to use a specific Swift toolchain for command line tools (see Release Notes). I'm not sure what kind of configuration the OS X CI workers have, though. Regardless, I'm really excited to see progress on this front. Thanks for all your effort here. |
This needs to be updated, since swiftlang/swift-corelibs-xctest#50 added an additional parameter to the XCTest build script. |
Allow swift-corelibs-xctest to be built and tested on Linux and OS X, via `utils/build-script --xctest --test`. On OS X, XCTest is built via `xcodebuild`, which has been possible since swiftlang/swift-corelibs-xctest#47. It's tested via the "SwiftXCTestFunctionalTests" Xcode target. Keep in mind that `xcodebuild` must be configured on the host machine to use a Swift toolchain that can build XCTest--as of swiftlang/swift-corelibs-xctest#48, that would be `swift-DEVELOPMENT-SNAPSHOT-2016-02-08` or later. On Linux, XCTest is built and tested via the project's `build_script.py`, which has been possible since swiftlang/swift-corelibs-xctest#46.
0f40de2
to
ac5f7c7
Compare
@gribozavr This should be good to go! Could you try CI again, and if it passes would you consider merging this? 🙇 |
@swift-ci Please test |
There appear to be failures in the OS X Swift test suite, which are unrelated. The XCTest tests would normally run after the Swift tests, but the CI process exits early. The Linux tests pass, though! I can see all five of our test cases are passing. 😄 |
@swift-ci Please test |
@modocache Yes, we had a massively broken 'master' branch at that time. Let's re-run the tests. |
The patch LGTM unless CI says otherwise. |
@gribozavr Looks like a swift-package-manager failure on Linux, the same you mention in #1391. |
@modocache Yes. Unfortunately xctest tests are being run after swiftpm, so that failure is preventing this PR from being actually tested. |
Haha, ironically three days ago it was OS X that wasn't being tested, whereas this time it's Linux! #1316 (comment) 😂 Here's hoping for better luck and a green master branch soon! |
@gribozavr If the CI's looking greener today, could we retry this pull request? Would love to see it merged. 🙇 |
@swift-ci Please test |
@swift-ci Please test |
@gribozavr Wow, it worked! Thanks for your persistence! 😅 |
[build-script] Build & test XCTest (on OS X, too)
What's in this pull request?
Allow swift-corelibs-xctest to be built and tested on Linux and OS X, via
utils/build-script --xctest --test
.On OS X, XCTest is built via
xcodebuild
, which has been possible since swiftlang/swift-corelibs-xctest#47. It's tested via the "SwiftXCTestFunctionalTests" Xcode target. Keep in mind thatxcodebuild
must be configured on the host machine to use a Swift toolchain that can build XCTest--as of swiftlang/swift-corelibs-xctest#48, that would beswift-DEVELOPMENT-SNAPSHOT-2016-02-08
or later.On Linux, XCTest is built and tested via the project's
build_script.py
, which has been possible since swiftlang/swift-corelibs-xctest#46.Why merge this pull request?
Although swift-corelibs-xctest has been added to Apple CI in swiftlang/swift-corelibs-xctest#45 (comment), the build script triggered doesn't actually run the test suite. Because the project has lacked CI that can run the test suite, pull requests that break the tests have been merged in the past (swiftlang/swift-corelibs-xctest#33 and swiftlang/swift-corelibs-xctest#44, for example). Allowing the build script to test swift-corelibs-xctest will keep swift-corelibs-xctest more stable.
What are the downsides of merging this pull request?
xcodebuild
must be invoked with a toolchain capable of building swift-corelibs-xctest. The build script changes in this pull request do not enforce a specific toolchain (I'm not sure if this is possible). Invoking the build script with the wrong toolchain will cause the build script to fail. Keep in mind that this is still better than the current situation, in which OS X will attempt to run the Linux-only swift-corelibs-xctest build script.