-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rustdoc gui tester #112962
Fix rustdoc gui tester #112962
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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"); | ||
} | ||
} | ||
} | ||
|
||
|
@@ -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(()) } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error message would be less good because of the panic. I think |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at cause if this bug, i want to slap
must_use
overtry_run
and find all similar places.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. Doing that shortly.