Skip to content

Commit 82779e2

Browse files
authored
Rollup merge of rust-lang#122257 - Nadrieril:tweak-mir-opt-tests, r=clubby789
mir-opt tests: don't run a different set on --bless; enable --keep-stage-std Currently, `./x.py test tests/mir-opt` runs only the tests for the current target, and `./x.py test tests/mir-opt --bless` runs tests for a representative set of targets. I find this confusing and not what I want: for one I never run tests without `--bless` because I prefer to look at a git diff. What I however like to do is pass `--keep-stage-std` when I'm working on the compiler; this doesn't work today with `--bless` because it tries a bunch of targets for which I don't have a built std. In this PR, I make it so `./x.py test tests/mir-opt` runs the same set of tests regardless of `--bless`. By default it runs a representative sample of targets, and if `--keep-stage-std` is set it only runs tests for the current target.
2 parents 513ec6c + 047e17d commit 82779e2

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

Diff for: src/bootstrap/src/core/build_steps/test.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ impl Step for MirOpt {
15491549
})
15501550
};
15511551

1552-
if builder.config.cmd.bless() {
1552+
if builder.config.keep_stage_std.is_empty() {
15531553
// All that we really need to do is cover all combinations of 32/64-bit and unwind/abort,
15541554
// but while we're at it we might as well flex our cross-compilation support. This
15551555
// selection covers all our tier 1 operating systems and architectures using only tier
@@ -1568,6 +1568,7 @@ impl Step for MirOpt {
15681568
run(panic_abort_target);
15691569
}
15701570
} else {
1571+
// If we're keeping a std stage, only run tests for this target.
15711572
run(self.target);
15721573
}
15731574
}

0 commit comments

Comments
 (0)