Skip to content
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

Running from CLI? #2

Closed
johnpaulashenfelter opened this issue Jun 17, 2014 · 8 comments
Closed

Running from CLI? #2

johnpaulashenfelter opened this issue Jun 17, 2014 · 8 comments
Labels
Milestone

Comments

@johnpaulashenfelter
Copy link

So how do you run these from the CLI?

@kytrinyx
Copy link
Member

@hankturowski How have you been running the test suites?

@hankturowski
Copy link
Contributor

Thus far I've only run the tests using the Xcode6 GUI.

@ahalls
Copy link
Contributor

ahalls commented Aug 5, 2014

I too have been building an Xcode6 project and coding and test from the GUI. I liked the test runner created for objective-C in Ruby by burtlo. Seems like Xcode6 is even more CLI friendly. I'll look into seeing if I can create a CLI test runner for Swift.

masters3d added a commit that referenced this issue Mar 22, 2015
@montlebalm
Copy link

Any progress on this @ahalls? I've been looking into running XCTests from the CLI, but I haven't made much progress.

@hankturowski
Copy link
Contributor

Swift 2.0 was just announced at WWDC and Xcode 7 is around the corner. We should probably put this on hold until they go gold.

Additionally, Swift will be open source with a Linux port at some point in the not too distant future. I assume that that will mean that command line testing will be much easier.

@masters3d masters3d added this to the Swift 2.0 milestone Aug 14, 2015
@masters3d masters3d removed this from the Swift 2.0 milestone Sep 13, 2015
@masters3d
Copy link
Contributor

Im going to close this for now. We can revisit this when swift is stable in Linux.

@masters3d masters3d reopened this Jan 16, 2016
@masters3d
Copy link
Contributor

In swift 2.2 we now have the option to use the pure swift implementation of swift. https://github.com/apple/swift-corelibs-xctest

Some limitations: https://github.com/apple/swift-corelibs-xctest#additional-considerations-for-swift-on-linux

We need to manual add all the test to
var allTests : [(String, () -> Void)] {}

We can handle this with a script
https://gist.github.com/briancroom/e2c22f162f8ba5211e31

Then all we would need to do is to call this with all the Test classes.

``XCTMain([BobTest(), Problem3Test(), ETCTest()])`

Live example with 2.2:

http://swiftlang.ng.bluemix.net/#/repl/b0d680996ae5506a06be941e7b1e642665ee35e51b0c216cb6d6f13957e18e41

@masters3d
Copy link
Contributor

we now support linux. There is updated documentation to run from the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants