Skip to content

Commit 5d21a05

Browse files
authored
Rollup merge of rust-lang#144464 - Kobzol:x-test-default, r=jieyouxu
Only run bootstrap tests in `x test` on CI Discussed at https://rust-lang.zulipchat.com/#narrow/channel/122652-new-members/topic/Linux.20Distribution/with/530839642. The bootstrap tests can be sensitive of the environment where they are executed. And now that they are executed very early in the test pipeline, it can be annoying for people who just try to do `x test` when it fails on bootstrap tests. We could move the bootstrap tests back to the end of the `x test` pipeline, but then it would just fail later. I'd prefer to only run them on CI by default. Fixes: rust-lang#143973
2 parents 33c32fe + 3dac888 commit 5d21a05

File tree

1 file changed

+5
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+5
-1
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3132,7 +3132,11 @@ impl Step for Bootstrap {
31323132
}
31333133

31343134
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
3135-
run.path("src/bootstrap")
3135+
// Bootstrap tests might not be perfectly self-contained and can depend on the external
3136+
// environment, submodules that are checked out, etc.
3137+
// Therefore we only run them by default on CI.
3138+
let runs_on_ci = run.builder.config.is_running_on_ci;
3139+
run.path("src/bootstrap").default_condition(runs_on_ci)
31363140
}
31373141

31383142
fn make_run(run: RunConfig<'_>) {

0 commit comments

Comments
 (0)