Skip to content

Commit dd1e35f

Browse files
committed
run_crash_test(): better error message when we get a none-ice
1 parent dde3178 commit dd1e35f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ impl<'test> TestCx<'test> {
368368
// if a test does not crash, consider it an error
369369
match proc_res.status.code() {
370370
Some(101) => (),
371-
_ => self.fatal("expected ICE"),
371+
Some(other) => self.fatal(&format!("expected exit code 101, got: {}", other)),
372+
e => self.fatal(&format!("expected ICE, got '{:?}'", e)),
372373
}
373374
}
374375

@@ -2320,6 +2321,9 @@ impl<'test> TestCx<'test> {
23202321
}
23212322

23222323
let (Output { status, stdout, stderr }, truncated) = self.read2_abbreviated(child);
2324+
eprintln!("{:?}", status);
2325+
eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned());
2326+
eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned());
23232327

23242328
let result = ProcRes {
23252329
status,

0 commit comments

Comments
 (0)