Skip to content

Commit

Permalink
Fail if I/O error occurs during testing
Browse files Browse the repository at this point in the history
(cherry picked from commit a5ba752)
  • Loading branch information
Mark-Simulacrum authored and Elinvynia committed May 22, 2020
1 parent eb09068 commit 9021f24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 9021f24

Please sign in to comment.