Rollup merge of #89082 - smoelius:master, r=kennytm
Implement #85440 (Random test ordering)
This PR adds `--shuffle` and `--shuffle-seed` options to `libtest`. The options are similar to the [`-shuffle` option](c894b442d1/src/testing/testing.go (L1482-L1499)) that was recently added to Go.
Here are the relevant parts of the help message:
```
--shuffle Run tests in random order
--shuffle-seed SEED
Run tests in random order; seed the random number
generator with SEED
...
By default, the tests are run in alphabetical order. Use --shuffle or set
RUST_TEST_SHUFFLE to run the tests in random order. Pass the generated
"shuffle seed" to --shuffle-seed (or set RUST_TEST_SHUFFLE_SEED) to run the
tests in the same order again. Note that --shuffle and --shuffle-seed do not
affect whether the tests are run in parallel.
```
Is an RFC needed for this?
This commit is contained in:
commit
37f17bca7c
14 changed files with 313 additions and 40 deletions
|
|
@ -506,6 +506,8 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
|
|||
Err(_) => false,
|
||||
},
|
||||
color: config.color,
|
||||
shuffle: false,
|
||||
shuffle_seed: None,
|
||||
test_threads: None,
|
||||
skip: vec![],
|
||||
list: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue