about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-04 03:36:10 +0000
committerbors <bors@rust-lang.org>2019-08-04 03:36:10 +0000
commit2c13edcd9d64f640261c488e04459733313f3843 (patch)
tree1f05538ce2cfe35cfb9ccdd6e2182b2b20c2ae5e
parent17099768ea22666bed811c5f8a67610e8af9caad (diff)
parent2da89dea4b724647eb08598f9c5a96c14934ac8a (diff)
downloadrust-2c13edcd9d64f640261c488e04459733313f3843.tar.gz
rust-2c13edcd9d64f640261c488e04459733313f3843.zip
Auto merge of #63199 - ehuss:fix-rustc-guide-toolstate, r=kennytm
Fix rustc-guide toolstate tracking.

The rustc-guide is still not saving its toolstate.  It needs to be done explicitly.

Note: There are some confusing bits here, like without `--no-fail-fast`, it saves the wrong value in `toolstates.json`.  Also, "rustbook" is always added as "test-fail".  Presumably [this code](https://github.com/rust-lang/rust/blame/63c1f17d950bfefc8f356777f124f304f0575c76/src/bootstrap/tool.rs#L201-L205) assumes everything fails until it passes tests, which is a bit confusing for things that don't run tests.

cc @mark-i-m
-rw-r--r--src/bootstrap/test.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 1f81efd16a7..e5b0a46ba6f 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1527,7 +1527,12 @@ impl Step for RustcGuide {
     fn run(self, builder: &Builder<'_>) {
         let src = builder.src.join("src/doc/rustc-guide");
         let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
-        try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src));
+        let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) {
+            ToolState::TestPass
+        } else {
+            ToolState::TestFail
+        };
+        builder.save_toolstate("rustc-guide", toolstate);
     }
 }