Skip to content

Commit 72cd133

Browse files
committed
compiletest can just propagate MIRI_SYSROOT from the outside
1 parent 0e4f963 commit 72cd133

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tests/compiletest.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,6 @@ fn miri_pass(path: &str, target: &str, opt: bool) {
8787
compiletest::run_tests(&config);
8888
}
8989

90-
/// Ensures that the `MIRI_SYSROOT` env var is set.
91-
fn set_sysroot() {
92-
if std::env::var("MIRI_SYSROOT").is_ok() {
93-
// Nothing to do.
94-
return;
95-
}
96-
let sysroot = std::process::Command::new("rustc")
97-
.arg("--print")
98-
.arg("sysroot")
99-
.output()
100-
.expect("rustc not found")
101-
.stdout;
102-
let sysroot = String::from_utf8(sysroot).expect("sysroot is not utf8");
103-
std::env::set_var("MIRI_SYSROOT", sysroot.trim());
104-
}
105-
10690
fn get_host() -> String {
10791
let rustc = rustc_test_suite().unwrap_or(PathBuf::from("rustc"));
10892
let rustc_version = std::process::Command::new(rustc)
@@ -129,8 +113,6 @@ fn compile_fail_miri(opt: bool) {
129113
}
130114

131115
fn test_runner(_tests: &[&()]) {
132-
set_sysroot();
133-
134116
run_pass_miri(false);
135117
run_pass_miri(true);
136118

0 commit comments

Comments
 (0)