-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)A-cliArea: Command-line interface, option parsing, etc.Area: Command-line interface, option parsing, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Description
Describe the problem you are trying to solve
Currently cargo test --tests
runs both unit and integration tests. Using cargo test --lib
runs only the unit-tests of the library, however there is no way to only let the integration tests run, apart from maybe using a naming scheme for the integration tests, which I would like to avoid. It's also possible to write a script which calls cargo test --test <name>
for each .rs
file in the tests folder, but again, this is something I would like to avoid.
Describe the solution you'd like
I would like to run only the integration tests with e.g. cargo test --integration_tests
.
Notes
Looking into libtest
the enum TestType
seems to already provide the necessary information.
webmstk, cowlicks and iampi31415
Metadata
Metadata
Assignees
Labels
A-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)A-cliArea: Command-line interface, option parsing, etc.Area: Command-line interface, option parsing, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`