@@ -1371,6 +1371,7 @@ impl Step for RunMakeSupport {
1371
1371
run. builder . ensure ( RunMakeSupport { compiler, target : run. build_triple ( ) } ) ;
1372
1372
}
1373
1373
1374
+ /// Builds run-make-support and returns the path to the resulting rlib.
1374
1375
fn run ( self , builder : & Builder < ' _ > ) -> PathBuf {
1375
1376
builder. ensure ( compile:: Std :: new ( self . compiler , self . target ) ) ;
1376
1377
@@ -1397,6 +1398,52 @@ impl Step for RunMakeSupport {
1397
1398
}
1398
1399
}
1399
1400
1401
+ #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
1402
+ pub struct RunMakeSupportTest {
1403
+ host : TargetSelection ,
1404
+ }
1405
+
1406
+ impl Step for RunMakeSupportTest {
1407
+ type Output = ( ) ;
1408
+
1409
+ fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
1410
+ run. path ( "src/tools/run-make-support" )
1411
+ }
1412
+
1413
+ fn make_run ( run : RunConfig < ' _ > ) {
1414
+ run. builder . ensure ( RunMakeSupportTest { host : run. target } ) ;
1415
+ }
1416
+
1417
+ /// Runs `cargo test` for run-make-support.
1418
+ fn run ( self , builder : & Builder < ' _ > ) {
1419
+ let host = self . host ;
1420
+ let compiler = builder. compiler ( builder. top_stage , host) ;
1421
+
1422
+ builder. ensure ( compile:: Std :: new ( compiler, host) ) ;
1423
+ let mut cargo = tool:: prepare_tool_cargo (
1424
+ builder,
1425
+ compiler,
1426
+ Mode :: ToolStd ,
1427
+ host,
1428
+ "test" ,
1429
+ "src/tools/run-make-support" ,
1430
+ SourceType :: InTree ,
1431
+ & [ ] ,
1432
+ ) ;
1433
+ cargo. allow_features ( "test" ) ;
1434
+ run_cargo_test (
1435
+ cargo,
1436
+ & [ ] ,
1437
+ & [ ] ,
1438
+ "run-make-support" ,
1439
+ "run-make-support self test" ,
1440
+ compiler,
1441
+ host,
1442
+ builder,
1443
+ ) ;
1444
+ }
1445
+ }
1446
+
1400
1447
default_test ! ( Ui { path: "tests/ui" , mode: "ui" , suite: "ui" } ) ;
1401
1448
1402
1449
default_test ! ( Crashes { path: "tests/crashes" , mode: "crashes" , suite: "crashes" } ) ;
0 commit comments