Skip to content
Snippets Groups Projects
Commit a0ba6387 authored by Tommie Levy's avatar Tommie Levy
Browse files

Run leaky tests in sequence

parent 5ac2fd74
No related branches found
No related tags found
No related merge requests found
......@@ -767,8 +767,15 @@ mod tests {
assert_eq!("BAR", &expanded);
}
use std::sync::Mutex;
lazy_static! {
static ref ENVLOCK: Mutex<()> = Mutex::new(());
}
#[test]
fn minimal_directory_var_should_compact_path() {
// Make sure we dont read the other tests writes to env
let _guard = ENVLOCK.lock().unwrap();
let variables = Variables::default();
env::set_var("PWD", "/var/log/nix");
assert_eq!(
......@@ -782,6 +789,8 @@ mod tests {
#[test]
fn minimal_directory_var_shouldnt_compact_path() {
// Make sure we dont read the other tests writes to env
let _guard = ENVLOCK.lock().unwrap();
let variables = Variables::default();
env::set_var("PWD", "/var/log");
assert_eq!(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment