Rollup merge of #122295 - Nadrieril:mir-opt-run-current-target, r=Mark-Simulacrum

mir-opt: always run tests for the current target

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. That representative set does not include the current target however, which means `--bless` can succeed when tests fail without it. This PR ensures we run the current target always.

Fixes https://github.com/rust-lang/rust/issues/122292
cc ``@RalfJung``
This commit is contained in:
Matthias Krüger 2024-03-17 08:23:26 +01:00 committed by GitHub
commit ea0745604f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1548,6 +1548,10 @@ fn run(self, builder: &Builder<'_>) {
})
};
run(self.target);
// Run more targets with `--bless`. But we always run the host target first, since some
// tests use very specific `only` clauses that are not covered by the target set below.
if builder.config.cmd.bless() {
// 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
@ -1566,8 +1570,6 @@ fn run(self, builder: &Builder<'_>) {
});
run(panic_abort_target);
}
} else {
run(self.target);
}
}
}