You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#153801 - ywxt:parallel-test, r=petrochenkov
Add the option to run UI tests with the parallel frontend
This PR adds two arguments for tests:
1. `--parallel-frontend-threads`: specify `-Zthread` to compile test case (currently UI tests only)
2. `--iteration-count`: the number of times to run each test
Also, due to the non-deterministic diagnostic orders and cycle errors, this PR adds the directive `//@ ignore-parallel-frontend` to ignore tests with cycle error when the parallel-frontend is enabled (by `--parallel-frontend-threads`) and enables `//@ compare-output-by-lines` by default.
Context: [#t-compiler/parallel-rustc > Add the parallel front-end test suite @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fparallel-rustc/topic/Add.20the.20parallel.20front-end.20test.20suite/near/578781369)
This PR should work with rust-lang#153797 together.
Copy file name to clipboardExpand all lines: src/doc/rustc-dev-guide/src/tests/compiletest.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -836,3 +836,20 @@ In CI, compare modes are only used in one Linux builder, and only with the follo
836
836
Note that compare modes are separate to [revisions](#revisions).
837
837
All revisions are tested when running `./x test tests/ui`, however compare-modes must be
838
838
manually run individually via the `--compare-mode` flag.
839
+
840
+
## Parallel frontend
841
+
842
+
Compiletest can be run with the `--parallel-frontend-threads` flag to run the compiler in parallel mode.
843
+
This can be used to check that the compiler produces the same output in parallel mode as in non-parallel mode, and to check for any issues that might arise in parallel mode.
844
+
845
+
To run the tests in parallel mode, you need to pass the `--parallel-frontend-threads` CLI flag:
846
+
847
+
```bash
848
+
./x test tests/ui -- --parallel-frontend-threads=N --iteration-count=M
849
+
```
850
+
851
+
Where `N` is the number of threads to use for the parallel frontend, and `M` is the number of times to run each test in parallel mode (to increase the chances of catching any non-determinism).
852
+
853
+
Also, when running with `--parallel-frontend-threads`, the `compare-output-by-lines` directive would be implied for all tests, since the output from the parallel frontend can be non-deterministic in terms of the order of lines.
854
+
855
+
The parallel frontend is available in UI tests only at the moment, and is not currently supported in other test suites.
0 commit comments