Skip to content

Commit f01f062

Browse files
committed
test: resolve deps under targeted parent deps as separate
1 parent 165cf7c commit f01f062

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

tests/testsuite/artifact_dep.rs

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,7 @@ fn dep_of_artifact_dep_same_target_specified() {
16031603
16041604
[dependencies]
16051605
bar = {{ path = "bar", artifact = "bin", target = "{target}" }}
1606+
one = {{ path = "one", artifact = "bin", target = "x86_64-fortanix-unknown-sgx" }}
16061607
"#,
16071608
),
16081609
)
@@ -1621,6 +1622,19 @@ fn dep_of_artifact_dep_same_target_specified() {
16211622
),
16221623
)
16231624
.file("bar/src/main.rs", "fn main() {}")
1625+
.file(
1626+
"one/Cargo.toml",
1627+
&format!(
1628+
r#"
1629+
[package]
1630+
name = "one"
1631+
version = "0.1.0"
1632+
[dependencies]
1633+
baz = {{ path = "../baz" }}
1634+
"#,
1635+
),
1636+
)
1637+
.file("one/src/main.rs", "fn main() {}")
16241638
.file(
16251639
"baz/Cargo.toml",
16261640
r#"
@@ -1636,8 +1650,9 @@ fn dep_of_artifact_dep_same_target_specified() {
16361650
p.cargo("check -Z bindeps")
16371651
.masquerade_as_nightly_cargo(&["bindeps"])
16381652
.with_stderr_data(str![[r#"
1639-
[LOCKING] 2 packages to latest compatible versions
1653+
[LOCKING] 3 packages to latest compatible versions
16401654
[COMPILING] baz v0.1.0 ([ROOT]/foo/baz)
1655+
[COMPILING] one v0.1.0 ([ROOT]/foo/one)
16411656
[COMPILING] bar v0.1.0 ([ROOT]/foo/bar)
16421657
[CHECKING] foo v0.1.0 ([ROOT]/foo)
16431658
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -1646,16 +1661,19 @@ fn dep_of_artifact_dep_same_target_specified() {
16461661
.with_status(0)
16471662
.run();
16481663

1649-
// TODO This command currently fails due to a bug in cargo but it should be fixed so that it succeeds in the future.
16501664
p.cargo("tree -Z bindeps")
16511665
.masquerade_as_nightly_cargo(&["bindeps"])
1652-
.with_stderr_data(
1653-
r#"...
1654-
no entry found for key
1655-
...
1656-
"#,
1657-
)
1658-
.with_status(101)
1666+
.with_stdout_data(str![
1667+
r#"
1668+
foo v0.1.0 ([ROOT]/foo)
1669+
├── bar v0.1.0 ([ROOT]/foo/bar)
1670+
│ └── baz v0.1.0 ([ROOT]/foo/baz)
1671+
└── one v0.1.0 ([ROOT]/foo/one)
1672+
└── baz v0.1.0 ([ROOT]/foo/baz)
1673+
1674+
"#
1675+
])
1676+
.with_status(0)
16591677
.run();
16601678
}
16611679

0 commit comments

Comments
 (0)