@@ -79,6 +79,11 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
7979 program. args . push ( flag) ;
8080 }
8181
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+
8287 let mut config = Config {
8388 target : Some ( target. to_owned ( ) ) ,
8489 stderr_filters : STDERR . clone ( ) ,
@@ -232,11 +237,6 @@ fn main() -> Result<()> {
232237 }
233238 }
234239
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-
240240 ui ( Mode :: Pass , "tests/pass" , & target, WithoutDependencies ) ?;
241241 ui ( Mode :: Pass , "tests/pass-dep" , & target, WithDependencies ) ?;
242242 ui ( Mode :: Panic , "tests/panic" , & target, WithDependencies ) ?;
0 commit comments