Skip to content

Commit bacd8bc

Browse files
committed
Auto merge of #25615 - petrochenkov:issue25542, r=alexcrichton
Closes #25542 r? @alexcrichton
2 parents 541fe5f + 9e1f531 commit bacd8bc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/run-pass-fulldeps/issue-15149.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ fn test() {
6464
str::from_utf8(&child_output.stdout).unwrap(),
6565
str::from_utf8(&child_output.stderr).unwrap()));
6666

67-
fs::remove_dir_all(&child_dir).unwrap();
68-
67+
let res = fs::remove_dir_all(&child_dir);
68+
if res.is_err() {
69+
// On Windows deleting just executed mytest.exe can fail because it's still locked
70+
std::thread::sleep_ms(1000);
71+
fs::remove_dir_all(&child_dir).unwrap();
72+
}
6973
}

0 commit comments

Comments
 (0)