mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-13 22:32:35 +00:00
Merge pull request #1313 from guswynn/master
collect all test failures before failing
This commit is contained in:
commit
6fed9e52f9
1 changed files with 6 additions and 1 deletions
|
@ -250,6 +250,7 @@ impl MDBook {
|
|||
// Index Preprocessor is disabled so that chapter paths continue to point to the
|
||||
// actual markdown files.
|
||||
|
||||
let mut failed = false;
|
||||
for item in book.iter() {
|
||||
if let BookItem::Chapter(ref ch) = *item {
|
||||
let chapter_path = match ch.path {
|
||||
|
@ -282,7 +283,8 @@ impl MDBook {
|
|||
let output = cmd.output()?;
|
||||
|
||||
if !output.status.success() {
|
||||
bail!(
|
||||
failed = true;
|
||||
error!(
|
||||
"rustdoc returned an error:\n\
|
||||
\n--- stdout\n{}\n--- stderr\n{}",
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
|
@ -291,6 +293,9 @@ impl MDBook {
|
|||
}
|
||||
}
|
||||
}
|
||||
if failed {
|
||||
bail!("One or more tests failed");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue