Skip to content

Commit

Permalink
Auto merge of #59769 - RalfJung:compiletest-normalization, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

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.
  • Loading branch information
bors committed Apr 16, 2019
2 parents c49a974 + 1e56ede commit 5f7e375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ pub fn extract_rendered(output: &str, proc_res: &ProcRes) -> String {
}
}
} else {
None
// preserve non-JSON lines, such as ICEs
Some(format!("{}\n", line))
}
})
.collect()
Expand Down

0 comments on commit 5f7e375

Please sign in to comment.