about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-25 22:32:48 +0200
committerJakub Beránek <berykubik@gmail.com>2025-07-25 22:32:48 +0200
commit3dac888c866ad76e43e6e7fa664805e009570eb4 (patch)
tree4f7c9d397b0ee20cae11d7cf75097c2cc22f84d5
parenta955f1cd09a027363729ceed919952d09f76f28e (diff)
downloadrust-3dac888c866ad76e43e6e7fa664805e009570eb4.tar.gz
rust-3dac888c866ad76e43e6e7fa664805e009570eb4.zip
Only run bootstrap tests in `x test` on CI
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index ebbb569e9db..0f9268097d7 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -3132,7 +3132,11 @@ impl Step for Bootstrap {
     }
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.path("src/bootstrap")
+        // Bootstrap tests might not be perfectly self-contained and can depend on the external
+        // environment, submodules that are checked out, etc.
+        // Therefore we only run them by default on CI.
+        let runs_on_ci = run.builder.config.is_running_on_ci;
+        run.path("src/bootstrap").default_condition(runs_on_ci)
     }
 
     fn make_run(run: RunConfig<'_>) {