Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests #670

Merged
merged 1 commit into from Aug 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/cli-exact.rs
Expand Up @@ -4,6 +4,7 @@
extern crate rustup_dist;
extern crate rustup_mock;
extern crate tempdir;
extern crate rustup_utils;

use rustup_mock::clitools::{self, Config, Scenario,
expect_ok, expect_ok_ex,
Expand Down Expand Up @@ -166,6 +167,9 @@ fn remove_override_nonexistent() {
});
path
};
// FIXME TempDir seems to succumb to difficulties removing dirs on windows
let _ = rustup_utils::raw::remove_dir(&path);
assert!(!path.exists());
expect_ok_ex(config, &["rustup", "override", keyword, "--nonexistent"],
r"",
&format!("info: override toolchain for '{}' removed\n", path.display()));
Expand Down Expand Up @@ -205,6 +209,9 @@ fn list_overrides_with_nonexistent() {
});
std::fs::canonicalize(dir.path()).unwrap()
};
// FIXME TempDir seems to succumb to difficulties removing dirs on windows
let _ = rustup_utils::raw::remove_dir(&nonexistent_path);
assert!(!nonexistent_path.exists());
let mut path_formatted = format!("{}", nonexistent_path.display()).to_string();

if cfg!(windows) {
Expand Down