-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui tests should just show the stderr diff #46826
Comments
cc @oli-obk @petrochenkov -- two people who care about test suite I know, sorry if I'm forgetting to cc others =) |
Sounds like reinventing features from existing diff libraries where there might be a crate that can do it nicely! |
Hello! I'm a Rust-learner and was wondering if I could pick up this issue? |
@omakk If you're busy at the moment, do you mind if I take on this issue? |
@ritiek Yes, go ahead! I unfortunately can not find the time to look at this. Apologies for the late update. |
I never read these diffs, personally, just run |
…omatsakis Show only stderr diff when a ui test fails Addresses rust-lang#46826. This PR will print the normalized output if expected text is empty otherwise it will just print the diff. Should we also show a few (actual == expected) lines above & below when displaying the diff? What about indicating line numbers as well so one can quickly check mismatch lines in .stderr file?
I suppose this can now be closed with #47185. |
Currently, when a UI test fails, it prints a sort of overwhelming amount of stuff:
rust/src/tools/compiletest/src/runtest.rs
Lines 2712 to 2722 in a3c3245
I think what I would like is something like:
If the expected text is empty, just dump the actual (normalized) output, so people can copy-and-paste it if they want.
Else, just print the diff. And probably it'd be nice to strip off the "prefix" and "suffix" of unchanged lines, and just show the parts that vary (we could imagine breaking things into hunks).
The text was updated successfully, but these errors were encountered: