compiletest: Printing process output panics if the output contains unknown JSON-like text #126373
Labels
A-compiletest
Area: The compiletest test runner
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When a process unexpectedly fails/succeeds, compiletest will often print a full dump of its stdout and stderr for diagnostic purposes.
When this happens,
ProcRes::print_info
calls intoextract_rendered
, which has special handling for lines starting with{
. It tries to parse the line as JSON in one of a few known compiler-specific formats, in order to replace it with a more human-friendly message.If the line doesn't match any of those formats (or isn't valid JSON), the extractor code will panic, instead of just printing the line as-is. This is awkward in cases where we actually wanted to print the line as-is anyway, because now the error messages are less helpful.
@rustbot label +A-compiletest
The text was updated successfully, but these errors were encountered: