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