Skip to content

Commit 9878ffa

Browse files
committed
update readme
1 parent 8cb792b commit 9878ffa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@ Every night, a Travis cron job runs the tests against the latest nightly, to mak
77
To run the tests yourself, make sure you have Miri installed (`rustup component add miri`) and then run:
88

99
```shell
10-
./run-test.sh core
11-
./run-test.sh alloc
10+
./run-test.sh core --all-targets
11+
./run-test.sh alloc --all-targets
1212
```
1313

1414
This will run the test suite of the standard library of your current toolchain.
15+
`--all-targets` means that doc tests are skipped; those should use separate Miri flags as there are some (expected) memory leaks.
1516
If you are working on the standard library and want to check that the tests pass with your modifications, set `RUST_SRC` to the checkout you are working in:
1617

1718
```shell
18-
RUST_SRC=~/path/to/rustc ./run-test.sh core
19+
RUST_SRC=~/path/to/rustc ./run-test.sh core --all-targets
1920
```
2021

2122
Here, `~/path/to/rustc` should be the directory containing `x.py`.
2223
Then the test suite will be compiled from the standard library in that directory.
2324
Make sure that is as close to your rustup default toolchain as possible, as the toolchain will still be used to build that standard library and its test suite.
2425

25-
`run-test` also accepts parameters that are passed to Miri and the test runner:
26+
`run-test` also accepts parameters that are passed to `cargo test` and the test runner,
27+
and `MIRIFLAGS` can be used as usual to pass parameters to Miri:
2628

2729
```shell
28-
./run-test.sh alloc -Zmiri-flags -- test-params
30+
MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-disable-isolation" ./run-test.sh alloc --doc -- --skip vec
2931
```
3032

3133
If you want to know how long each test took to execute, add `2>&1 | ts -m -i '%.s '` to the end of the command.

0 commit comments

Comments
 (0)