From ac80212f7e973ccd57ed41137e2ec38db6fbde1f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 25 Aug 2017 19:21:10 +0200 Subject: [PATCH] move tests with MIR-opt to their own function we we can run them separately --- tests/compiletest.rs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/compiletest.rs b/tests/compiletest.rs index 5ceb60de638..35c5e82803f 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -174,17 +174,24 @@ fn get_host() -> String { String::from(host) } -#[test] -fn run_pass_miri() { +fn run_pass_miri(opt: bool) { let sysroot = get_sysroot(); let host = get_host(); - for &opt in [false, true].iter() { - for_all_targets(&sysroot, |target| { - miri_pass("tests/run-pass", &target, &host, false, opt); - }); - miri_pass("tests/run-pass-fullmir", &host, &host, true, opt); - } + for_all_targets(&sysroot, |target| { + miri_pass("tests/run-pass", &target, &host, false, opt); + }); + miri_pass("tests/run-pass-fullmir", &host, &host, true, opt); +} + +#[test] +fn run_pass_miri_noopt() { + run_pass_miri(false); +} + +#[test] +fn run_pass_miri_opt() { + run_pass_miri(true); } #[test]