Skip to content

Commit 4221765

Browse files
committed
avoid issues due to MIRI_TEST_TARGET being set from the outside
1 parent ce5c691 commit 4221765

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tools/miri/miri-script/src/commands.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ impl Command {
564564
if bless {
565565
e.sh.set_var("RUSTC_BLESS", "Gesundheit");
566566
}
567+
if e.sh.var("MIRI_TEST_TARGET").is_ok() {
568+
// Avoid trouble due to an incorrectly set env var.
569+
bail!("MIRI_TEST_TARGET must not be set when invoking `./miri test`");
570+
}
567571
if let Some(target) = target {
568572
// Tell the harness which target to test.
569573
e.sh.set_var("MIRI_TEST_TARGET", target);

0 commit comments

Comments
 (0)