Skip to content

Commit

Permalink
Fix rustdoc-gui tester
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 23, 2023
1 parent fe37f37 commit 616469a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tools/rustdoc-gui-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn find_librs<P: AsRef<Path>>(path: P) -> Option<PathBuf> {
None
}

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

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

try_run(&mut cargo, config.verbose);
if !try_run(&mut cargo, config.verbose) {
eprintln!("failed to document `{}`", entry.path().display());
panic!("Cannot run rustdoc-gui tests");
}
}
}

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

command.args(&config.test_args);

try_run(&mut command, config.verbose);
if try_run(&mut command, config.verbose) { Ok(()) } else { Err(()) }
}

0 comments on commit 616469a

Please sign in to comment.