Skip to content

Commit 3abe5f9

Browse files
committed
Add snapshot test for cross-compilation cargo build
1 parent 67d45f4 commit 3abe5f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,21 @@ mod snapshot {
975975
.render_steps(), @"[build] rustc 0 <host> -> cargo 1 <host>");
976976
}
977977

978+
#[test]
979+
fn build_cargo_cross() {
980+
let ctx = TestCtx::new();
981+
insta::assert_snapshot!(
982+
ctx.config("build")
983+
.paths(&["cargo"])
984+
.hosts(&[TEST_TRIPLE_1])
985+
.render_steps(), @r"
986+
[build] llvm <host>
987+
[build] rustc 0 <host> -> rustc 1 <host>
988+
[build] rustc 1 <host> -> std 1 <target1>
989+
[build] rustc 1 <host> -> cargo 2 <target1>
990+
");
991+
}
992+
978993
#[test]
979994
fn dist_default_stage() {
980995
let ctx = TestCtx::new();

0 commit comments

Comments
 (0)