Skip to content

Commit

Permalink
Rollup merge of #122257 - Nadrieril:tweak-mir-opt-tests, r=clubby789
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Mar 10, 2024
2 parents 513ec6c + 047e17d commit 82779e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ impl Step for MirOpt {
})
};

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

0 comments on commit 82779e2

Please sign in to comment.