@@ -1349,6 +1349,56 @@ host_test!(RunMakeFullDeps {
13491349
13501350default_test ! ( Assembly  {  path:  "tests/assembly" ,  mode:  "assembly" ,  suite:  "assembly"  } ) ; 
13511351
1352+ /// Custom test step that is responsible for running the coverage tests 
1353+ /// in multiple different modes. 
1354+ /// 
1355+ /// Each individual mode also has its own alias that will run the tests in 
1356+ /// just that mode. 
1357+ #[ derive( Debug ,  Copy ,  Clone ,  PartialEq ,  Eq ,  Hash ) ]  
1358+ pub  struct  Coverage  { 
1359+     pub  compiler :  Compiler , 
1360+     pub  target :  TargetSelection , 
1361+ } 
1362+ 
1363+ impl  Coverage  { 
1364+     const  SUITE :  & ' static  str  = "coverage" ; 
1365+ } 
1366+ 
1367+ impl  Step  for  Coverage  { 
1368+     type  Output  = ( ) ; 
1369+     const  DEFAULT :  bool  = false ; 
1370+     const  ONLY_HOSTS :  bool  = false ; 
1371+ 
1372+     fn  should_run ( run :  ShouldRun < ' _ > )  -> ShouldRun < ' _ >  { 
1373+         run. alias ( Self :: SUITE ) 
1374+     } 
1375+ 
1376+     fn  make_run ( run :  RunConfig < ' _ > )  { 
1377+         let  compiler = run. builder . compiler ( run. builder . top_stage ,  run. build_triple ( ) ) ; 
1378+ 
1379+         run. builder . ensure ( Coverage  {  compiler,  target :  run. target  } ) ; 
1380+     } 
1381+ 
1382+     fn  run ( self ,  builder :  & Builder < ' _ > )  { 
1383+         builder. ensure ( Compiletest  { 
1384+             compiler :  self . compiler , 
1385+             target :  self . target , 
1386+             mode :  "coverage-map" , 
1387+             suite :  "coverage-map" , 
1388+             path :  "tests/coverage-map" , 
1389+             compare_mode :  None , 
1390+         } ) ; 
1391+         builder. ensure ( Compiletest  { 
1392+             compiler :  self . compiler , 
1393+             target :  self . target , 
1394+             mode :  "run-coverage" , 
1395+             suite :  "run-coverage" , 
1396+             path :  "tests/run-coverage" , 
1397+             compare_mode :  None , 
1398+         } ) ; 
1399+     } 
1400+ } 
1401+ 
13521402default_test ! ( CoverageMap  { 
13531403    path:  "tests/coverage-map" , 
13541404    mode:  "coverage-map" , 
0 commit comments