about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel E. Moelius III <sam@moeli.us>2021-10-04 18:53:22 -0400
committerSamuel E. Moelius III <sam@moeli.us>2021-10-04 20:58:35 -0400
commite16e15f3aec7437181080b8a5025b42a26436565 (patch)
treeefbcf9569a34c370fcf48f8648e64883a909ba42 /src
parent32b6ac5b44e4f0ffa5e56b9c81407633dc4edb64 (diff)
downloadrust-e16e15f3aec7437181080b8a5025b42a26436565.tar.gz
rust-e16e15f3aec7437181080b8a5025b42a26436565.zip
Add documentation
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustc/src/tests/index.md34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/doc/rustc/src/tests/index.md b/src/doc/rustc/src/tests/index.md
index ec23d4fe0db..2681105b468 100644
--- a/src/doc/rustc/src/tests/index.md
+++ b/src/doc/rustc/src/tests/index.md
@@ -181,6 +181,38 @@ unstable-options` flag. See [tracking issue
 #64888](https://github.com/rust-lang/rust/issues/64888) and the [unstable
 docs](../../unstable-book/compiler-flags/report-time.html) for more information.
 
+#### `--shuffle`
+
+Runs the tests in random order, as opposed to the default alphabetical order.
+
+This may also be specified by setting the `RUST_TEST_SHUFFLE` environment
+variable to anything but `0`.
+
+The random number generator seed that is output can be passed to
+[`--shuffle-seed`](#--shuffle-seed-seed) to run the tests in the same order
+again.
+
+Note that `--shuffle` does not affect whether the tests are run in parallel. To
+run the tests in random order sequentially, use `--shuffle --test-threads 1`.
+
+⚠️ 🚧 This option is [unstable](#unstable-options), and requires the `-Z
+unstable-options` flag.
+
+#### `--shuffle-seed` _SEED_
+
+Like [`--shuffle`](#--shuffle), but seeds the random number generator with
+_SEED_. Thus, calling the test harness with `--shuffle-seed` _SEED_ twice runs
+the tests in the same order both times.
+
+_SEED_ is any 64-bit unsigned integer, for example, one produced by
+[`--shuffle`](#--shuffle).
+
+This can also be specified with the `RUST_TEST_SHUFFLE_SEED` environment
+variable.
+
+⚠️ 🚧 This option is [unstable](#unstable-options), and requires the `-Z
+unstable-options` flag.
+
 ### Output options
 
 The following options affect the output behavior.
@@ -197,7 +229,7 @@ to the console. Usually the output is captured, and only displayed if the test
 fails.
 
 This may also be specified by setting the `RUST_TEST_NOCAPTURE` environment
-variable set to anything but `0`.
+variable to anything but `0`.
 
 #### `--show-output`