Skip to content

Commit 2c13edc

Browse files
committed
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
2 parents 1709976 + 2da89de commit 2c13edc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/test.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,12 @@ impl Step for RustcGuide {
15271527
fn run(self, builder: &Builder<'_>) {
15281528
let src = builder.src.join("src/doc/rustc-guide");
15291529
let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
1530-
try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src));
1530+
let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) {
1531+
ToolState::TestPass
1532+
} else {
1533+
ToolState::TestFail
1534+
};
1535+
builder.save_toolstate("rustc-guide", toolstate);
15311536
}
15321537
}
15331538

0 commit comments

Comments
 (0)