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

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

Merged
merged 1 commit into from Mar 9, 2016

Conversation

Projects
None yet
3 participants
@aciidb0mb3r
Member

aciidb0mb3r 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
@briancroom

This comment has been minimized.

Show comment
Hide comment
@briancroom

briancroom Mar 3, 2016

Collaborator

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.

Collaborator

briancroom commented Mar 3, 2016

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.

@aciidb0mb3r

This comment has been minimized.

Show comment
Hide comment
@aciidb0mb3r

aciidb0mb3r Mar 3, 2016

Member

@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

Member

aciidb0mb3r 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

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Mar 3, 2016

Contributor

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

Contributor

mxcl commented Mar 3, 2016

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

@aciidb0mb3r

This comment has been minimized.

Show comment
Hide comment
@aciidb0mb3r

aciidb0mb3r Mar 8, 2016

Member

@mxcl can you initiate CI

Member

aciidb0mb3r commented Mar 8, 2016

@mxcl can you initiate CI

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Mar 8, 2016

Contributor

@swift-ci Please test

Contributor

mxcl commented Mar 8, 2016

@swift-ci Please test

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Mar 9, 2016

Contributor

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

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.

@aciidb0mb3r

This comment has been minimized.

Show comment
Hide comment
@aciidb0mb3r

aciidb0mb3r Mar 9, 2016

Member

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.

Member

aciidb0mb3r 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

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Mar 9, 2016

Contributor

@swift-ci Please test

Contributor

mxcl commented Mar 9, 2016

@swift-ci Please test

aciidb0mb3r added a commit that referenced this pull request Mar 9, 2016

Merge pull request #168 from aciidb0mb3r/swift_test_command_line
Add -h, --help to swift test and send arguments to -XCTest directly

@aciidb0mb3r aciidb0mb3r merged commit bd97ae1 into apple:master Mar 9, 2016

2 checks passed

Swift Test Linux Platform Build finished. 7988 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform Build finished. 32116 tests run, 0 skipped, 0 failed.
Details

@aciidb0mb3r aciidb0mb3r deleted the aciidb0mb3r:swift_test_command_line branch Mar 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment