Skip to content

Commit 316b5d3

Browse files
committed
Add basic Cargo snapshot test
1 parent 0ff8ff3 commit 316b5d3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,8 @@ impl Step for Rustdoc {
802802
}
803803
}
804804

805+
/// Builds the cargo tool.
806+
/// Note that it can be built using a stable compiler.
805807
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
806808
pub struct Cargo {
807809
pub compiler: Compiler,

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,19 @@ mod snapshot {
10001000
");
10011001
}
10021002

1003+
#[test]
1004+
fn build_cargo() {
1005+
let ctx = TestCtx::new();
1006+
insta::assert_snapshot!(
1007+
ctx.config("build")
1008+
.paths(&["cargo"])
1009+
.render_steps(), @r"
1010+
[build] llvm <host>
1011+
[build] rustc 0 <host> -> rustc 1 <host>
1012+
[build] rustc 1 <host> -> cargo 2 <host>
1013+
");
1014+
}
1015+
10031016
#[test]
10041017
fn dist_default_stage() {
10051018
let ctx = TestCtx::new();

0 commit comments

Comments
 (0)