Fix test run-pass-fulldeps\issue-15149.rs on Windows

This commit is contained in:
petrochenkov 2015-05-19 20:37:17 +03:00
parent b301e02f37
commit 9e1f531d53

View File

@ -64,6 +64,10 @@ fn test() {
str::from_utf8(&child_output.stdout).unwrap(),
str::from_utf8(&child_output.stderr).unwrap()));
fs::remove_dir_all(&child_dir).unwrap();
let res = fs::remove_dir_all(&child_dir);
if res.is_err() {
// On Windows deleting just executed mytest.exe can fail because it's still locked
std::thread::sleep_ms(1000);
fs::remove_dir_all(&child_dir).unwrap();
}
}