compiletest should note when test output is normalized #125537
Labels
A-compiletest
Area: The compiletest test runner
A-contributor-roadblock
Area: Makes things more difficult for new contributors to rust itself
A-diagnostics
Area: Messages for errors, warnings, and lints
A-testsuite
Area: The testsuite used to check the correctness of rustc
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
compiletest has two basic kinds of normalization:
normalize-stderr
pattern. this is what the UI suite uses.normalizing outputs can lead to some extremely confusing errors, such as #121571 (comment). to avoid misleading contributors, it should note when the output has been normalized.
the first part is not too hard; it can save list of lines that have been modified in each test and print something like "note: 32/32 lines that did not match were normalized before comparison; see build/test/ui/foo.out.orig for unnormalized version"
(note that the unnormalized file already exists today but almost nobody knows about it).
the second part is trickier; run-make tests often run sed before comparing, and this is opaque to compiletest. perhaps fixing this can be part of the ongoing work to switch run-make to rust? and, in the meantime, introduce a new SED script, based off cut-and-grep.sh, to prevent the problem from getting worse? cc @jieyouxu
@rustbot label A-contributor-roadblock A-diagnostics D-confusing A-testsuite
The text was updated successfully, but these errors were encountered: