@@ -672,6 +672,82 @@ mod snapshot {
672672 " ) ;
673673 }
674674
675+ #[ test]
676+ fn build_compiler_stage_3 ( ) {
677+ let ctx = TestCtx :: new ( ) ;
678+ insta:: assert_snapshot!(
679+ ctx. config( "build" )
680+ . path( "compiler" )
681+ . stage( 3 )
682+ . render_steps( ) , @r"
683+ [build] llvm <host>
684+ [build] rustc 0 <host> -> rustc 1 <host>
685+ [build] rustc 1 <host> -> std 1 <host>
686+ [build] rustc 1 <host> -> rustc 2 <host>
687+ [build] rustc 2 <host> -> std 2 <host>
688+ [build] rustc 2 <host> -> rustc 3 <host>
689+ " ) ;
690+ }
691+
692+ #[ test]
693+ fn build_compiler_stage_3_cross ( ) {
694+ let ctx = TestCtx :: new ( ) ;
695+ insta:: assert_snapshot!(
696+ ctx. config( "build" )
697+ . path( "compiler" )
698+ . hosts( & [ TEST_TRIPLE_1 ] )
699+ . stage( 3 )
700+ . render_steps( ) , @r"
701+ [build] llvm <host>
702+ [build] llvm <target1>
703+ [build] rustc 0 <host> -> rustc 1 <host>
704+ [build] rustc 1 <host> -> std 1 <host>
705+ [build] rustc 1 <host> -> rustc 2 <host>
706+ [build] rustc 1 <host> -> std 1 <target1>
707+ [build] rustc 2 <host> -> std 2 <target1>
708+ [build] rustc 2 <host> -> rustc 3 <target1>
709+ " ) ;
710+ }
711+
712+ #[ test]
713+ fn build_compiler_stage_3_full_bootstrap ( ) {
714+ let ctx = TestCtx :: new ( ) ;
715+ insta:: assert_snapshot!(
716+ ctx. config( "build" )
717+ . path( "compiler" )
718+ . stage( 3 )
719+ . args( & [ "--set" , "build.full-bootstrap=true" ] )
720+ . render_steps( ) , @r"
721+ [build] llvm <host>
722+ [build] rustc 0 <host> -> rustc 1 <host>
723+ [build] rustc 1 <host> -> std 1 <host>
724+ [build] rustc 1 <host> -> rustc 2 <host>
725+ [build] rustc 2 <host> -> std 2 <host>
726+ [build] rustc 2 <host> -> rustc 3 <host>
727+ " ) ;
728+ }
729+
730+ #[ test]
731+ fn build_compiler_stage_3_cross_full_bootstrap ( ) {
732+ let ctx = TestCtx :: new ( ) ;
733+ insta:: assert_snapshot!(
734+ ctx. config( "build" )
735+ . path( "compiler" )
736+ . stage( 3 )
737+ . hosts( & [ TEST_TRIPLE_1 ] )
738+ . args( & [ "--set" , "build.full-bootstrap=true" ] )
739+ . render_steps( ) , @r"
740+ [build] llvm <host>
741+ [build] llvm <target1>
742+ [build] rustc 0 <host> -> rustc 1 <host>
743+ [build] rustc 1 <host> -> std 1 <host>
744+ [build] rustc 1 <host> -> rustc 2 <host>
745+ [build] rustc 2 <host> -> std 2 <target1>
746+ [build] rustc 2 <host> -> std 2 <host>
747+ [build] rustc 2 <host> -> rustc 3 <target1>
748+ " ) ;
749+ }
750+
675751 #[ test]
676752 fn build_compiler_codegen_backend ( ) {
677753 let ctx = TestCtx :: new ( ) ;
0 commit comments