Add env var test variable in compiletest
This commit is contained in:
parent
b731a6a15f
commit
af623dede2
2 changed files with 4 additions and 1 deletions
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue