diff options
| author | Eric Huss <eric@huss.org> | 2021-06-08 16:15:43 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2021-06-09 08:02:09 -0700 |
| commit | bbd053216341cd3843b8f12da791f533e4480b8d (patch) | |
| tree | 78db3446a0497fee499c24061d36c8ad24e72ae5 /src/bootstrap | |
| parent | 7dd2577abf7420cee54b0281448442d7bcf72165 (diff) | |
| download | rust-bbd053216341cd3843b8f12da791f533e4480b8d.tar.gz rust-bbd053216341cd3843b8f12da791f533e4480b8d.zip | |
Test the linkchecker itself.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder/tests.rs | 5 | ||||
| -rw-r--r-- | src/bootstrap/test.rs | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs index 4d7c207e3ab..e7fb8c0d4d5 100644 --- a/src/bootstrap/builder/tests.rs +++ b/src/bootstrap/builder/tests.rs @@ -613,9 +613,14 @@ mod dist { // Note that the stages here are +1 than what they actually are because // Rustdoc::run swaps out the compiler with stage minus 1 if --stage is // not 0. + // + // The stage 0 copy is the one downloaded for bootstrapping. It is + // (currently) needed to run "cargo test" on the linkchecker, and + // should be relatively "free". assert_eq!( first(builder.cache.all::<tool::Rustdoc>()), &[ + tool::Rustdoc { compiler: Compiler { host: a, stage: 0 } }, tool::Rustdoc { compiler: Compiler { host: a, stage: 1 } }, tool::Rustdoc { compiler: Compiler { host: a, stage: 2 } }, ] diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index cc7c143d474..9debfee58e2 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -124,8 +124,25 @@ You can skip linkcheck with --exclude src/tools/linkchecker" builder.info(&format!("Linkcheck ({})", host)); + // Test the linkchecker itself. + let bootstrap_host = builder.config.build; + let compiler = builder.compiler(0, bootstrap_host); + let cargo = tool::prepare_tool_cargo( + builder, + compiler, + Mode::ToolBootstrap, + bootstrap_host, + "test", + "src/tools/linkchecker", + SourceType::InTree, + &[], + ); + try_run(builder, &mut cargo.into()); + + // Build all the default documentation. builder.default_doc(&[]); + // Run the linkchecker. let _time = util::timeit(&builder); try_run( builder, |
