Skip to content

Commit 2e99221

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/compiletest/src/runtest.rs

+5-1
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

@@ -2307,6 +2308,9 @@ impl<'test> TestCx<'test> {
23072308
}
23082309

23092310
let (Output { status, stdout, stderr }, truncated) = self.read2_abbreviated(child);
2311+
eprintln!("{:?}", status);
2312+
eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned());
2313+
eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned());
23102314

23112315
let result = ProcRes {
23122316
status,

0 commit comments

Comments
 (0)