Skip to content

Commit 423fc34

Browse files
authored
Rollup merge of #83228 - GuillaumeGomez:no-diff-if-no-tidy, r=jyn514
Don't show HTML diff if tidy isn't installed for rustdoc tests The output without the `tidy` tool is just way too big to be of any use. It makes reading the error much more complicated. r? `@jyn514`
2 parents af9ed1d + ee98c6f commit 423fc34

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/tools/compiletest/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn main() {
4444
}
4545

4646
if !config.has_tidy && config.mode == Mode::Rustdoc {
47-
eprintln!("warning: `tidy` is not installed; generated diffs will be harder to read");
47+
eprintln!("warning: `tidy` is not installed; diffs will not be generated");
4848
}
4949

5050
log_config(&config);

src/tools/compiletest/src/runtest.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -2367,6 +2367,9 @@ impl<'test> TestCx<'test> {
23672367
}
23682368

23692369
fn compare_to_default_rustdoc(&mut self, out_dir: &Path) {
2370+
if !self.config.has_tidy {
2371+
return;
2372+
}
23702373
println!("info: generating a diff against nightly rustdoc");
23712374

23722375
let suffix =
@@ -2428,10 +2431,8 @@ impl<'test> TestCx<'test> {
24282431
}
24292432
}
24302433
};
2431-
if self.config.has_tidy {
2432-
tidy_dir(out_dir);
2433-
tidy_dir(&compare_dir);
2434-
}
2434+
tidy_dir(out_dir);
2435+
tidy_dir(&compare_dir);
24352436

24362437
let pager = {
24372438
let output = Command::new("git").args(&["config", "--get", "core.pager"]).output().ok();

0 commit comments

Comments
 (0)