@@ -79,6 +79,11 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
79
79
program. args . push ( flag) ;
80
80
}
81
81
82
+ // Add a test env var to do environment communication tests.
83
+ program. envs . push ( ( "MIRI_ENV_VAR_TEST" . into ( ) , Some ( "0" . into ( ) ) ) ) ;
84
+ // Let the tests know where to store temp files (they might run for a different target, which can make this hard to find).
85
+ program. envs . push ( ( "MIRI_TEMP" . into ( ) , Some ( env:: temp_dir ( ) . into ( ) ) ) ) ;
86
+
82
87
let mut config = Config {
83
88
target : Some ( target. to_owned ( ) ) ,
84
89
stderr_filters : STDERR . clone ( ) ,
@@ -232,11 +237,6 @@ fn main() -> Result<()> {
232
237
}
233
238
}
234
239
235
- // Add a test env var to do environment communication tests.
236
- env:: set_var ( "MIRI_ENV_VAR_TEST" , "0" ) ;
237
- // Let the tests know where to store temp files (they might run for a different target, which can make this hard to find).
238
- env:: set_var ( "MIRI_TEMP" , env:: temp_dir ( ) ) ;
239
-
240
240
ui ( Mode :: Pass , "tests/pass" , & target, WithoutDependencies ) ?;
241
241
ui ( Mode :: Pass , "tests/pass-dep" , & target, WithDependencies ) ?;
242
242
ui ( Mode :: Panic , "tests/panic" , & target, WithDependencies ) ?;
0 commit comments