File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,26 @@ degree documented below):
225
225
reduced feature set. We might ship Miri with a nightly even when some features
226
226
on these targets regress.
227
227
228
+ # ## Running tests in parallel
229
+
230
+ Though it implements Rust threading, Miri itself is a single-threaded interpreter.
231
+ This means that when running `cargo miri test`, you will probably see a dramatic
232
+ increase in the amount of time it takes to run your whole test suite due to the
233
+ inherent interpreter slowdown and a loss of parallelism.
234
+
235
+ You can get your test suite's parallelism back by running `cargo miri nextest run -jN`
236
+ (note that you will need [`cargo-nextest`](https://nexte.st) installed).
237
+ This works because `cargo-nextest` collects a list of all tests then launches a
238
+ separate `cargo miri run` for each test. You will need to specify a `-j` or `--test-threads`;
239
+ by default `cargo miri nextest run` runs one test at a time. For more details, see the
240
+ [`cargo-nextest` Miri documentation](https://nexte.st/book/miri.html).
241
+
242
+ Note : This one-test-per-process model means that `cargo miri test` is able to detect data
243
+ races where two tests race on a shared resource, but `cargo miri nextest run` will not detect
244
+ such races.
245
+
246
+ Note : ` cargo-nextest` does not support doctests, see https://github.com/nextest-rs/nextest/issues/16
247
+
228
248
# ## Common Problems
229
249
230
250
When using the above instructions, you may encounter a number of confusing compiler
You can’t perform that action at this time.
0 commit comments