@@ -37,6 +37,7 @@ use crate::{CLang, DocTests, GitRepo, Mode, PathSet, envify};
3737
3838mod book_tests;
3939mod bootstrap_self_tests;
40+ mod cargotest;
4041mod compiler_crate_tests;
4142mod compiletest_self_tests;
4243mod compiletest_suites;
@@ -200,54 +201,6 @@ impl Step for HtmlCheck {
200201 }
201202}
202203
203- /// Builds cargo and then runs the `src/tools/cargotest` tool, which checks out
204- /// some representative crate repositories and runs `cargo test` on them, in
205- /// order to test cargo.
206- #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
207- pub struct Cargotest {
208- stage : u32 ,
209- host : TargetSelection ,
210- }
211-
212- impl Step for Cargotest {
213- type Output = ( ) ;
214- const ONLY_HOSTS : bool = true ;
215-
216- fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
217- run. path ( "src/tools/cargotest" )
218- }
219-
220- fn make_run ( run : RunConfig < ' _ > ) {
221- run. builder . ensure ( Cargotest { stage : run. builder . top_stage , host : run. target } ) ;
222- }
223-
224- /// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler.
225- ///
226- /// This tool in `src/tools` will check out a few Rust projects and run `cargo
227- /// test` to ensure that we don't regress the test suites there.
228- fn run ( self , builder : & Builder < ' _ > ) {
229- let compiler = builder. compiler ( self . stage , self . host ) ;
230- builder. ensure ( compile:: Rustc :: new ( compiler, compiler. host ) ) ;
231- let cargo = builder. ensure ( tool:: Cargo { compiler, target : compiler. host } ) ;
232-
233- // Note that this is a short, cryptic, and not scoped directory name. This
234- // is currently to minimize the length of path on Windows where we otherwise
235- // quickly run into path name limit constraints.
236- let out_dir = builder. out . join ( "ct" ) ;
237- t ! ( fs:: create_dir_all( & out_dir) ) ;
238-
239- let _time = helpers:: timeit ( builder) ;
240- let mut cmd = builder. tool_cmd ( Tool :: CargoTest ) ;
241- cmd. arg ( & cargo)
242- . arg ( & out_dir)
243- . args ( builder. config . test_args ( ) )
244- . env ( "RUSTC" , builder. rustc ( compiler) )
245- . env ( "RUSTDOC" , builder. rustdoc ( compiler) ) ;
246- add_rustdoc_cargo_linker_args ( & mut cmd, builder, compiler. host , LldThreads :: No ) ;
247- cmd. delay_failure ( ) . run ( builder) ;
248- }
249- }
250-
251204#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
252205pub struct RustdocTheme {
253206 pub compiler : Compiler ,
0 commit comments