-
Notifications
You must be signed in to change notification settings - Fork 263
Osx build script #34
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
Osx build script #34
Conversation
Why not use Xcode (or xcodebuild) on OS X? I am reluctant to take a lot of change to support different ways of building and testing this on OS X, especially since there's no real intent for this library to actually be used on OS X. Having the Xcode project is a nice convenience for working on this for those of us who spend most of our time in OS X, even though the project itself is really meant for use on Linux. But I guess I am curious what problem adding this support to the build script is solving. |
There is a simple intent: just having a unified build system on OSX and Linux. If I want to implement tests that run on linux I have to use this XCTest library, if i try to run the same tests on OSX it fails because XCTest on OSX is not the same lib as XCTest on Linux. Primarily I want my XCTest on OS X does not know And to make installation work the same on OSX and Linux I think that the build script should run on both platforms. |
Our intent here was to allow the API to be compatible, so that developers may use XCTest on OS X/iOS and swift-corelibs-xctest on other platforms. |
The |
Correct, but currently the API it is not compatible completely and before someone comes up with a autodetection idea for tests it will stay that way, so why not allow using the lib on OSX until this has been sorted out? |
Which part is not API compatible? If your tests have to add something additional, which is used only on Linux (for example), but otherwise the same code can be built against the Xcode XCTest, then I see that as ok. I really don't want to start us down the road of a fork at this time. |
For the aspect of this related to swift build (the package manager), I think this discussion is probably best had with the package manager folks involved. They are currently working on (and discussing early proposals for) how testing support will be integrated with the package manager. I would like to hear more detail about the API not being compatible between Xcode XCTest and corelibs XCTest. As @parkera mentions, the goal here is for Xcode's XCTest to be used on OS X and corelibs XCTest to be used on other platforms. I know there are rough edges here, but I also know that the package manager's tests, for example, are currently set up such that this works for them. |
See the other pull request, i would call that an incompatability :( ( The problem is: I want to use it now because I have some libs that build on linux and osx. If I can't use it now I will have to switch to something that works on all platforms the same way. |
# Conflicts: # README.md
Thanks for this, @dunkelstern. Sorry it's been sitting around for a while! I think we may have addressed your concerns in the meantime:
By linking SwiftXCTest.framework in your Xcode project target's "Link Binary with Libraries" build phase, it's possible to use this framework on OS X--in fact, the SwiftXCTestFunctionalTests target in this repository does just that! You can take a look there for an example. Keep in mind, however, that this is not recommended, and that you cannot use this framework from within a "test target" in Xcode. Test targets are run automatically via Xcode and Apple XCTest. Instead, we recommend using the swift-package-manager and its new Feel free to comment here or send an email to the swift-dev or swift-corelibs-dev mailing lists if you have any additional comments/questions. In the meantime, we wish to continue using |
This adds OSX support to the
build_script.py
to allow using the same tests on OSX as on Linux.Added paragraph to Readme with build instructions on OSX.
--test
won't work on OSX currently, use the Xcode test target for testing on OSX