Auto merge of #72089 - Mark-Simulacrum:error-is-really-an-error, r=pietroalbini

Fail if I/O error occurs during testing

First known case of this is in https://github.com/rust-lang/rust/pull/72053#issuecomment-626364402 but may have happened before then.

r? @pietroalbini
This commit is contained in:
bors 2020-05-11 16:33:26 +00:00
commit 99cb9ccb9c
1 changed files with 4 additions and 1 deletions

View File

@ -347,7 +347,10 @@ pub fn run_tests(config: Config) {
Ok(true) => {}
Ok(false) => panic!("Some tests failed"),
Err(e) => {
println!("I/O failure during tests: {:?}", e);
// We don't know if tests passed or not, but if there was an error
// during testing we don't want to just suceeed (we may not have
// tested something), so fail.
panic!("I/O failure during tests: {:?}", e);
}
}
}