opt-dist: propagate channel info to bootstrap #134528
Open
+19
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #133503.
Previously,
tests/ui/bootstrap/rustc_bootstap.rs
[sic] failed during beta bump in opt-dist tests. This is because:opt-dist
tried to run./x test
against beta-channel distrustc
throughbootstrap
.rustc
which correctly thinks that it is a beta compiler based onsrc/ci/channel
info.opt-dist
tries to run./x test
on the betarustc
from the dist build, but without specifying channel through a syntheticconfig.toml
, sobootstrap
tellscompiletest
that we're on thenightly
channel (by default).compiletest
believes therustc
under test is a nightly rustc, but therustc
under test actually considers itself a beta rustc. This means that//@ only-nightly
will be satisfied yet the test will fail as the beta rustc is not a nightly rustc.This PR:
tests/ui/bootstrap/rustc_bootstap.rs
fails in post-PGO/opt-dist tests #133503) by havingopt-dist
faithfully report the channel of the distrustc
being tested (i.e. "beta" in a beta bump PR). This will properly make the test be ignored during beta bump as therustc
under test is not a nightly rustc.rustc_bootstap.rs
->rustc_bootstrap.rs
. No more stapping.I ran a try-job against the beta branch (explicitly running the opt-dist tests by modifying the job definition) with these changes in #134131, and it appears that the try-job was successful. The two commits in this PR are cherry-picked from #134131, with the test commit slightly modified (to also adjust the test comments).
r? @Kobzol (or compiler or bootstrap or infra I guess?)