@@ -1327,6 +1327,55 @@ macro_rules! coverage_test_alias {
13271327 } ;
13281328}
13291329
1330+ #[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
1331+ pub struct Tests {
1332+ pub compiler : Compiler ,
1333+ pub target : TargetSelection ,
1334+ }
1335+
1336+ impl Step for Tests {
1337+ type Output = ( ) ;
1338+ const DEFAULT : bool = false ;
1339+ const ONLY_HOSTS : bool = false ;
1340+ fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
1341+ run. suite_path ( "tests" )
1342+ }
1343+
1344+ fn make_run ( run : RunConfig < ' _ > ) {
1345+ let compiler = run. builder . compiler ( run. builder . top_stage , run. build_triple ( ) ) ;
1346+ run. builder . ensure ( Tests { compiler, target : run. target } ) ;
1347+ }
1348+
1349+ fn run ( self , builder : & Builder < ' _ > ) {
1350+ let Self { compiler, target } = self ;
1351+ // This should be kept in sync with all tests in tests/*
1352+ // Alphabetical order so this list (somewhat) matches a file listing
1353+ // tidy-alphabetical-start
1354+ builder. ensure ( Assembly { compiler, target } ) ;
1355+ builder. ensure ( Codegen { compiler, target } ) ;
1356+ builder. ensure ( CodegenUnits { compiler, target } ) ;
1357+ builder. ensure ( Coverage { compiler, target } ) ;
1358+ builder. ensure ( CoverageRunRustdoc { compiler, target } ) ;
1359+ builder. ensure ( Debuginfo { compiler, target } ) ;
1360+ builder. ensure ( Incremental { compiler, target } ) ;
1361+ builder. ensure ( MirOpt { compiler, target } ) ;
1362+ builder. ensure ( Pretty { compiler, target } ) ;
1363+ builder. ensure ( RunMake { compiler, target } ) ;
1364+ builder. ensure ( RunMakeFullDeps { compiler, target } ) ;
1365+ builder. ensure ( RunPassValgrind { compiler, target } ) ;
1366+ builder. ensure ( Rustdoc { compiler, target } ) ;
1367+ builder. ensure ( RustdocGUI { compiler, target } ) ;
1368+ builder. ensure ( RustdocJSNotStd { compiler, target } ) ;
1369+ builder. ensure ( RustdocJson { compiler, target } ) ;
1370+ builder. ensure ( RustdocJSStd { target } ) ;
1371+ builder. ensure ( RustdocUi { compiler, target } ) ;
1372+ builder. ensure ( TestHelpers { target } ) ;
1373+ builder. ensure ( Ui { compiler, target } ) ;
1374+ builder. ensure ( UiFullDeps { compiler, target } ) ;
1375+ // tidy-alphabetical-end
1376+ }
1377+ }
1378+
13301379default_test ! ( Ui { path: "tests/ui" , mode: "ui" , suite: "ui" } ) ;
13311380
13321381default_test ! ( RunPassValgrind {
0 commit comments