Skip to content

Commit

Permalink
avoid issues due to MIRI_TEST_TARGET being set from the outside
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jan 11, 2025
1 parent fe9bc05 commit b938ad5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,10 @@ impl Command {
if bless {
e.sh.set_var("RUSTC_BLESS", "Gesundheit");
}
if e.sh.var("MIRI_TEST_TARGET").is_ok() {
// Avoid trouble due to an incorrectly set env var.
bail!("MIRI_TEST_TARGET must not be set when invoking `./miri test`");
}
if let Some(target) = target {
// Tell the harness which target to test.
e.sh.set_var("MIRI_TEST_TARGET", target);
Expand Down

0 comments on commit b938ad5

Please sign in to comment.