Skip to content

Commit ee1c691

Browse files
committed
Make x t miri respect MIRI_TEMP
1 parent bfe762e commit ee1c691

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/miri/tests/compiletest.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
8181

8282
// Add a test env var to do environment communication tests.
8383
program.envs.push(("MIRI_ENV_VAR_TEST".into(), Some("0".into())));
84+
8485
// 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+
let miri_temp = env::var_os("MIRI_TEMP").unwrap_or_else(|| env::temp_dir().into());
87+
program.envs.push(("MIRI_TEMP".into(), Some(miri_temp)));
8688

8789
let mut config = Config {
8890
target: Some(target.to_owned()),

0 commit comments

Comments
 (0)