mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
Add env var test variable in compiletest
This commit is contained in:
@@ -37,6 +37,9 @@ fn run_tests(mode: &str, path: &str, target: &str, mut flags: Vec<String>) {
|
||||
flags.push(format!("--sysroot {}", sysroot));
|
||||
}
|
||||
|
||||
// Add a test env var to do evironment communication tests
|
||||
std::env::set_var("MIRI_ENV_VAR_TEST", "0");
|
||||
|
||||
// The rest of the configuration.
|
||||
let mut config = compiletest::Config::default().tempdir();
|
||||
config.mode = mode.parse().expect("Invalid mode");
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
// compile-flags: -Zmiri-enable-communication
|
||||
|
||||
fn main() {
|
||||
assert!(std::env::var("PWD").is_ok());
|
||||
assert_eq!(std::env::var("MIRI_ENV_VAR_TEST"), Ok("0".to_owned()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user