@@ -530,8 +530,6 @@ impl Step for Tidy {
530530fn  run ( self ,  builder :  & Builder )  { 
531531        let  build = builder. build ; 
532532
533-         let  _folder = build. fold_output ( || "tidy" ) ; 
534-         println ! ( "tidy check" ) ; 
535533        let  mut  cmd = builder. tool_cmd ( Tool :: Tidy ) ; 
536534        cmd. arg ( build. src . join ( "src" ) ) ; 
537535        cmd. arg ( & build. initial_cargo ) ; 
@@ -541,6 +539,9 @@ impl Step for Tidy {
541539        if  build. config . quiet_tests  { 
542540            cmd. arg ( "--quiet" ) ; 
543541        } 
542+ 
543+         let  _folder = build. fold_output ( || "tidy" ) ; 
544+         println ! ( "tidy check" ) ; 
544545        try_run ( build,  & mut  cmd) ; 
545546    } 
546547
@@ -836,9 +837,6 @@ impl Step for Compiletest {
836837        builder. ensure ( native:: TestHelpers  {  target } ) ; 
837838        builder. ensure ( RemoteCopyLibs  {  compiler,  target } ) ; 
838839
839-         let  _folder = build. fold_output ( || format ! ( "test_{}" ,  suite) ) ; 
840-         println ! ( "Check compiletest suite={} mode={} ({} -> {})" , 
841-                  suite,  mode,  & compiler. host,  target) ; 
842840        let  mut  cmd = builder. tool_cmd ( Tool :: Compiletest ) ; 
843841
844842        // compiletest currently has... a lot of arguments, so let's just pass all 
@@ -998,6 +996,9 @@ impl Step for Compiletest {
998996
999997        build. ci_env . force_coloring_in_ci ( & mut  cmd) ; 
1000998
999+         let  _folder = build. fold_output ( || format ! ( "test_{}" ,  suite) ) ; 
1000+         println ! ( "Check compiletest suite={} mode={} ({} -> {})" , 
1001+                  suite,  mode,  & compiler. host,  target) ; 
10011002        let  _time = util:: timeit ( ) ; 
10021003        try_run ( build,  & mut  cmd) ; 
10031004    } 
@@ -1142,20 +1143,21 @@ impl Step for ErrorIndex {
11421143
11431144        builder. ensure ( compile:: Std  {  compiler,  target :  compiler. host  } ) ; 
11441145
1145-         let  _folder = build. fold_output ( || "test_error_index" ) ; 
1146-         println ! ( "Testing error-index stage{}" ,  compiler. stage) ; 
1147- 
11481146        let  dir = testdir ( build,  compiler. host ) ; 
11491147        t ! ( fs:: create_dir_all( & dir) ) ; 
11501148        let  output = dir. join ( "error-index.md" ) ; 
11511149
1152-         let  _time = util :: timeit ( ) ; 
1153-         build . run ( builder . tool_cmd ( Tool :: ErrorIndex ) 
1154-                      . arg ( "markdown" ) 
1155-                      . arg ( & output ) 
1156-                      . env ( "CFG_BUILD " ,  & build. build ) 
1157-                      . env ( "RUSTC_ERROR_METADATA_DST" ,  build . extended_error_dir ( ) ) ) ; 
1150+         let  mut  tool = builder . tool_cmd ( Tool :: ErrorIndex ) ; 
1151+         tool . arg ( "markdown" ) 
1152+             . arg ( & output ) 
1153+             . env ( "CFG_BUILD" ,   & build . build ) 
1154+             . env ( "RUSTC_ERROR_METADATA_DST " ,  build. extended_error_dir ( ) ) ; 
1155+ 
11581156
1157+         let  _folder = build. fold_output ( || "test_error_index" ) ; 
1158+         println ! ( "Testing error-index stage{}" ,  compiler. stage) ; 
1159+         let  _time = util:: timeit ( ) ; 
1160+         build. run ( & mut  tool) ; 
11591161        markdown_test ( builder,  compiler,  & output) ; 
11601162    } 
11611163} 
@@ -1400,11 +1402,6 @@ impl Step for Crate {
14001402            } 
14011403            _ => panic ! ( "can only test libraries" ) , 
14021404        } ; 
1403-         let  _folder = build. fold_output ( || { 
1404-             format ! ( "{}_stage{}-{}" ,  test_kind. subcommand( ) ,  compiler. stage,  krate) 
1405-         } ) ; 
1406-         println ! ( "{} {} stage{} ({} -> {})" ,  test_kind,  krate,  compiler. stage, 
1407-                 & compiler. host,  target) ; 
14081405
14091406        // Build up the base `cargo test` command. 
14101407        // 
@@ -1436,8 +1433,6 @@ impl Step for Crate {
14361433            cargo. arg ( "--quiet" ) ; 
14371434        } 
14381435
1439-         let  _time = util:: timeit ( ) ; 
1440- 
14411436        if  target. contains ( "emscripten" )  { 
14421437            cargo. env ( format ! ( "CARGO_TARGET_{}_RUNNER" ,  envify( & target) ) , 
14431438                      build. config . nodejs . as_ref ( ) . expect ( "nodejs not configured" ) ) ; 
@@ -1465,6 +1460,13 @@ impl Step for Crate {
14651460                      format ! ( "{} run" , 
14661461                              builder. tool_exe( Tool :: RemoteTestClient ) . display( ) ) ) ; 
14671462        } 
1463+ 
1464+         let  _folder = build. fold_output ( || { 
1465+             format ! ( "{}_stage{}-{}" ,  test_kind. subcommand( ) ,  compiler. stage,  krate) 
1466+         } ) ; 
1467+         println ! ( "{} {} stage{} ({} -> {})" ,  test_kind,  krate,  compiler. stage, 
1468+                 & compiler. host,  target) ; 
1469+         let  _time = util:: timeit ( ) ; 
14681470        try_run ( build,  & mut  cargo) ; 
14691471    } 
14701472} 
@@ -1513,12 +1515,6 @@ impl Step for CrateRustdoc {
15131515                                                 target, 
15141516                                                 test_kind. subcommand ( ) , 
15151517                                                 "src/tools/rustdoc" ) ; 
1516-         let  _folder = build. fold_output ( || { 
1517-             format ! ( "{}_stage{}-rustdoc" ,  test_kind. subcommand( ) ,  compiler. stage) 
1518-         } ) ; 
1519-         println ! ( "{} rustdoc stage{} ({} -> {})" ,  test_kind,  compiler. stage, 
1520-                 & compiler. host,  target) ; 
1521- 
15221518        if  test_kind. subcommand ( )  == "test"  && !build. fail_fast  { 
15231519            cargo. arg ( "--no-fail-fast" ) ; 
15241520        } 
@@ -1532,6 +1528,11 @@ impl Step for CrateRustdoc {
15321528            cargo. arg ( "--quiet" ) ; 
15331529        } 
15341530
1531+         let  _folder = build. fold_output ( || { 
1532+             format ! ( "{}_stage{}-rustdoc" ,  test_kind. subcommand( ) ,  compiler. stage) 
1533+         } ) ; 
1534+         println ! ( "{} rustdoc stage{} ({} -> {})" ,  test_kind,  compiler. stage, 
1535+                 & compiler. host,  target) ; 
15351536        let  _time = util:: timeit ( ) ; 
15361537
15371538        try_run ( build,  & mut  cargo) ; 
0 commit comments