Skip to content

Add -h, --help to swift test and send arguments to -XCTest directly #168

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

Merged
merged 1 commit into from
Mar 9, 2016

Conversation

aciidgh
Copy link
Contributor

@aciidgh aciidgh commented Mar 3, 2016

  • adds -h and --help to swift test
  • passes arguments for running specific tests directly to xctest without adding -XCTest as per proposal

examples:

$ swift test -h
OVERVIEW: Build and run tests

USAGE: swift test [options]

OPTIONS:
  TestModule.TestCase         Run a test case subclass
  TestModule.TestCase/test1   Run a specific test method
$ swift test TestModtest.TestMod/testFoo
Test Suite 'Selected tests' started at 2016-03-03 15:44:05.393
Test Suite 'TestMod' started at 2016-03-03 15:44:05.394
Test Case '-[TestModtest.TestMod testFoo]' started.
testing foo
Test Case '-[TestModtest.TestMod testFoo]' passed (0.001 seconds).
Test Suite 'TestMod' passed at 2016-03-03 15:44:05.395.
     Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'Selected tests' passed at 2016-03-03 15:44:05.395.
     Executed 1 test, with 0 failures (0 unexpected) in 0.001 (0.002) seconds

@aciidgh aciidgh force-pushed the swift_test_command_line branch from a6dddce to 4d0e4fc Compare March 3, 2016 10:15
@briancroom
Copy link
Contributor

Very cool!

As a note, I've already started working on a swift-corelibs-xctest branch which adds support for specifying a particular test case to run. At this point I'd think that swift-test should probably just pass extra arguments through unchanged to the test executable on Linux.

@aciidgh
Copy link
Contributor Author

aciidgh commented Mar 3, 2016

@briancroom sounds great!
I'd prefer passing the arguments to executable on linux once #160 is merged because it already has the refactoring required in test() method

@mxcl
Copy link
Contributor

mxcl commented Mar 3, 2016

Looks good. I am currently waiting on the swift-3-api-guidelines merge before merging anything new.

@aciidgh
Copy link
Contributor Author

aciidgh commented Mar 8, 2016

@mxcl can you initiate CI

@mxcl
Copy link
Contributor

mxcl commented Mar 8, 2016

@swift-ci Please test

@mxcl
Copy link
Contributor

mxcl commented Mar 9, 2016

I fear the OS X one got stuck, but I don’t want to stress our poor CI servers by requesting a new run.

@aciidgh aciidgh force-pushed the swift_test_command_line branch from 4d0e4fc to 84960a2 Compare March 9, 2016 02:45
@aciidgh
Copy link
Contributor Author

aciidgh commented Mar 9, 2016

This passed CI but got conflicted out pretty badly due to my other PR getting merged. Resolved conflicts and rebased but better to run CI again.

@mxcl
Copy link
Contributor

mxcl commented Mar 9, 2016

@swift-ci Please test

aciidgh added a commit that referenced this pull request Mar 9, 2016
Add -h, --help to swift test and send arguments to -XCTest directly
@aciidgh aciidgh merged commit bd97ae1 into swiftlang:master Mar 9, 2016
@aciidgh aciidgh deleted the swift_test_command_line branch March 9, 2016 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants