Skip to content

Commit c52d25b

Browse files
committed
fix test and make them platform specific
1 parent 4e53043 commit c52d25b

File tree

1 file changed

+48
-22
lines changed

1 file changed

+48
-22
lines changed

src/bootstrap/src/core/builder/tests.rs

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,33 +1631,59 @@ mod snapshot {
16311631
#[test]
16321632
fn doc_core_no_std_target() {
16331633
let ctx = TestCtx::new();
1634-
insta::assert_snapshot!(
1635-
ctx.config("doc")
1636-
.path("core")
1637-
.override_target_no_std(&host_target())
1638-
.render_steps(), @r"
1639-
[build] llvm <host>
1640-
[build] rustc 0 <host> -> rustc 1 <host>
1641-
[build] rustc 0 <host> -> LldWrapper 1 <host>
1642-
[build] rustdoc 0 <host>
1643-
[doc] std 1 <host> crates=[core]
1644-
");
1634+
if host_target() == "x86_64-unknown-linux-gnu" {
1635+
insta::assert_snapshot!(
1636+
ctx.config("doc")
1637+
.path("core")
1638+
.override_target_no_std(&host_target())
1639+
.render_steps(), @r"
1640+
[build] llvm <host>
1641+
[build] rustc 0 <host> -> rustc 1 <host>
1642+
[build] rustc 0 <host> -> LldWrapper 1 <host>
1643+
[build] rustdoc 0 <host>
1644+
[doc] std 1 <host> crates=[core]
1645+
");
1646+
} else {
1647+
insta::assert_snapshot!(
1648+
ctx.config("doc")
1649+
.path("core")
1650+
.override_target_no_std(&host_target())
1651+
.render_steps(), @r"
1652+
[build] llvm <host>
1653+
[build] rustc 0 <host> -> rustc 1 <host>
1654+
[build] rustdoc 0 <host>
1655+
[doc] std 1 <host> crates=[core]
1656+
");
1657+
}
16451658
}
16461659

16471660
#[test]
16481661
fn doc_library_no_std_target() {
16491662
let ctx = TestCtx::new();
1650-
insta::assert_snapshot!(
1651-
ctx.config("doc")
1652-
.path("library")
1653-
.override_target_no_std(&host_target())
1654-
.render_steps(), @r"
1655-
[build] llvm <host>
1656-
[build] rustc 0 <host> -> rustc 1 <host>
1657-
[build] rustc 0 <host> -> LldWrapper 1 <host>
1658-
[build] rustdoc 0 <host>
1659-
[doc] std 1 <host> crates=[alloc,core]
1660-
");
1663+
if host_target() == "x86_64-unknown-linux-gnu" {
1664+
insta::assert_snapshot!(
1665+
ctx.config("doc")
1666+
.path("library")
1667+
.override_target_no_std(&host_target())
1668+
.render_steps(), @r"
1669+
[build] llvm <host>
1670+
[build] rustc 0 <host> -> rustc 1 <host>
1671+
[build] rustc 0 <host> -> LldWrapper 1 <host>
1672+
[build] rustdoc 0 <host>
1673+
[doc] std 1 <host> crates=[alloc,core]
1674+
");
1675+
} else {
1676+
insta::assert_snapshot!(
1677+
ctx.config("doc")
1678+
.path("library")
1679+
.override_target_no_std(&host_target())
1680+
.render_steps(), @r"
1681+
[build] llvm <host>
1682+
[build] rustc 0 <host> -> rustc 1 <host>
1683+
[build] rustdoc 0 <host>
1684+
[doc] std 1 <host> crates=[alloc,core]
1685+
");
1686+
}
16611687
}
16621688

16631689
#[test]

0 commit comments

Comments
 (0)