@@ -25,11 +25,10 @@ use crate::core::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
25
25
use crate :: core:: config:: flags:: get_completion;
26
26
use crate :: core:: config:: flags:: Subcommand ;
27
27
use 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} ;
33
32
use crate :: { envify, CLang , DocTests , GitRepo , Mode } ;
34
33
35
34
const ADB_TEST_DIR : & str = "/data/local/tmp/work" ;
@@ -169,7 +168,7 @@ You can skip linkcheck with --skip src/tools/linkchecker"
169
168
// Run the linkchecker.
170
169
let _guard =
171
170
builder. msg ( Kind :: Test , compiler. stage , "Linkcheck" , bootstrap_host, bootstrap_host) ;
172
- let _time = utils :: timeit ( & builder) ;
171
+ let _time = helpers :: timeit ( & builder) ;
173
172
builder. run_delaying_failure ( linkchecker. arg ( builder. out . join ( host. triple ) . join ( "doc" ) ) ) ;
174
173
}
175
174
@@ -266,7 +265,7 @@ impl Step for Cargotest {
266
265
let out_dir = builder. out . join ( "ct" ) ;
267
266
t ! ( fs:: create_dir_all( & out_dir) ) ;
268
267
269
- let _time = utils :: timeit ( & builder) ;
268
+ let _time = helpers :: timeit ( & builder) ;
270
269
let mut cmd = builder. tool_cmd ( Tool :: CargoTest ) ;
271
270
builder. run_delaying_failure (
272
271
cmd. arg ( & cargo)
@@ -334,7 +333,7 @@ impl Step for Cargo {
334
333
builder,
335
334
) ;
336
335
337
- let _time = utils :: timeit ( & builder) ;
336
+ let _time = helpers :: timeit ( & builder) ;
338
337
add_flags_and_try_run_tests ( builder, & mut cargo) ;
339
338
}
340
339
}
@@ -648,7 +647,7 @@ impl Step for Miri {
648
647
// does not understand the flags added by `add_flags_and_try_run_test`.
649
648
let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , compiler, target, builder) ;
650
649
{
651
- let _time = utils :: timeit ( & builder) ;
650
+ let _time = helpers :: timeit ( & builder) ;
652
651
builder. run ( & mut cargo) ;
653
652
}
654
653
@@ -664,7 +663,7 @@ impl Step for Miri {
664
663
665
664
let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , compiler, target, builder) ;
666
665
{
667
- let _time = utils :: timeit ( & builder) ;
666
+ let _time = helpers :: timeit ( & builder) ;
668
667
builder. run ( & mut cargo) ;
669
668
}
670
669
}
@@ -704,7 +703,7 @@ impl Step for Miri {
704
703
705
704
let mut cargo = Command :: from ( cargo) ;
706
705
{
707
- let _time = utils :: timeit ( & builder) ;
706
+ let _time = helpers :: timeit ( & builder) ;
708
707
builder. run ( & mut cargo) ;
709
708
}
710
709
}
@@ -865,7 +864,7 @@ impl Step for RustdocTheme {
865
864
if builder. is_fuse_ld_lld ( self . compiler . host ) {
866
865
cmd. env (
867
866
"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" ) ) ,
869
868
) ;
870
869
}
871
870
builder. run_delaying_failure ( & mut cmd) ;
@@ -906,7 +905,7 @@ impl Step for RustdocJSStd {
906
905
. arg ( "--test-folder" )
907
906
. arg ( builder. src . join ( "tests/rustdoc-js-std" ) ) ;
908
907
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) {
910
909
if !p. ends_with ( ".js" ) {
911
910
eprintln ! ( "A non-js file was given: `{}`" , path. display( ) ) ;
912
911
panic ! ( "Cannot run rustdoc-js-std tests" ) ;
@@ -1041,7 +1040,7 @@ impl Step for RustdocGUI {
1041
1040
. env ( "RUSTC" , builder. rustc ( self . compiler ) ) ;
1042
1041
1043
1042
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) {
1045
1044
if !p. ends_with ( ".goml" ) {
1046
1045
eprintln ! ( "A non-goml file was given: `{}`" , path. display( ) ) ;
1047
1046
panic ! ( "Cannot run rustdoc-gui tests" ) ;
@@ -1064,7 +1063,7 @@ impl Step for RustdocGUI {
1064
1063
cmd. arg ( "--npm" ) . arg ( npm) ;
1065
1064
}
1066
1065
1067
- let _time = utils :: timeit ( & builder) ;
1066
+ let _time = helpers :: timeit ( & builder) ;
1068
1067
let _guard = builder. msg_sysroot_tool (
1069
1068
Kind :: Test ,
1070
1069
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
1684
1683
}
1685
1684
}
1686
1685
1687
- if utils :: forcing_clang_based_tests ( ) {
1686
+ if helpers :: forcing_clang_based_tests ( ) {
1688
1687
let clang_exe = builder. llvm_out ( target) . join ( "bin" ) . join ( "clang" ) ;
1689
1688
cmd. arg ( "--run-clang-based-tests-with" ) . arg ( clang_exe) ;
1690
1689
}
@@ -1703,7 +1702,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
1703
1702
// Get test-args by striping suite path
1704
1703
let mut test_args: Vec < & str > = paths
1705
1704
. 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) )
1707
1706
. collect ( ) ;
1708
1707
1709
1708
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
1914
1913
"Check compiletest suite={} mode={} compare_mode={} ({} -> {})" ,
1915
1914
suite, mode, compare_mode, & compiler. host, target
1916
1915
) ) ;
1917
- let _time = utils :: timeit ( & builder) ;
1916
+ let _time = helpers :: timeit ( & builder) ;
1918
1917
try_run_tests ( builder, & mut cmd, false ) ;
1919
1918
}
1920
1919
}
@@ -1986,7 +1985,7 @@ impl BookTest {
1986
1985
compiler. host ,
1987
1986
compiler. host ,
1988
1987
) ;
1989
- let _time = utils :: timeit ( & builder) ;
1988
+ let _time = helpers :: timeit ( & builder) ;
1990
1989
let toolstate = if builder. run_delaying_failure ( & mut rustbook_cmd) {
1991
1990
ToolState :: TestPass
1992
1991
} else {
@@ -2008,7 +2007,7 @@ impl BookTest {
2008
2007
// Do a breadth-first traversal of the `src/doc` directory and just run
2009
2008
// tests for all files that end in `*.md`
2010
2009
let mut stack = vec ! [ builder. src. join( self . path) ] ;
2011
- let _time = utils :: timeit ( & builder) ;
2010
+ let _time = helpers :: timeit ( & builder) ;
2012
2011
let mut files = Vec :: new ( ) ;
2013
2012
while let Some ( p) = stack. pop ( ) {
2014
2013
if p. is_dir ( ) {
@@ -2119,7 +2118,7 @@ impl Step for ErrorIndex {
2119
2118
2120
2119
let guard =
2121
2120
builder. msg ( Kind :: Test , compiler. stage , "error-index" , compiler. host , compiler. host ) ;
2122
- let _time = utils :: timeit ( & builder) ;
2121
+ let _time = helpers :: timeit ( & builder) ;
2123
2122
builder. run_quiet ( & mut tool) ;
2124
2123
drop ( guard) ;
2125
2124
// The tests themselves need to link to std, so make sure it is
@@ -2241,7 +2240,7 @@ fn run_cargo_test<'a>(
2241
2240
) -> bool {
2242
2241
let mut cargo =
2243
2242
prepare_cargo_test ( cargo, libtest_args, crates, primary_crate, compiler, target, builder) ;
2244
- let _time = utils :: timeit ( & builder) ;
2243
+ let _time = helpers :: timeit ( & builder) ;
2245
2244
let _group = description. into ( ) . and_then ( |what| {
2246
2245
builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , what, compiler. host , target)
2247
2246
} ) ;
@@ -2636,7 +2635,7 @@ impl Step for RemoteCopyLibs {
2636
2635
for f in t ! ( builder. sysroot_libdir( compiler, target) . read_dir( ) ) {
2637
2636
let f = t ! ( f) ;
2638
2637
let name = f. file_name ( ) . into_string ( ) . unwrap ( ) ;
2639
- if utils :: is_dylib ( & name) {
2638
+ if helpers :: is_dylib ( & name) {
2640
2639
builder. run ( Command :: new ( & tool) . arg ( "push" ) . arg ( f. path ( ) ) ) ;
2641
2640
}
2642
2641
}
@@ -2681,7 +2680,7 @@ impl Step for Distcheck {
2681
2680
. current_dir ( & dir) ,
2682
2681
) ;
2683
2682
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) ,
2685
2684
) ;
2686
2685
2687
2686
// Now make sure that rust-src has all of libstd's dependencies
@@ -3061,7 +3060,7 @@ impl Step for CodegenCranelift {
3061
3060
& compiler. host,
3062
3061
target
3063
3062
) ) ;
3064
- let _time = utils :: timeit ( & builder) ;
3063
+ let _time = helpers :: timeit ( & builder) ;
3065
3064
3066
3065
// FIXME handle vendoring for source tarballs before removing the --skip-test below
3067
3066
let download_dir = builder. out . join ( "cg_clif_download" ) ;
0 commit comments