Work around #5134 for now
authorXimin Luo <infinity0@pwned.gg>
Wed, 7 Mar 2018 13:46:43 +0000 (14:46 +0100)
committerXimin Luo <infinity0@pwned.gg>
Wed, 7 Mar 2018 13:46:43 +0000 (14:46 +0100)
tests/testsuite/build.rs
tests/testsuite/install.rs

index e4237d864dcec5f78f4d1f04e30da88d137b19f8..669c17d4153562c4764883501ccca28b1249c415 100644 (file)
@@ -4307,7 +4307,11 @@ fn avoid_dev_deps() {
         .file("src/main.rs", "fn main() {}")
         .build();
 
-    assert_that(p.cargo("build"), execs().with_status(101));
-    assert_that(p.cargo("build").masquerade_as_nightly_cargo()
-                .arg("-Zavoid-dev-deps"), execs().with_status(0));
+    // --bins is needed because of #5134
+    assert_that(p.cargo("build").arg("--bins"),
+        execs().with_status(101));
+    assert_that(p.cargo("build").arg("--bins")
+                .masquerade_as_nightly_cargo()
+                .arg("-Zavoid-dev-deps"),
+        execs().with_status(0));
 }
index bd58c6e6cd77b8ad49af3447af1609e033c06cfc..d8308ce5cb9077ffced4dc74fb7be438236d77ce 100644 (file)
@@ -921,8 +921,11 @@ fn dev_dependencies_no_check() {
         .file("src/main.rs", "fn main() {}")
         .build();
 
-    assert_that(p.cargo("build"), execs().with_status(101));
-    assert_that(p.cargo("install"), execs().with_status(0));
+    // --bins is needed because of #5134
+    assert_that(p.cargo("build").arg("--bins"),
+        execs().with_status(101));
+    assert_that(p.cargo("install").arg("--bins"),
+        execs().with_status(0));
 }
 
 #[test]
@@ -948,9 +951,12 @@ fn dev_dependencies_lock_file_untouched() {
         .file("a/src/lib.rs", "")
         .build();
 
-    assert_that(p.cargo("build"), execs().with_status(0));
+    // --bins is needed because of #5134
+    assert_that(p.cargo("build").arg("--bins"),
+        execs().with_status(0));
     let lock = p.read_lockfile();
-    assert_that(p.cargo("install"), execs().with_status(0));
+    assert_that(p.cargo("install").arg("--bins"),
+        execs().with_status(0));
     let lock2 = p.read_lockfile();
     assert!(lock == lock2, "different lockfiles");
 }