Skip to content

Commit

Permalink
Unrolled build for rust-lang#122295
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#122292
cc ``@RalfJung``
  • Loading branch information
rust-timer committed Mar 17, 2024
2 parents 1eb882e + 222bdad commit a97837a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -1566,8 +1570,6 @@ impl Step for MirOpt {
});
run(panic_abort_target);
}
} else {
run(self.target);
}
}
}
Expand Down

0 comments on commit a97837a

Please sign in to comment.