about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-17 08:23:26 +0100
committerGitHub <noreply@github.com>2024-03-17 08:23:26 +0100
commitea0745604f1ff03f97e61af234bd56ffb193ea07 (patch)
tree2d4cd6c5cecbfe69e859eba04b334235c3e4939f /src
parenta5dbdc2fa91adf9e4aeaa4c8a1ca187dba6d9024 (diff)
parent222bdad7336f5a694fc5b390054ac3036e150e20 (diff)
downloadrust-ea0745604f1ff03f97e61af234bd56ffb193ea07.tar.gz
rust-ea0745604f1ff03f97e61af234bd56ffb193ea07.zip
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``
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 690e20fb6b9..6d3163b90b1 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -1548,6 +1548,10 @@ impl Step for MirOpt {
             })
         };
 
+        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 @@ impl Step for MirOpt {
                 });
                 run(panic_abort_target);
             }
-        } else {
-            run(self.target);
         }
     }
 }