diff options
| author | Ralf Jung <post@ralfj.de> | 2017-08-26 13:23:04 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2017-08-26 13:23:04 +0200 |
| commit | 2e28e1447409fb07467934fd09a211b2d4696708 (patch) | |
| tree | 5f2725265dad86e5dc5c424f39af885955a4f954 | |
| parent | df20c0684c88ca1c8ea7d8da76ff502c734a827e (diff) | |
| download | rust-2e28e1447409fb07467934fd09a211b2d4696708.tar.gz rust-2e28e1447409fb07467934fd09a211b2d4696708.zip | |
reorder lets so that build_dir is deleted last
| -rw-r--r-- | tests/compiletest.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/compiletest.rs b/tests/compiletest.rs index 93c668e9af4..89aa195602e 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -37,9 +37,9 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b path, target ); + let build_dir = TempDir::new("miri-tests").unwrap(); let mut config = compiletest::Config::default(); config.mode = "compile-fail".parse().expect("Invalid mode"); - let build_dir = TempDir::new("miri-tests").unwrap(); config.build_base = build_dir.path().to_owned(); config.rustc_path = miri_path(); let mut flags = Vec::new(); @@ -70,9 +70,9 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b fn run_pass(path: &str) { eprintln!("## Running run-pass tests in {} against rustc", path); + let build_dir = TempDir::new("miri-tests").unwrap(); let mut config = compiletest::Config::default(); config.mode = "run-pass".parse().expect("Invalid mode"); - let build_dir = TempDir::new("miri-tests").unwrap(); config.build_base = build_dir.path().to_owned(); config.src_base = PathBuf::from(path); if let Some(rustc_path) = rustc_test_suite() { @@ -95,9 +95,9 @@ fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) { target, opt_str ); + let build_dir = TempDir::new("miri-tests").unwrap(); let mut config = compiletest::Config::default(); config.mode = "mir-opt".parse().expect("Invalid mode"); - let build_dir = TempDir::new("miri-tests").unwrap(); config.build_base = build_dir.path().to_owned(); config.src_base = PathBuf::from(path); config.target = target.to_owned(); |
