Skip to content

CI job for parallel frontend ui tests#158307

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
heinwol:parallel-frontend-CI
Jul 9, 2026
Merged

CI job for parallel frontend ui tests#158307
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
heinwol:parallel-frontend-CI

Conversation

@heinwol

@heinwol heinwol commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

View all comments

Summary

Part of rust-lang/compiler-team#1005.

Supersedes #157705.

Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

  • RUST_TEST_THREADS: max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})
  • --parallel-frontend-threads: 4
  • --iteration-count: 2

Against ./x test tests/ui --stage=2 only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

Additional context

Issues with the previous attempt

The issue with the original change was arguments --parallel-frontend-threads=4 --iteration-count=2 being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like x test tests/ it runs all the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. --skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ... is still not exhaustive list of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in bootstrap::core::builder::Builder for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov


try-job: optional-x86_64-gnu-parallel-frontend

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 23, 2026
@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 23, 2026
@petrochenkov

petrochenkov commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Also, i added ENV RUST_TEST_THREADS=1 just because it was introduced by @ zetanumbers; i'm not sure it's necessary. It ran ok in the previous iteration.

It's added to give threads inside the compiler opportunity to use multiple cores simultaneously, which gives better chance for bugs to occur.
Otherwise compiletest will just occupy the cores by running multiple tests (multiple rustc instances) at the same time.

tests/codegen-llvm \
tests/codegen-units \
-- \
--parallel-frontend-threads=4 --iteration-count=2 \

@petrochenkov petrochenkov Jun 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only tests/ui tests need to be run in this mode.
For non-TestMode::Ui suites --parallel-frontend-threads=4 doesn't do anything anyway, and running ui-fulldeps is just not important enough.

The second run can then --exclude tests/ui.

View changes since the review

@petrochenkov petrochenkov marked this pull request as ready for review June 24, 2026 10:38
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 24, 2026
tests/codegen-llvm \
tests/codegen-units \
-- \
--parallel-frontend-threads=4 --iteration-count=2 \

