@@ -37,9 +37,9 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b
37
37
path,
38
38
target
39
39
) ;
40
+ let build_dir = TempDir :: new ( "miri-tests" ) . unwrap ( ) ;
40
41
let mut config = compiletest:: Config :: default ( ) ;
41
42
config. mode = "compile-fail" . parse ( ) . expect ( "Invalid mode" ) ;
42
- let build_dir = TempDir :: new ( "miri-tests" ) . unwrap ( ) ;
43
43
config. build_base = build_dir. path ( ) . to_owned ( ) ;
44
44
config. rustc_path = miri_path ( ) ;
45
45
let mut flags = Vec :: new ( ) ;
@@ -70,9 +70,9 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b
70
70
71
71
fn run_pass ( path : & str ) {
72
72
eprintln ! ( "## Running run-pass tests in {} against rustc" , path) ;
73
+ let build_dir = TempDir :: new ( "miri-tests" ) . unwrap ( ) ;
73
74
let mut config = compiletest:: Config :: default ( ) ;
74
75
config. mode = "run-pass" . parse ( ) . expect ( "Invalid mode" ) ;
75
- let build_dir = TempDir :: new ( "miri-tests" ) . unwrap ( ) ;
76
76
config. build_base = build_dir. path ( ) . to_owned ( ) ;
77
77
config. src_base = PathBuf :: from ( path) ;
78
78
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) {
95
95
target,
96
96
opt_str
97
97
) ;
98
+ let build_dir = TempDir :: new ( "miri-tests" ) . unwrap ( ) ;
98
99
let mut config = compiletest:: Config :: default ( ) ;
99
100
config. mode = "mir-opt" . parse ( ) . expect ( "Invalid mode" ) ;
100
- let build_dir = TempDir :: new ( "miri-tests" ) . unwrap ( ) ;
101
101
config. build_base = build_dir. path ( ) . to_owned ( ) ;
102
102
config. src_base = PathBuf :: from ( path) ;
103
103
config. target = target. to_owned ( ) ;
0 commit comments