diff options
| author | Ralf Jung <post@ralfj.de> | 2023-11-16 10:43:27 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-11-16 10:46:48 +0100 |
| commit | ca67d7fa6aa36492c03225a411bf48b3c2a53afb (patch) | |
| tree | 1fb32dc4bc34033f486d7dc4d186bc18fd338a6c | |
| parent | 012bd49b8a60f02d504774293d7a381dfe74d5f4 (diff) | |
| download | rust-ca67d7fa6aa36492c03225a411bf48b3c2a53afb.tar.gz rust-ca67d7fa6aa36492c03225a411bf48b3c2a53afb.zip | |
get rid of our last uses of set_var
| -rw-r--r-- | src/tools/miri/tests/compiletest.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index dbf559631ea..91df4985c0f 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -79,6 +79,11 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) -> program.args.push(flag); } + // Add a test env var to do environment communication tests. + program.envs.push(("MIRI_ENV_VAR_TEST".into(), Some("0".into()))); + // Let the tests know where to store temp files (they might run for a different target, which can make this hard to find). + program.envs.push(("MIRI_TEMP".into(), Some(env::temp_dir().into()))); + let mut config = Config { target: Some(target.to_owned()), stderr_filters: STDERR.clone(), @@ -232,11 +237,6 @@ fn main() -> Result<()> { } } - // Add a test env var to do environment communication tests. - env::set_var("MIRI_ENV_VAR_TEST", "0"); - // Let the tests know where to store temp files (they might run for a different target, which can make this hard to find). - env::set_var("MIRI_TEMP", env::temp_dir()); - ui(Mode::Pass, "tests/pass", &target, WithoutDependencies)?; ui(Mode::Pass, "tests/pass-dep", &target, WithDependencies)?; ui(Mode::Panic, "tests/panic", &target, WithDependencies)?; |