@petrochenkov petrochenkov Jun 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The N in --iteration-count=N depends on the available CI resources.
The more the better, of course, but right now even one iteration would be acceptable, I think (see "Enabling parallel UI test suite on CI" in rust-lang/compiler-team#1005).
Note that RUST_TEST_THREADS=1 makes things really slow.
I'll leave this for the infra team to decide.

View changes since the review

@jieyouxu jieyouxu Jun 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will rerun the job again to check the time. Generally speaking, I would expect that this test job does not become the slowest job which is generally around 3h 15m.

@petrochenkov

Copy link
Copy Markdown
Contributor

r? @jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned petrochenkov Jun 24, 2026
@heinwol

heinwol commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

It's added to give threads inside the compiler opportunity to use multiple cores simultaneously, which gives better chance for bugs to occur.

Oh, indeed.

Note that RUST_TEST_THREADS=1 makes things really slow.

The more the better, of course, but right now even one iteration would be acceptable, I think

I believe it can all be tweaked with a script though? For instance, we could use something like

$$\texttt{RUST\_TEST\_THREADS} = \texttt{available\_parallelism} / N$$

Which would improve performance drastically. This introduces machine-dependency, but maybe it's not big of an issue here

@heinwol

heinwol commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@petrochenkov could you grant me bors capabilities, please?

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors delegate=try

@rust-bors

rust-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

✌️ @heinwol, you can now perform try builds on this pull request!

Warning

You used the legacy format of the delegate command.
The new format is @bors delegate[=<username>] [<try|review>].

You can now post @bors try to start a try build.

@heinwol

heinwol commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@bors try jobs=optional-x86_64-gnu-parallel-frontend

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 24, 2026
Attempt to run parallel frontend CI


try-job: optional-x86_64-gnu-parallel-frontend
@rust-bors

rust-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 92ec5ac (92ec5ac51762b85c9e9080ac9593442ab95cc150)
Base parent: f28ac76 (f28ac764c36004fa6a6e098d15b4016a838c13c6)

@rust-log-analyzer

This comment has been minimized.

@jieyouxu jieyouxu added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-parallel-compiler Area: parallel compiler and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 25, 2026
* attempt to run parallel CI
* fix `tests/rustdoc-ui/doctest/no-capture.rs` fail

by setting `RUST_TEST_THREADS=1` for ui tests only
* more efficient implementation

There are two limitations though for the thread count to work properly:
  1. The machine is not performing any other tasks
  2. It has only efficiency cores

Anyway, it's up to the infra team to decide if this design is ok
* small adjustments
* fix: make sure `RUST_TEST_THREADS >= 1`
@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔨 5 commits were squashed into 8118399.

@rust-bors rust-bors Bot force-pushed the parallel-frontend-CI branch from 3ed3e7a to 8118399 Compare July 8, 2026 11:56
@jieyouxu

This comment was marked as resolved.

Comment on lines 32 to 34
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs \

@jieyouxu jieyouxu Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: oh, you could probably save some time (e.g. by not having to build rustdocs for this), though this doesn't really matter much compared to impact of RUST_TEST_THREADS I'd expect. So I'd just leave this in.

View changes since the review

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Since this can't block auto CI...
@bors r+ rollup

View changes since this review

@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8118399 has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 8, 2026
@heinwol heinwol changed the title Attempt to run parallel frontend CI CI job for parallel frontend ui tests Jul 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…eyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes rust-lang#157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…eyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes rust-lang#157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…eyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes rust-lang#157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…eyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes rust-lang#157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
rust-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
…uwer

Rollup of 25 pull requests

Successful merges:

 - #158871 (add relnotes for 1.97.0)
 - #158968 (stdarch subtree update)
 - #154445 (rustdoc: Represent `--output-format=json` coverage and ir differently)
 - #156370 (Reject linked dylib EII default overrides)
 - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
 - #158495 (Rename HAS_CT_PROJECTION to HAS_CONST_ALIAS)
 - #158617 (allow mGCA const arguments to fall back to anon consts)
 - #158645 (Fix splat ICEs and ban it in closures)
 - #158655 (Fix coroutine MIR saved local remapping)
 - #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
 - #158912 (Introduce new bootstrap config section for PGO configuration)
 - #158920 (Update wasm-component-ld to 0.5.26)
 - #158926 (wrapping_sh* methods: clarify underspecified reference)
 - #158927 (add core test run with `-Zforce-intrinsic-fallback`)
 - #158932 (Do not build the compiler when invoking `x perf compare`)
 - #158937 (Emit the emscripten entry point as `__main_argc_argv`)
 - #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
 - #156548 ( Library support for aarch64-unknown-linux-pauthtest target)
 - #158307 (CI job for parallel frontend ui tests)
 - #158347 (Improve generic parameters handling for #[diagnostic::on_const])
 - #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
 - #158741 (Simplify `Option::into_flat_iter` signature)
 - #158807 (Add regression test for CString::clone_into unwind safety)
 - #158862 (Fix the span for parameter suggestion )
 - #158883 (tests: fix enum-match.rs to handle LLVM 23)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 8, 2026
…eyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes rust-lang#157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
rust-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
Rollup of 25 pull requests

Successful merges:

 - #158871 (add relnotes for 1.97.0)
 - #158968 (stdarch subtree update)
 - #157690 (codegen_ssa: pack small const aggregates into immediate stores)
 - #158541 (Move `std::io::Write` to `core::io`)
 - #154445 (rustdoc: Represent `--output-format=json` coverage and ir differently)
 - #156370 (Reject linked dylib EII default overrides)
 - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
 - #158495 (Rename HAS_CT_PROJECTION to HAS_CONST_ALIAS)
 - #158617 (allow mGCA const arguments to fall back to anon consts)
 - #158645 (Fix splat ICEs and ban it in closures)
 - #158655 (Fix coroutine MIR saved local remapping)
 - #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
 - #158870 (std: merge the unix-like io::error modules into one file)
 - #158920 (Update wasm-component-ld to 0.5.26)
 - #158926 (wrapping_sh* methods: clarify underspecified reference)
 - #158927 (add core test run with `-Zforce-intrinsic-fallback`)
 - #158932 (Do not build the compiler when invoking `x perf compare`)
 - #158937 (Emit the emscripten entry point as `__main_argc_argv`)
 - #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
 - #156144 (Better docs for PartialEq (includes macro rename))
 - #156548 ( Library support for aarch64-unknown-linux-pauthtest target)
 - #158307 (CI job for parallel frontend ui tests)
 - #158347 (Improve generic parameters handling for #[diagnostic::on_const])
 - #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
 - #158741 (Simplify `Option::into_flat_iter` signature)
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 9, 2026
…eyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes rust-lang#157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
rust-bors Bot pushed a commit that referenced this pull request Jul 9, 2026
Rollup of 23 pull requests

Successful merges:

 - #158968 (stdarch subtree update)
 - #154445 (rustdoc: Represent `--output-format=json` coverage and ir differently)
 - #158495 (Rename HAS_CT_PROJECTION to HAS_CONST_ALIAS)
 - #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
 - #158870 (std: merge the unix-like io::error modules into one file)
 - #158920 (Update wasm-component-ld to 0.5.26)
 - #158926 (wrapping_sh* methods: clarify underspecified reference)
 - #158927 (add core test run with `-Zforce-intrinsic-fallback`)
 - #158932 (Do not build the compiler when invoking `x perf compare`)
 - #158937 (Emit the emscripten entry point as `__main_argc_argv`)
 - #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
 - #156144 (Better docs for PartialEq (includes macro rename))
 - #156548 ( Library support for aarch64-unknown-linux-pauthtest target)
 - #157995 (`Vec::dedup_by` docs explicit function argument order)
 - #158307 (CI job for parallel frontend ui tests)
 - #158741 (Simplify `Option::into_flat_iter` signature)
 - #158807 (Add regression test for CString::clone_into unwind safety)
 - #158862 (Fix the span for parameter suggestion )
 - #158894 (Make the ordering of non-terminal binds in ambiguity error messages deterministic)
 - #158902 (add codegen test for range length bound propagation)
 - #158913 (Update `browser-ui-test` version to `0.24.1`)
 - #158935 (std: support real fd methods on Emscripten)
 - #158978 (Add regression test for too-big by-value ABI args)
@rust-bors rust-bors Bot merged commit 2ece4d4 into rust-lang:main Jul 9, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 9, 2026
rust-timer added a commit that referenced this pull request Jul 9, 2026
Rollup merge of #158307 - heinwol:parallel-frontend-CI, r=jieyouxu

CI job for parallel frontend ui tests

## Summary

Part of rust-lang/compiler-team#1005.

Supersedes #157705.

### Initial setup in this PR

For the initial setup in this PR, we'll go ahead with the following combination:

- `RUST_TEST_THREADS`: `max(1, $(nproc) // ${PARALLEL_FRONTEND_THREADS})`
- `--parallel-frontend-threads`: **4**
- `--iteration-count`: **2**

Against `./x test tests/ui --stage=2` only. We can tune these knobs in follow-ups. In try jobs we ran, this should not exceed the current longest auto job duration (at around 3h 15m).

## Additional context

### Issues with the previous attempt

The issue with the original change was arguments `--parallel-frontend-threads=4 --iteration-count=2` being compiletest-only. They were being passed to other parts of the test harness (e.g. libtest) as is. These parts, however, have no clue of the arguments, hence the errors.

I've spent a lot of time on this and haven't found any reasonable way to fix this behavior. We could make bootstrap aware of these specific two arguments and have an additional internal logic for handling this. It's big of a hack, i reckon. The best decision i arrived at is to split testing into two parts: one for compiletest only and another for everything else. The issue is (AFAIK) we can't tell bootstrap (or x.py, at least) to "test the default stuff, but only for compiletest". When used like `x test tests/` it runs _all_ the tests in this directory, including non-default ones, and crashes as it can't find nodejs for doctests. `--skip compiler/ --skip library/ --skip src/tools/ --skip tests/incremental ...` is still not exhaustive list  of exclusions.

I went on with a whitelist instead of a blacklist. But we, again, can't tell what tests are "default". There's a mechanism in [bootstrap::core::builder::Builder](https://doc.rust-lang.org/nightly/nightly-rustc/bootstrap/core/builder/struct.Builder.html#structfield.log_cli_step_for_tests) for showing "dry-run" test suites, but it's not available from the cli. For now, my whitelist is quite small and i have no idea what should it be like.

r? @petrochenkov

---

try-job: optional-x86_64-gnu-parallel-frontend
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jul 10, 2026
Rollup of 23 pull requests

Successful merges:

 - rust-lang/rust#158968 (stdarch subtree update)
 - rust-lang/rust#154445 (rustdoc: Represent `--output-format=json` coverage and ir differently)
 - rust-lang/rust#158495 (Rename HAS_CT_PROJECTION to HAS_CONST_ALIAS)
 - rust-lang/rust#158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
 - rust-lang/rust#158870 (std: merge the unix-like io::error modules into one file)
 - rust-lang/rust#158920 (Update wasm-component-ld to 0.5.26)
 - rust-lang/rust#158926 (wrapping_sh* methods: clarify underspecified reference)
 - rust-lang/rust#158927 (add core test run with `-Zforce-intrinsic-fallback`)
 - rust-lang/rust#158932 (Do not build the compiler when invoking `x perf compare`)
 - rust-lang/rust#158937 (Emit the emscripten entry point as `__main_argc_argv`)
 - rust-lang/rust#151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
 - rust-lang/rust#156144 (Better docs for PartialEq (includes macro rename))
 - rust-lang/rust#156548 ( Library support for aarch64-unknown-linux-pauthtest target)
 - rust-lang/rust#157995 (`Vec::dedup_by` docs explicit function argument order)
 - rust-lang/rust#158307 (CI job for parallel frontend ui tests)
 - rust-lang/rust#158741 (Simplify `Option::into_flat_iter` signature)
 - rust-lang/rust#158807 (Add regression test for CString::clone_into unwind safety)
 - rust-lang/rust#158862 (Fix the span for parameter suggestion )
 - rust-lang/rust#158894 (Make the ordering of non-terminal binds in ambiguity error messages deterministic)
 - rust-lang/rust#158902 (add codegen test for range length bound propagation)
 - rust-lang/rust#158913 (Update `browser-ui-test` version to `0.24.1`)
 - rust-lang/rust#158935 (std: support real fd methods on Emscripten)
 - rust-lang/rust#158978 (Add regression test for too-big by-value ABI args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-parallel-compiler Area: parallel compiler A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants