@@ -25,11 +25,10 @@ use crate::core::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
2525use crate :: core:: config:: flags:: get_completion;
2626use crate :: core:: config:: flags:: Subcommand ;
2727use crate :: core:: config:: TargetSelection ;
28- use crate :: misc:: cache:: Interned ;
29- use crate :: misc:: cache:: INTERNER ;
30- use crate :: misc:: render_tests:: add_flags_and_try_run_tests;
31- use crate :: misc:: render_tests:: try_run_tests;
32- use crate :: utils:: { self , add_link_lib_path, dylib_path, dylib_path_var, output, t, up_to_date} ;
28+ use crate :: utils;
29+ use crate :: utils:: cache:: { Interned , INTERNER } ;
30+ use crate :: utils:: render_tests:: { try_run_tests, add_flags_and_try_run_tests} ;
31+ use crate :: utils:: helpers:: { self , add_link_lib_path, dylib_path, dylib_path_var, output, t, up_to_date} ;
3332use crate :: { envify, CLang , DocTests , GitRepo , Mode } ;
3433
3534const ADB_TEST_DIR : & str = "/data/local/tmp/work" ;
@@ -169,7 +168,7 @@ You can skip linkcheck with --skip src/tools/linkchecker"
169168 // Run the linkchecker.
170169 let _guard =
171170 builder. msg ( Kind :: Test , compiler. stage , "Linkcheck" , bootstrap_host, bootstrap_host) ;
172- let _time = utils :: timeit ( & builder) ;
171+ let _time = helpers :: timeit ( & builder) ;
173172 builder. run_delaying_failure ( linkchecker. arg ( builder. out . join ( host. triple ) . join ( "doc" ) ) ) ;
174173 }
175174
@@ -266,7 +265,7 @@ impl Step for Cargotest {
266265 let out_dir = builder. out . join ( "ct" ) ;
267266 t ! ( fs:: create_dir_all( & out_dir) ) ;
268267
269- let _time = utils :: timeit ( & builder) ;
268+ let _time = helpers :: timeit ( & builder) ;
270269 let mut cmd = builder. tool_cmd ( Tool :: CargoTest ) ;
271270 builder. run_delaying_failure (
272271 cmd. arg ( & cargo)
@@ -334,7 +333,7 @@ impl Step for Cargo {
334333 builder,
335334 ) ;
336335
337- let _time = utils :: timeit ( & builder) ;
336+ let _time = helpers :: timeit ( & builder) ;
338337 add_flags_and_try_run_tests ( builder, & mut cargo) ;
339338 }
340339}
@@ -648,7 +647,7 @@ impl Step for Miri {
648647 // does not understand the flags added by `add_flags_and_try_run_test`.
649648 let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , compiler, target, builder) ;
650649 {
651- let _time = utils :: timeit ( & builder) ;
650+ let _time = helpers :: timeit ( & builder) ;
652651 builder. run ( & mut cargo) ;
653652 }
654653
@@ -664,7 +663,7 @@ impl Step for Miri {
664663
665664 let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , compiler, target, builder) ;
666665 {
667- let _time = utils :: timeit ( & builder) ;
666+ let _time = helpers :: timeit ( & builder) ;
668667 builder. run ( & mut cargo) ;
669668 }
670669 }
@@ -704,7 +703,7 @@ impl Step for Miri {
704703
705704 let mut cargo = Command :: from ( cargo) ;
706705 {
707- let _time = utils :: timeit ( & builder) ;
706+ let _time = helpers :: timeit ( & builder) ;
708707 builder. run ( & mut cargo) ;
709708 }
710709 }
@@ -865,7 +864,7 @@ impl Step for RustdocTheme {
865864 if builder. is_fuse_ld_lld ( self . compiler . host ) {
866865 cmd. env (
867866 "RUSTDOC_LLD_NO_THREADS" ,
868- utils :: lld_flag_no_threads ( self . compiler . host . contains ( "windows" ) ) ,
867+ helpers :: lld_flag_no_threads ( self . compiler . host . contains ( "windows" ) ) ,
869868 ) ;
870869 }
871870 builder. run_delaying_failure ( & mut cmd) ;
@@ -906,7 +905,7 @@ impl Step for RustdocJSStd {
906905 . arg ( "--test-folder" )
907906 . arg ( builder. src . join ( "tests/rustdoc-js-std" ) ) ;
908907 for path in & builder. paths {
909- if let Some ( p) = utils :: is_valid_test_suite_arg ( path, "tests/rustdoc-js-std" , builder) {
908+ if let Some ( p) = helpers :: is_valid_test_suite_arg ( path, "tests/rustdoc-js-std" , builder) {
910909 if !p. ends_with ( ".js" ) {
911910 eprintln ! ( "A non-js file was given: `{}`" , path. display( ) ) ;
912911 panic ! ( "Cannot run rustdoc-js-std tests" ) ;
@@ -1041,7 +1040,7 @@ impl Step for RustdocGUI {
10411040 . env ( "RUSTC" , builder. rustc ( self . compiler ) ) ;
10421041
10431042 for path in & builder. paths {
1044- if let Some ( p) = utils :: is_valid_test_suite_arg ( path, "tests/rustdoc-gui" , builder) {
1043+ if let Some ( p) = helpers :: is_valid_test_suite_arg ( path, "tests/rustdoc-gui" , builder) {
10451044 if !p. ends_with ( ".goml" ) {
10461045 eprintln ! ( "A non-goml file was given: `{}`" , path. display( ) ) ;
10471046 panic ! ( "Cannot run rustdoc-gui tests" ) ;
@@ -1064,7 +1063,7 @@ impl Step for RustdocGUI {
10641063 cmd. arg ( "--npm" ) . arg ( npm) ;
10651064 }
10661065
1067- let _time = utils :: timeit ( & builder) ;
1066+ let _time = helpers :: timeit ( & builder) ;
10681067 let _guard = builder. msg_sysroot_tool (
10691068 Kind :: Test ,
10701069 self . compiler . stage ,
@@ -1684,7 +1683,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
16841683 }
16851684 }
16861685
1687- if utils :: forcing_clang_based_tests ( ) {
1686+ if helpers :: forcing_clang_based_tests ( ) {
16881687 let clang_exe = builder. llvm_out ( target) . join ( "bin" ) . join ( "clang" ) ;
16891688 cmd. arg ( "--run-clang-based-tests-with" ) . arg ( clang_exe) ;
16901689 }
@@ -1703,7 +1702,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
17031702 // Get test-args by striping suite path
17041703 let mut test_args: Vec < & str > = paths
17051704 . iter ( )
1706- . filter_map ( |p| utils :: is_valid_test_suite_arg ( p, suite_path, builder) )
1705+ . filter_map ( |p| helpers :: is_valid_test_suite_arg ( p, suite_path, builder) )
17071706 . collect ( ) ;
17081707
17091708 test_args. append ( & mut builder. config . test_args ( ) ) ;
@@ -1914,7 +1913,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
19141913 "Check compiletest suite={} mode={} compare_mode={} ({} -> {})" ,
19151914 suite, mode, compare_mode, & compiler. host, target
19161915 ) ) ;
1917- let _time = utils :: timeit ( & builder) ;
1916+ let _time = helpers :: timeit ( & builder) ;
19181917 try_run_tests ( builder, & mut cmd, false ) ;
19191918 }
19201919 }
@@ -1986,7 +1985,7 @@ impl BookTest {
19861985 compiler. host ,
19871986 compiler. host ,
19881987 ) ;
1989- let _time = utils :: timeit ( & builder) ;
1988+ let _time = helpers :: timeit ( & builder) ;
19901989 let toolstate = if builder. run_delaying_failure ( & mut rustbook_cmd) {
19911990 ToolState :: TestPass
19921991 } else {
@@ -2008,7 +2007,7 @@ impl BookTest {
20082007 // Do a breadth-first traversal of the `src/doc` directory and just run
20092008 // tests for all files that end in `*.md`
20102009 let mut stack = vec ! [ builder. src. join( self . path) ] ;
2011- let _time = utils :: timeit ( & builder) ;
2010+ let _time = helpers :: timeit ( & builder) ;
20122011 let mut files = Vec :: new ( ) ;
20132012 while let Some ( p) = stack. pop ( ) {
20142013 if p. is_dir ( ) {
@@ -2119,7 +2118,7 @@ impl Step for ErrorIndex {
21192118
21202119 let guard =
21212120 builder. msg ( Kind :: Test , compiler. stage , "error-index" , compiler. host , compiler. host ) ;
2122- let _time = utils :: timeit ( & builder) ;
2121+ let _time = helpers :: timeit ( & builder) ;
21232122 builder. run_quiet ( & mut tool) ;
21242123 drop ( guard) ;
21252124 // The tests themselves need to link to std, so make sure it is
@@ -2241,7 +2240,7 @@ fn run_cargo_test<'a>(
22412240) -> bool {
22422241 let mut cargo =
22432242 prepare_cargo_test ( cargo, libtest_args, crates, primary_crate, compiler, target, builder) ;
2244- let _time = utils :: timeit ( & builder) ;
2243+ let _time = helpers :: timeit ( & builder) ;
22452244 let _group = description. into ( ) . and_then ( |what| {
22462245 builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , what, compiler. host , target)
22472246 } ) ;
@@ -2636,7 +2635,7 @@ impl Step for RemoteCopyLibs {
26362635 for f in t ! ( builder. sysroot_libdir( compiler, target) . read_dir( ) ) {
26372636 let f = t ! ( f) ;
26382637 let name = f. file_name ( ) . into_string ( ) . unwrap ( ) ;
2639- if utils :: is_dylib ( & name) {
2638+ if helpers :: is_dylib ( & name) {
26402639 builder. run ( Command :: new ( & tool) . arg ( "push" ) . arg ( f. path ( ) ) ) ;
26412640 }
26422641 }
@@ -2681,7 +2680,7 @@ impl Step for Distcheck {
26812680 . current_dir ( & dir) ,
26822681 ) ;
26832682 builder. run (
2684- Command :: new ( utils :: make ( & builder. config . build . triple ) ) . arg ( "check" ) . current_dir ( & dir) ,
2683+ Command :: new ( helpers :: make ( & builder. config . build . triple ) ) . arg ( "check" ) . current_dir ( & dir) ,
26852684 ) ;
26862685
26872686 // Now make sure that rust-src has all of libstd's dependencies
@@ -3061,7 +3060,7 @@ impl Step for CodegenCranelift {
30613060 & compiler. host,
30623061 target
30633062 ) ) ;
3064- let _time = utils :: timeit ( & builder) ;
3063+ let _time = helpers :: timeit ( & builder) ;
30653064
30663065 // FIXME handle vendoring for source tarballs before removing the --skip-test below
30673066 let download_dir = builder. out . join ( "cg_clif_download" ) ;
0 commit comments