-
Notifications
You must be signed in to change notification settings - Fork 263
[build_script] Use built XCTest for Linux tests #46
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] Use built XCTest for Linux tests #46
Conversation
I haven't had a chance to give it a try yet, but this seems like an important step towards making this test suite robust enough to catch the sorts of things we want it to. 👍 |
a0ebca0
to
dc30cec
Compare
As of swiftlang/swift-corelibs-xctest#43, swift-corelibs-xctest is dependent upon swift-corelibs-foundation. As such, it must be built after Foundation, and its build script must be passed a reference to the Foundation build directory. Update the build script in order to get XCTest building after the changes in swiftlang/swift-corelibs-xctest#43. In addition, this change also allows XCTest to be tested via `utils/build-script --xctest --test`. This has been possible since swiftlang/swift-corelibs-xctest#46.
The README should also be updated with the new build script invocation here! |
Previously, tests on Linux could only be run using the installed swift-corelibs-xctest. Modify the script to use the built XCTest instead of the installed one. In addition, since the script no longer relies on the installed XCTest, move the `--test` logic such that it can be used even if `--module-install-path` and `--library-install-path` are not specified.
dc30cec
to
cd0f2d5
Compare
|
||
```sh | ||
./build_script.py \ | ||
--swiftc="/swift/usr/bin/swiftc" \ | ||
--build-dir="/tmp/XCTest_build" \ | ||
--swift-build-dir="/swift/usr" \ | ||
--library-install-path="/swift/usr/lib/swift/linux" \ | ||
--module-install-path="/swift/usr/lib/swift/linux/x86_64" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README should also be updated with the new build script invocation here!
@briancroom Is this what you meant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks!
@mike-ferris-apple Friendly ping! This is one of those rare pull requests with no tradeoffs--only benefits to be had here! 😎 |
[build_script] Use built XCTest for Linux tests
Thanks!! |
swiftlang#46 is missing this change to the compiler invocation, which allows tests to run on Linux even when `--library-install-path` and `--module-install-path` are not specified.
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.
Previously, tests on Linux could only be run using the installed swift-corelibs-xctest. Modify the script to use the built XCTest instead of the installed one.
In addition, since the script no longer relies on the installed XCTest, move the
--test
logic such that it can be used even if--module-install-path
and--library-install-path
are not specified.Now, running tests on Linux is as easy as:
Keep in mind that the tests won't pass until after #45 is merged.