Skip to content

Commit 616469a

Browse files
Fix rustdoc-gui tester
1 parent fe37f37 commit 616469a

File tree

1 file changed

+6
-3
lines changed
  • src/tools/rustdoc-gui-test/src

1 file changed

+6
-3
lines changed

src/tools/rustdoc-gui-test/src/main.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn find_librs<P: AsRef<Path>>(path: P) -> Option<PathBuf> {
6767
None
6868
}
6969

70-
fn main() {
70+
fn main() -> Result<(), ()> {
7171
let config = Arc::new(Config::from_args(env::args().collect()));
7272

7373
// The goal here is to check if the necessary packages are installed, and if not, we
@@ -128,7 +128,10 @@ If you want to install the `browser-ui-test` dependency, run `npm install browse
128128
}
129129
}
130130

131-
try_run(&mut cargo, config.verbose);
131+
if !try_run(&mut cargo, config.verbose) {
132+
eprintln!("failed to document `{}`", entry.path().display());
133+
panic!("Cannot run rustdoc-gui tests");
134+
}
132135
}
133136
}
134137

@@ -158,5 +161,5 @@ If you want to install the `browser-ui-test` dependency, run `npm install browse
158161

159162
command.args(&config.test_args);
160163

161-
try_run(&mut command, config.verbose);
164+
if try_run(&mut command, config.verbose) { Ok(()) } else { Err(()) }
162165
}

0 commit comments

Comments
 (0)