Choose release miri for release tests

This commit is contained in:
Oliver Schneider 2017-08-02 18:28:12 +02:00
parent 7e585ef147
commit 40677a5c47

View file

@ -13,11 +13,16 @@ macro_rules! eprintln {
}
}
#[cfg(debug_assertions)]
const MIRI_PATH: &str = "target/debug/miri";
#[cfg(not(debug_assertions))]
const MIRI_PATH: &str = "target/release/miri";
fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: bool) {
eprintln!("## Running compile-fail tests in {} against miri for target {}", path, target);
let mut config = compiletest::default_config();
config.mode = "compile-fail".parse().expect("Invalid mode");
config.rustc_path = "target/debug/miri".into();
config.rustc_path = MIRI_PATH.into();
if fullmir {
if host != target {
// skip fullmir on nonhost
@ -56,7 +61,7 @@ fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) {
config.src_base = PathBuf::from(path);
config.target = target.to_owned();
config.host = host.to_owned();
config.rustc_path = "target/debug/miri".into();
config.rustc_path = MIRI_PATH.into();
let mut flags = Vec::new();
if fullmir {
if host != target {