From a5ba75283e279205dd96d402dfde42041ac53fb4 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 10 May 2020 16:53:48 -0400 Subject: [PATCH] Fail if I/O error occurs during testing --- src/tools/compiletest/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 3a8a5491255a0..93a414ff6b9f3 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -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); } } }