Skip to content

SR-1298: [swift-test] Allow running specific tests #291

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

Closed
wants to merge 1 commit into from

Conversation

Bouke
Copy link
Contributor

@Bouke Bouke commented Apr 28, 2016

swift-test -h advertises the ability to test specific test cases, by passing a specifier. However the specifier is ignored and all tests are run. This change allows passing a specifier which is used. Tested on both OS X and Ubuntu 15.10.

See also SR-1298.

@@ -35,7 +35,7 @@ enum Mode: Argument, Equatable, CustomStringConvertible {
case "--help", "--usage", "-h":
self = .Usage
default:
return nil
self = .Run(argument)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that with the removal of the return nil the initializer doesn't need to be failable and throwing anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aciidgh
Copy link
Contributor

aciidgh commented Apr 28, 2016

This is dupe of #266
Consider closing

@Bouke
Copy link
Contributor Author

Bouke commented Apr 28, 2016

@aciidb0mb3r ah yes; didn't come across your PR in Jira. See my change on how to use a test specifier without introducing a flag.

@Bouke Bouke closed this Apr 28, 2016
@aciidgh
Copy link
Contributor

aciidgh commented Apr 28, 2016

Yeah I tried same thing first but the problem with that is, if you specify a mode it'll fail.

@Bouke
Copy link
Contributor Author

Bouke commented Apr 28, 2016

Ah yes; swift-test --chdir hello will turn both --chdir and hello into a mode. Hmm apart from rewriting OptionParser to have more knowledge on the arguments, I don't see an easy solution.

@aciidgh
Copy link
Contributor

aciidgh commented Apr 28, 2016

-s sounds reasonable

@Bouke Bouke deleted the sr-1298-swift-test-specifier branch May 1, 2016 18:05
aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
[BuildSystem] Enable fast cancellation.
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