Skip to content

Commit 6ae1f7e

Browse files
committed
Fix flaky tests
1 parent 6d5d5c5 commit 6ae1f7e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/cli-exact.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
extern crate rustup_dist;
55
extern crate rustup_mock;
66
extern crate tempdir;
7+
extern crate rustup_utils;
78

89
use rustup_mock::clitools::{self, Config, Scenario,
910
expect_ok, expect_ok_ex,
@@ -166,6 +167,9 @@ fn remove_override_nonexistent() {
166167
});
167168
path
168169
};
170+
// FIXME TempDir seems to succumb to difficulties removing dirs on windows
171+
let _ = rustup_utils::raw::remove_dir(&path);
172+
assert!(!path.exists());
169173
expect_ok_ex(config, &["rustup", "override", keyword, "--nonexistent"],
170174
r"",
171175
&format!("info: override toolchain for '{}' removed\n", path.display()));
@@ -205,6 +209,9 @@ fn list_overrides_with_nonexistent() {
205209
});
206210
std::fs::canonicalize(dir.path()).unwrap()
207211
};
212+
// FIXME TempDir seems to succumb to difficulties removing dirs on windows
213+
let _ = rustup_utils::raw::remove_dir(&nonexistent_path);
214+
assert!(!nonexistent_path.exists());
208215
let mut path_formatted = format!("{}", nonexistent_path.display()).to_string();
209216

210217
if cfg!(windows) {

0 commit comments

Comments
 (0)