]> git.proxmox.com Git - cargo.git/commitdiff
Fix flakey broken_fixes_backed_out test.
authorEric Huss <eric@huss.org>
Sun, 9 Dec 2018 19:59:42 +0000 (11:59 -0800)
committerEric Huss <eric@huss.org>
Sun, 9 Dec 2018 19:59:42 +0000 (11:59 -0800)
Since `fix` does `--all-targets` there is a race condition as to which target goes first. This has less than a 1% failure rate on CI, but it has been seen several times lately:

https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/20878003/job/v01k5j14od50mghw
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/18699824/job/465w7uav7ew24yka
https://ci.appveyor.com/project/rust-lang-libs/cargo/builds/17283788/job/7cxp8bwm4d3i1xgl

tests/testsuite/fix.rs

index 4d898b650077a4ad7c4c654cf08dcc41c1186178..d31693a6c6fb35bde77425384ad0a41872e2ade1 100644 (file)
@@ -123,7 +123,7 @@ fn broken_fixes_backed_out() {
     p.cargo("build").cwd(p.root().join("foo")).run();
 
     // Attempt to fix code, but our shim will always fail the second compile
-    p.cargo("fix --allow-no-vcs")
+    p.cargo("fix --allow-no-vcs --lib")
         .cwd(p.root().join("bar"))
         .env("__CARGO_FIX_YOLO", "1")
         .env("RUSTC", p.root().join("foo/target/debug/foo"))