Skip to content

Commit 67d1357

Browse files
committed
Move test env var to test_runner
1 parent 666cd22 commit 67d1357

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/bin/miri-rustc-tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
6666
}
6767
tcx.hir().krate().visit_all_item_likes(&mut Visitor(tcx));
6868
} else if let Some((entry_def_id, _)) = tcx.entry_fn(LOCAL_CRATE) {
69-
7069
let config = MiriConfig {
7170
validate: true,
7271
communicate: false,

tests/compiletest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ fn run_tests(mode: &str, path: &str, target: &str, mut flags: Vec<String>) {
3737
flags.push(format!("--sysroot {}", sysroot));
3838
}
3939

40-
// Add a test env var to do environment communication tests
41-
std::env::set_var("MIRI_ENV_VAR_TEST", "0");
42-
4340
// The rest of the configuration.
4441
let mut config = compiletest::Config::default().tempdir();
4542
config.mode = mode.parse().expect("Invalid mode");
@@ -126,6 +123,9 @@ fn compile_fail_miri(opt: bool) {
126123
}
127124

128125
fn test_runner(_tests: &[&()]) {
126+
// Add a test env var to do environment communication tests
127+
std::env::set_var("MIRI_ENV_VAR_TEST", "0");
128+
129129
run_pass_miri(false);
130130
run_pass_miri(true);
131131

0 commit comments

Comments
 (0)