-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix running bootstrap tests with a local Rust toolchain as the stage0 #126476
Fix running bootstrap tests with a local Rust toolchain as the stage0 #126476
Conversation
r? @onur-ozkan rustbot has assigned @onur-ozkan. Use |
This PR modifies If appropriate, please update |
This comment has been minimized.
This comment has been minimized.
4f30d21
to
fcb6ff5
Compare
@bors r+ rollup |
…rustc, r=onur-ozkan Fix running bootstrap tests with a local Rust toolchain as the stage0 When configuring a local Rust toolchain as the stage0 (with `build.rustc` and `build.cargo` in `config.toml`) we noticed there were test failures (both on the Python and the Rust side) due to bootstrap not being able to find rustc and Cargo. This was due to those two `config.toml` settings not being propagated in the tests. This PR fixes the issue by ensuring rustc and cargo are always configured in tests, using the parent bootstrap's `initial_rustc` and `initial_cargo`.
I suppose this will fix #105766? |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125722 (Indicate in `non_local_defs` lint that the macro needs to change) - rust-lang#125829 (rustc_span: Add conveniences for working with span formats) - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target) - rust-lang#126352 (ci: Update centos:7 to use vault repos) - rust-lang#126354 (Use `Variance` glob imported variants everywhere) - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid) - rust-lang#126472 (build `libcxx-version` only when it doesn't exist) - rust-lang#126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#125722 (Indicate in `non_local_defs` lint that the macro needs to change) - rust-lang#125829 (rustc_span: Add conveniences for working with span formats) - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target) - rust-lang#126352 (ci: Update centos:7 to use vault repos) - rust-lang#126354 (Use `Variance` glob imported variants everywhere) - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid) - rust-lang#126472 (build `libcxx-version` only when it doesn't exist) - rust-lang#126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- I guess |
Seems like it's missing |
Due to the way the paths initial_rustc and initial_cargo were constructed before this commit, they mixed \ and / for path separators and they omitted the .exe suffix. This worked fine up until now, as Windows is capable of handling the mixed path separators and the Command::new API adds the ".exe" suffix if missing from the executable. This resulted in paths that didn't actually exist on disk though, due to the missing .exe suffix. This commit fixes that by adding the .exe suffix to initial_rustc and initial_cargo when --build is Windows.
That failure seems to be caused by I pushed a commit to fix those paths, let's see if it works... @bors try |
Yes! |
…stc, r=<try> Fix running bootstrap tests with a local Rust toolchain as the stage0 When configuring a local Rust toolchain as the stage0 (with `build.rustc` and `build.cargo` in `config.toml`) we noticed there were test failures (both on the Python and the Rust side) due to bootstrap not being able to find rustc and Cargo. This was due to those two `config.toml` settings not being propagated in the tests. This PR fixes the issue by ensuring rustc and cargo are always configured in tests, using the parent bootstrap's `initial_rustc` and `initial_cargo`. try-job: x86_64-msvc Fixes rust-lang#105766
☀️ Try build successful - checks-actions |
@rustbot ready |
@rustbot author Figured out another case that'd need tweaking. |
This comment has been minimized.
This comment has been minimized.
aed27c5
to
b4b2643
Compare
Confirmed this fixes all of the problems with using custom rustc/cargo in an airgapped environment. @rustbot review |
LGTM, thanks! @bors r+ |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0) - rust-lang#127094 (E0191 suggestion correction, inserts turbofish) - rust-lang#127554 ( do not run test where it cannot run) - rust-lang#127564 (Temporarily remove me from review rotation.) - rust-lang#127568 (instantiate higher ranked goals in candidate selection again) - rust-lang#127569 (Fix local download of Docker caches from CI) - rust-lang#127570 ( small normalization improvement) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126476 - ferrocene:pa-bootstrap-test-local-rustc, r=onur-ozkan Fix running bootstrap tests with a local Rust toolchain as the stage0 When configuring a local Rust toolchain as the stage0 (with `build.rustc` and `build.cargo` in `config.toml`) we noticed there were test failures (both on the Python and the Rust side) due to bootstrap not being able to find rustc and Cargo. This was due to those two `config.toml` settings not being propagated in the tests. This PR fixes the issue by ensuring rustc and cargo are always configured in tests, using the parent bootstrap's `initial_rustc` and `initial_cargo`. try-job: x86_64-msvc Fixes rust-lang#105766
When configuring a local Rust toolchain as the stage0 (with
build.rustc
andbuild.cargo
inconfig.toml
) we noticed there were test failures (both on the Python and the Rust side) due to bootstrap not being able to find rustc and Cargo.This was due to those two
config.toml
settings not being propagated in the tests. This PR fixes the issue by ensuring rustc and cargo are always configured in tests, using the parent bootstrap'sinitial_rustc
andinitial_cargo
.try-job: x86_64-msvc
Fixes #105766