Skip to content

Commit

Permalink
Try to avoid deleting trees in Cargo's tests
Browse files Browse the repository at this point in the history
An attempt at rust-lang/rust#48775
  • Loading branch information
alexcrichton committed Mar 6, 2018
1 parent ae796ad commit d856711
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,10 @@ fn rename_with_link_search_path() {
fs::copy(&src, &dst).unwrap();
// copy the import library for windows, if it exists
drop(fs::copy(&root.join("foo.dll.lib"), p2.root().join("foo.dll.lib")));
fs::remove_dir_all(p.root()).unwrap();
let mut new_dst = p.root();
new_dst.pop();
new_dst.push("__another_location");
fs::rename(p.root(), new_dst).unwrap();

// Everything should work the first time
assert_that(p2.cargo("run"),
Expand Down

0 comments on commit d856711

Please sign in to comment.