Skip to content

Commit ee98c6f

Browse files
Don't show HTML diff if tidy isn't installed for rustdoc tests
1 parent 4b9f5cc commit ee98c6f

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
@@ -2365,6 +2365,9 @@ impl<'test> TestCx<'test> {
23652365
}
23662366

23672367
fn compare_to_default_rustdoc(&mut self, out_dir: &Path) {
2368+
if !self.config.has_tidy {
2369+
return;
2370+
}
23682371
println!("info: generating a diff against nightly rustdoc");
23692372

23702373
let suffix =
@@ -2426,10 +2429,8 @@ impl<'test> TestCx<'test> {
24262429
}
24272430
}
24282431
};
2429-
if self.config.has_tidy {
2430-
tidy_dir(out_dir);
2431-
tidy_dir(&compare_dir);
2432-
}
2432+
tidy_dir(out_dir);
2433+
tidy_dir(&compare_dir);
24332434

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

0 commit comments

Comments
 (0)