Closed
Description
Summary
The test ci_rustc_if_unchanged_logic
fails if you are working on a branch that has any changes to library or compiler with:
---- core::builder::tests::ci_rustc_if_unchanged_logic stdout ----
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
Building stage2 library artifacts (x86_64-unknown-linux-gnu)
thread 'core::builder::tests::ci_rustc_if_unchanged_logic' panicked at src/bootstrap/src/core/builder/tests.rs:267:9:
CI-rustc can't be used with 'if-unchanged' while there are changes in compiler and/or library.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
core::builder::tests::ci_rustc_if_unchanged_logic
This makes it difficult to run tests locally. For example, running the x86_64-gnu
docker image fails with this message.
I'm not entirely clear how this test works in CI, but it would be helpful if it didn't fail for local testing.
Command used
./x test bootstrap
or
cargo run --manifest-path src/ci/citool/Cargo.toml run-local x86_64-gnu
Expected behaviour
Command should pass.
Actual behaviour
Test fails.
Bootstrap configuration (config.toml)
No config (use all defaults), or use the config in the x86_64-gnu image.
Operating system
Any
Activity
onur-ozkan commentedon Mar 8, 2025
The error message is pretty clear and it should never trigger when you have changes on compiler or library tree. I tried to reproduce it by adding dummy commit on compiler tree but
x test bootstrap
still did not fail.ehuss commentedon Mar 8, 2025
Hm, the following exact steps fail for me:
Does that not fail for you?
onur-ozkan commentedon Mar 8, 2025
That failed, yeah. I think the reason is that we allow using ci-rustc in non-CI environments when the library changes but the compiler doesn't (to make library development easier). I will stabilize the test and send a fix PR in couple minutes.
ci_rustc_if_unchanged_logic
test for local environments #138245onur-ozkan commentedon Mar 8, 2025
If you can confirm that #138245 fixes this issue, that would be great.
ehuss commentedon Mar 8, 2025
Yea, that works, thanks!
Rollup merge of rust-lang#138245 - onur-ozkan:ci-rustc-test-fix, r=ji…
Rollup merge of rust-lang#138245 - onur-ozkan:ci-rustc-test-fix, r=ji…
Rollup merge of rust-lang#138245 - onur-ozkan:ci-rustc-test-fix, r=ji…
Rollup merge of rust-lang#138245 - onur-ozkan:ci-rustc-test-fix, r=ji…
3 remaining items