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

[SR-10800] swift test should have more flexible test selection #4704

Closed
neonichu opened this issue May 30, 2019 · 5 comments
Closed

[SR-10800] swift test should have more flexible test selection #4704

neonichu opened this issue May 30, 2019 · 5 comments
Assignees

Comments

@neonichu
Copy link
Member

Previous ID SR-10800
Radar rdar://problem/45018431
Original Reporter @neonichu
Type Improvement
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Improvement, StarterBug
Assignee @keith
Priority Medium

md5: a115efa18a7f862f15a5c25b07d26a34

Issue Description:

I'm using a Makefile for a few projects where `make test` runs `swift test`. I'd like to be able to exclude a few tests (hardware-specific) by default, and have other Makefile targets like `make testhw` to run the full set.

The --filter CLI option doesn't seem to be flexible enough to either exclude tests or specify multiple filter patterns.

$ swift test --filter FuzzerTests --filter MemoryTests --filter PCITests

Will only run the last filter pattern specified - PCITests. Either allowing the specification of multiple filters, or adding an --exclude or similar option would do what I need, but I think both would be useful.

@swift-ci
Copy link
Contributor

swift-ci commented Jun 7, 2019

Comment by Noah Gilmore (JIRA)

Going to try to take a stab at this - I think a quick and easy win would be to add support for specifying the filter arg multiple times, but open to other approaches as well.

@belkadan
Copy link

Still working on this, noahsark769 (JIRA User)?

(I'm checking in on all the StarterBugs that haven't been touched in over a month; it's totally fine if you just haven't had time but still want to keep it.)

@swift-ci
Copy link
Contributor

Comment by Noah Gilmore (JIRA)

Hey @belkadan - I actually was able to implement this but ran into some road blocks getting the tests to run. I think I'd like to keep it since I'll hopefully be able to find some time soon to take another look, but also totally fine if someone else wants to take it over. I'll try to push up a branch in my fork of swiftpm soon just in case as well.

@keith
Copy link
Collaborator

keith commented Jul 5, 2020

I've submitted an implementation of this #2800

@finagolfin
Copy link
Contributor

I think it should have always worked as a regular expression, `swift test --filter '(Fuzzer|Memory|PCI)Tests'`, but with Keith's pull and my just-merged pull to allow skipping tests, I think this issue can be closed:
#2847

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
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

No branches or pull requests

5 participants