Skip to content

Commit d46db71

Browse files
committed
Work around #5134 for now
1 parent 70170d1 commit d46db71

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

tests/testsuite/build.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4307,7 +4307,11 @@ fn avoid_dev_deps() {
43074307
.file("src/main.rs", "fn main() {}")
43084308
.build();
43094309

4310-
assert_that(p.cargo("build"), execs().with_status(101));
4311-
assert_that(p.cargo("build").masquerade_as_nightly_cargo()
4312-
.arg("-Zavoid-dev-deps"), execs().with_status(0));
4310+
// --bins is needed because of #5134
4311+
assert_that(p.cargo("build").arg("--bins"),
4312+
execs().with_status(101));
4313+
assert_that(p.cargo("build").arg("--bins")
4314+
.masquerade_as_nightly_cargo()
4315+
.arg("-Zavoid-dev-deps"),
4316+
execs().with_status(0));
43134317
}

tests/testsuite/install.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,11 @@ fn dev_dependencies_no_check() {
921921
.file("src/main.rs", "fn main() {}")
922922
.build();
923923

924-
assert_that(p.cargo("build"), execs().with_status(101));
925-
assert_that(p.cargo("install"), execs().with_status(0));
924+
// --bins is needed because of #5134
925+
assert_that(p.cargo("build").arg("--bins"),
926+
execs().with_status(101));
927+
assert_that(p.cargo("install").arg("--bins"),
928+
execs().with_status(0));
926929
}
927930

928931
#[test]
@@ -948,9 +951,12 @@ fn dev_dependencies_lock_file_untouched() {
948951
.file("a/src/lib.rs", "")
949952
.build();
950953

951-
assert_that(p.cargo("build"), execs().with_status(0));
954+
// --bins is needed because of #5134
955+
assert_that(p.cargo("build").arg("--bins"),
956+
execs().with_status(0));
952957
let lock = p.read_lockfile();
953-
assert_that(p.cargo("install"), execs().with_status(0));
958+
assert_that(p.cargo("install").arg("--bins"),
959+
execs().with_status(0));
954960
let lock2 = p.read_lockfile();
955961
assert!(lock == lock2, "different lockfiles");
956962
}

0 commit comments

Comments
 (0)