@@ -1233,6 +1233,164 @@ mod snapshot {
12331233 " ) ;
12341234 }
12351235
1236+ #[ test]
1237+ fn check_compiler_no_explicit_stage ( ) {
1238+ let ctx = TestCtx :: new ( ) ;
1239+ insta:: assert_snapshot!(
1240+ ctx. config( "check" )
1241+ . path( "compiler" )
1242+ . render_steps( ) , @r"
1243+ [build] llvm <host>
1244+ [check] rustc 0 <host> -> rustc 1 <host>
1245+ " ) ;
1246+
1247+ insta:: assert_snapshot!(
1248+ ctx. config( "check" )
1249+ . path( "rustc" )
1250+ . render_steps( ) , @r"
1251+ [build] llvm <host>
1252+ [check] rustc 0 <host> -> rustc 1 <host>
1253+ " ) ;
1254+ }
1255+
1256+ #[ test]
1257+ #[ should_panic]
1258+ fn check_compiler_stage_0 ( ) {
1259+ let ctx = TestCtx :: new ( ) ;
1260+ ctx. config ( "check" ) . path ( "compiler" ) . stage ( 0 ) . run ( ) ;
1261+ }
1262+
1263+ #[ test]
1264+ fn check_compiler_stage_1 ( ) {
1265+ let ctx = TestCtx :: new ( ) ;
1266+ insta:: assert_snapshot!(
1267+ ctx. config( "check" )
1268+ . path( "compiler" )
1269+ . stage( 1 )
1270+ . render_steps( ) , @r"
1271+ [build] llvm <host>
1272+ [check] rustc 0 <host> -> rustc 1 <host>
1273+ " ) ;
1274+ }
1275+
1276+ #[ test]
1277+ fn check_compiler_stage_2 ( ) {
1278+ let ctx = TestCtx :: new ( ) ;
1279+ insta:: assert_snapshot!(
1280+ ctx. config( "check" )
1281+ . path( "compiler" )
1282+ . stage( 2 )
1283+ . render_steps( ) , @r"
1284+ [build] llvm <host>
1285+ [build] rustc 0 <host> -> rustc 1 <host>
1286+ [build] rustc 1 <host> -> std 1 <host>
1287+ [check] rustc 1 <host> -> rustc 2 <host>
1288+ " ) ;
1289+ }
1290+
1291+ #[ test]
1292+ fn check_library_no_explicit_stage ( ) {
1293+ let ctx = TestCtx :: new ( ) ;
1294+ insta:: assert_snapshot!(
1295+ ctx. config( "check" )
1296+ . path( "library" )
1297+ . render_steps( ) , @r"
1298+ [build] llvm <host>
1299+ [build] rustc 0 <host> -> rustc 1 <host>
1300+ [check] rustc 1 <host> -> std 1 <host>
1301+ " ) ;
1302+ }
1303+
1304+ #[ test]
1305+ #[ should_panic]
1306+ fn check_library_stage_0 ( ) {
1307+ let ctx = TestCtx :: new ( ) ;
1308+ ctx. config ( "check" ) . path ( "library" ) . stage ( 0 ) . run ( ) ;
1309+ }
1310+
1311+ #[ test]
1312+ fn check_library_stage_1 ( ) {
1313+ let ctx = TestCtx :: new ( ) ;
1314+ insta:: assert_snapshot!(
1315+ ctx. config( "check" )
1316+ . path( "library" )
1317+ . stage( 1 )
1318+ . render_steps( ) , @r"
1319+ [build] llvm <host>
1320+ [build] rustc 0 <host> -> rustc 1 <host>
1321+ [check] rustc 1 <host> -> std 1 <host>
1322+ " ) ;
1323+ }
1324+
1325+ #[ test]
1326+ fn check_library_stage_2 ( ) {
1327+ let ctx = TestCtx :: new ( ) ;
1328+ insta:: assert_snapshot!(
1329+ ctx. config( "check" )
1330+ . path( "library" )
1331+ . stage( 2 )
1332+ . render_steps( ) , @r"
1333+ [build] llvm <host>
1334+ [build] rustc 0 <host> -> rustc 1 <host>
1335+ [build] rustc 1 <host> -> std 1 <host>
1336+ [build] rustc 1 <host> -> rustc 2 <host>
1337+ [check] rustc 2 <host> -> std 2 <host>
1338+ " ) ;
1339+ }
1340+
1341+ #[ test]
1342+ fn check_miri_no_explicit_stage ( ) {
1343+ let ctx = TestCtx :: new ( ) ;
1344+ insta:: assert_snapshot!(
1345+ ctx. config( "check" )
1346+ . path( "miri" )
1347+ . render_steps( ) , @r"
1348+ [build] llvm <host>
1349+ [build] rustc 0 <host> -> rustc 1 <host>
1350+ [check] rustc 0 <host> -> rustc 1 <host>
1351+ [check] Miri <host>
1352+ " ) ;
1353+ }
1354+
1355+ #[ test]
1356+ #[ should_panic]
1357+ fn check_miri_stage_0 ( ) {
1358+ let ctx = TestCtx :: new ( ) ;
1359+ ctx. config ( "check" ) . path ( "miri" ) . stage ( 0 ) . run ( ) ;
1360+ }
1361+
1362+ #[ test]
1363+ fn check_miri_stage_1 ( ) {
1364+ let ctx = TestCtx :: new ( ) ;
1365+ insta:: assert_snapshot!(
1366+ ctx. config( "check" )
1367+ . path( "miri" )
1368+ . stage( 1 )
1369+ . render_steps( ) , @r"
1370+ [build] llvm <host>
1371+ [build] rustc 0 <host> -> rustc 1 <host>
1372+ [check] rustc 0 <host> -> rustc 1 <host>
1373+ [check] Miri <host>
1374+ " ) ;
1375+ }
1376+
1377+ #[ test]
1378+ fn check_miri_stage_2 ( ) {
1379+ let ctx = TestCtx :: new ( ) ;
1380+ insta:: assert_snapshot!(
1381+ ctx. config( "check" )
1382+ . path( "miri" )
1383+ . stage( 2 )
1384+ . render_steps( ) , @r"
1385+ [build] llvm <host>
1386+ [build] rustc 0 <host> -> rustc 1 <host>
1387+ [build] rustc 1 <host> -> std 1 <host>
1388+ [build] rustc 1 <host> -> rustc 2 <host>
1389+ [check] rustc 1 <host> -> rustc 2 <host>
1390+ [check] Miri <host>
1391+ " ) ;
1392+ }
1393+
12361394 #[ test]
12371395 fn test_exclude ( ) {
12381396 let ctx = TestCtx :: new ( ) ;
0 commit comments