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

Bring multiple test filtering to test/bench #6697

Closed
wants to merge 3 commits into from

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Feb 24, 2019

When more than one TESTNAME/BENCHNAME is specified, run the tests / doctests / benches once per name, passing the rest of the arguments to each invocation. So, for instance

cargo test foo bar --nocapture

Will test foo with --nocapture first and then bar with --nocapture.

@rust-highfive
Copy link

r? @ehuss

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

I would personally be wary of changing a public interface like this, especially with custom test frameworks somewhat on the horizon I think we'd want a broader discussion of how to map arguments to cargo test down to the actual test frameworks and such.

@dwijnand
Copy link
Member Author

I've not followed what the custom test framework work has done, but I've felt the need for this feature many times! (see a few comments of mine in rust-lang/rust#30422)

How can I enable this to move forward?

@bors
Copy link
Collaborator

bors commented Feb 25, 2019

☔ The latest upstream changes (presumably #6683) made this pull request unmergeable. Please resolve the merge conflicts.

When more than one TESTNAME/BENCHNAME is specified, run the tests /
doctests / benches once per name, passing the rest of the arguments to
each invocation.  So, for instance

    cargo test foo bar --nocapture

Will test foo with --nocapture first and then bar with --nocapture.
@alexcrichton
Copy link
Member

I'm unfortunately not sure of the best way to move this forward, but I think a discussion on internals would probably be a good place to start? That might help rope in other folks interested in this area

@dwijnand
Copy link
Member Author

Hmm, I'm not sure I want to spend my time trying to rally people.

I think instead I'll build this as an external command (as soon as I'm motivated enough). That way I can iterate outside of the bounds of cargo's CLI compatibility guarantees, avoid forcing anyone into accepting this insta-stable feature and also get some exposure to the pitfalls and concerns that external command developers face.

@dwijnand dwijnand closed this Feb 28, 2019
@dwijnand dwijnand deleted the test-multiple branch February 28, 2019 17:48
bors added a commit that referenced this pull request Mar 2, 2019
Some test/bench-related tweaks

Reaped from #6697
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.

None yet

5 participants