diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-30 00:41:57 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-14 11:21:58 +0200 |
| commit | 6d9175f98e78118dd2467f285b16663842be5b61 (patch) | |
| tree | c5bf8bf315fadce0fffe5f604ada5786d6ef52d0 /src | |
| parent | 7d826ae43eb88750bd6745d73e100965bad72520 (diff) | |
| download | rust-6d9175f98e78118dd2467f285b16663842be5b61.tar.gz rust-6d9175f98e78118dd2467f285b16663842be5b61.zip | |
crashes: fix ice detection which did not trigger if code compiled without error by accident
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 9b98e78b15b..759b07abc6e 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -364,13 +364,16 @@ impl<'test> TestCx<'test> { fn run_crash_test(&self) { let pm = self.pass_mode(); let proc_res = self.compile_test(WillExecute::No, self.should_emit_metadata(pm)); + /* + eprintln!("{}", proc_res.status); + eprintln!("{}", proc_res.stdout); + eprintln!("{}", proc_res.stderr); + eprintln!("{}", proc_res.cmdline); + */ // if a test does not crash, consider it an error - if !proc_res.status.success() { - match proc_res.status.code() { - Some(1 | 0) => self.fatal(&format!("test no longer crashes/triggers ICE! Please annotate it and add it as test to tests/ui or wherever you see fit")), - _ => (), - } + if proc_res.status.success() || matches!(proc_res.status.code(), Some(1 | 0)) { + self.fatal(&format!("test no longer crashes/triggers ICE! Please annotate it and add it as test to tests/ui or wherever you see fit")); } } @@ -2322,9 +2325,6 @@ impl<'test> TestCx<'test> { } let (Output { status, stdout, stderr }, truncated) = self.read2_abbreviated(child); - eprintln!("{:?}", status); - eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned()); - eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned()); let result = ProcRes { status, |
