Skip to content

Commit 5f7e375

Browse files
committed
Auto merge of #59769 - RalfJung:compiletest-normalization, r=alexcrichton
compiletest normalization: preserve non-JSON lines such as ICEs Currently, every non-JSON line from stderr gets normalized away when compiletest normalizes the output. In particular, ICEs get normalized to the empty output. That does not seem desirable, so this changes normalization to preserve non-JSON lines instead. Also see Manishearth/compiletest-rs#169: because of that bug, Miri currently *looks* green in the toolstate, but some tests ICE. That same bug is likely no longer present in latest compiletest because the error code gets checked separately, but it still seems like a good idea to also make sure that ICEs are considered stderr output: This change found an accidental user-visible `error!` in CTFE validation (fixed), and a non-deterministic panic when there are two `main` symbols (not fixed, no idea where this comes from). Both got missed before because non-JSON output got ignored.
2 parents c49a974 + 1e56ede commit 5f7e375

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/json.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ pub fn extract_rendered(output: &str, proc_res: &ProcRes) -> String {
7878
}
7979
}
8080
} else {
81-
None
81+
// preserve non-JSON lines, such as ICEs
82+
Some(format!("{}\n", line))
8283
}
8384
})
8485
.collect()

0 commit comments

Comments
 (0)