-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Describe the problem you are trying to solve
Sometimes tests depend on each other and one of the possible counter measures is to shuffle the order in which tests are run.
Describe the solution you'd like
I would like cargo test
to take a --random
flag, which would shuffle the test order. Ideally it would generate and print the seed used (a u64 integer). This could be used to debug situations, maybe with a corresponding --random-seed <seed>
parameter (which would imply --random
).
Notes
I had a look at the codebase and I think I identified the place where the sorting currently happens (https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_test.rs#L67). I'd be happy to try to contribute a PR.
Metadata
Metadata
Assignees
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Projects
Status
No status