]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #89082 - smoelius:master, r=kennytm
authorJubilee <46493976+workingjubilee@users.noreply.github.com>
Fri, 8 Oct 2021 03:26:12 +0000 (20:26 -0700)
committerGitHub <noreply@github.com>
Fri, 8 Oct 2021 03:26:12 +0000 (20:26 -0700)
commit37f17bca7ccca0b393a58c87bb87bac18f371f61
tree23c2653b0ede7c0e6fd0b49687219a138ab13796
parent6c17601a2e6fa55e5d2ec7284359bee931c0c61a
parentecf474152350664f1227421eeb278b2e8185cd07
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](https://github.com/golang/go/blob/c894b442d1e5e150ad33fa3ce13dbfab1c037b3a/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?
library/test/src/formatters/junit.rs
library/test/src/lib.rs
src/doc/rustc/src/tests/index.md
src/tools/compiletest/src/main.rs