From 6c3a86b73b6ce93f392768f5cdc9da9bd6283b32 Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Wed, 20 Aug 2025 20:42:08 +0200 Subject: Do not run `lint-docs` tests in stage 1 `x test` by default --- src/bootstrap/src/core/build_steps/test.rs | 9 ++++++--- src/bootstrap/src/core/builder/tests.rs | 10 +++++----- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 3938c640321..97db9bf536f 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1848,12 +1848,15 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the let is_rustdoc = suite == "rustdoc-ui" || suite == "rustdoc-js"; if mode == "run-make" { - let cargo_path = if builder.top_stage == 0 { + let cargo_path = if test_compiler.stage == 0 { // If we're using `--stage 0`, we should provide the bootstrap cargo. builder.initial_cargo.clone() } else { builder - .ensure(tool::Cargo::from_build_compiler(test_compiler, test_compiler.host)) + .ensure(tool::Cargo::from_build_compiler( + builder.compiler(test_compiler.stage - 1, test_compiler.host), + test_compiler.host, + )) .tool_path }; @@ -1902,7 +1905,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the // When top stage is 0, that means that we're testing an externally provided compiler. // In that case we need to use its specific sysroot for tests to pass. - let sysroot = if builder.top_stage == 0 { + let sysroot = if test_compiler.stage == 0 { builder.initial_sysroot.clone() } else { builder.sysroot(test_compiler) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index e6cf34ed499..ef01f14f5e9 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -2124,7 +2124,7 @@ mod snapshot { [build] rustc 0 -> HtmlChecker 1 [test] html-check [build] rustc 0 -> RunMakeSupport 1 - [build] rustc 1 -> cargo 2 + [build] rustc 0 -> cargo 1 [test] compiletest-run-make 1 "); } @@ -2143,7 +2143,7 @@ mod snapshot { [test] compiletest-ui 1 [test] compiletest-ui-fulldeps 1 [build] rustc 0 -> RunMakeSupport 1 - [build] rustc 1 -> cargo 2 + [build] rustc 0 -> cargo 1 [build] rustdoc 1 [test] compiletest-run-make 1 [test] compiletest-rustdoc 1 @@ -2172,7 +2172,7 @@ mod snapshot { [build] rustc 2 -> rustc 3 [test] compiletest-ui-fulldeps 2 [build] rustc 0 -> RunMakeSupport 1 - [build] rustc 2 -> cargo 3 + [build] rustc 1 -> cargo 2 [build] rustdoc 2 [test] compiletest-run-make 2 [test] compiletest-rustdoc 2 @@ -2206,7 +2206,7 @@ mod snapshot { [build] rustc 2 -> rustc 3 [test] compiletest-ui-fulldeps 2 [build] rustc 0 -> RunMakeSupport 1 - [build] rustc 2 -> cargo 3 + [build] rustc 1 -> cargo 2 [build] rustdoc 2 [test] compiletest-run-make 2 [test] compiletest-rustdoc 2 @@ -2301,7 +2301,7 @@ mod snapshot { [build] rustc 0 -> HtmlChecker 1 [test] html-check [build] rustc 0 -> RunMakeSupport 1 - [build] rustc 2 -> cargo 3 + [build] rustc 1 -> cargo 2 [test] compiletest-run-make 2 "); } -- cgit 1.4.1-3-g733a5