cargo-miri: allow overwriting miri command, and make that consistent with compiletest
This commit is contained in:
parent
35964b10b0
commit
ac454a2485
@ -94,6 +94,9 @@ fn get_arg_flag_value(name: &str) -> Option<String> {
|
||||
|
||||
/// Returns the path to the `miri` binary
|
||||
fn find_miri() -> PathBuf {
|
||||
if let Some(path) = env::var_os("MIRI") {
|
||||
return path.into();
|
||||
}
|
||||
let mut path = std::env::current_exe().expect("current executable path invalid");
|
||||
path.set_file_name("miri");
|
||||
path
|
||||
|
@ -9,7 +9,7 @@ use colored::*;
|
||||
use compiletest_rs as compiletest;
|
||||
|
||||
fn miri_path() -> PathBuf {
|
||||
PathBuf::from(option_env!("MIRI_PATH").unwrap_or(env!("CARGO_BIN_EXE_miri")))
|
||||
PathBuf::from(option_env!("MIRI").unwrap_or(env!("CARGO_BIN_EXE_miri")))
|
||||
}
|
||||
|
||||
fn run_tests(mode: &str, path: &str, target: &str) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user