compiletest::run_tests(&config);
}
-/// Ensures that the `MIRI_SYSROOT` env var is set.
-fn set_sysroot() {
- if std::env::var("MIRI_SYSROOT").is_ok() {
- // Nothing to do.
- return;
- }
- let sysroot = std::process::Command::new("rustc")
- .arg("--print")
- .arg("sysroot")
- .output()
- .expect("rustc not found")
- .stdout;
- let sysroot = String::from_utf8(sysroot).expect("sysroot is not utf8");
- std::env::set_var("MIRI_SYSROOT", sysroot.trim());
-}
-
fn get_host() -> String {
let rustc = rustc_test_suite().unwrap_or(PathBuf::from("rustc"));
let rustc_version = std::process::Command::new(rustc)
}
fn test_runner(_tests: &[&()]) {
- set_sysroot();
-
run_pass_miri(false);
run_pass_miri(true);