Skip to content

Commit 8388b31

Browse files
committed
Split some multi-snapshot tests to make blessing easier
When a snapshot test fails, it only emits a `.pending-snap` file for the first snapshot assertion that actually failed, because subsequent assertions aren't executed. That makes it cumbersome to re-bless tests that contain multiple snapshot assertions.
1 parent e466296 commit 8388b31

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,11 @@ mod snapshot {
712712
[build] llvm <host>
713713
[build] rustc 0 <host> -> rustc 1 <host>
714714
");
715+
}
715716

717+
#[test]
718+
fn build_rustc_no_explicit_stage() {
719+
let ctx = TestCtx::new();
716720
insta::assert_snapshot!(
717721
ctx.config("build")
718722
.path("rustc")
@@ -1299,7 +1303,11 @@ mod snapshot {
12991303
[check] rustc 0 <host> -> cranelift 1 <host>
13001304
[check] rustc 0 <host> -> gcc 1 <host>
13011305
");
1306+
}
13021307

1308+
#[test]
1309+
fn check_rustc_no_explicit_stage() {
1310+
let ctx = TestCtx::new();
13031311
insta::assert_snapshot!(
13041312
ctx.config("check")
13051313
.path("rustc")

0 commit comments

Comments
 (0)