-
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
compiletest: show the difference between the normalized output and the actual output for lines which didn't match #133733
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
let's just r? jieyouxu since you have context from discord already |
i am a little unsure about this heuristic, i worry that people will still want to see some of the diff to get an idea of what the errors are? |
oh, also i am going to change this to unconditionally print the full stdout if you pass --verbose |
4682a01
to
50fd83c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Some general feedback:
- We shouldn't hide the rustc command by default because very often contributors will need to look at the command to determine the exact invocation used which can also be used to repro outside of the test framework. I asked about this previously over at https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Vibe.20check.20on.20suppressing.20failed.20test.20command.20invocation, see PR compiletest failing tests aren't that noisy by default #131182 and summary. Maybe a config toggle (extra work impl wise). Note that
--verbose
will also dump a bunch of other things IIRC. I'm not sure if we want to show only one of the diffs, otherwise a contributor will have to rerun this multiple times instead of getting the full list.EDIT: probably misinterpreted- I think hiding the full stderr is okay outside of CI, but I'll make a poll about this in compiler zulip channel. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Vibe.20check.20on.20hiding.20full.20test.20stderr.20outside.20of.20CI
i don't understand what you mean by this. what are the other diffs you think are being hidden? |
50fd83c
to
fa85f12
Compare
i have changed this to do nothing except show the diff between the actual stderr and the normalized output. |
This comment has been minimized.
This comment has been minimized.
I think I misinterpreted when you said
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, you can r=me after PR CI is green.
@bors delegate+ |
☔ The latest upstream changes (presumably #133841) made this pull request unmergeable. Please resolve the merge conflicts. |
fa85f12
to
4ba7019
Compare
@bors r=jieyouxu |
@bors r- (needs a rebase) |
…e actual output for lines which didn't match example output: ``` failures: ---- [ui] tests/ui/layout/enum.rs stdout ---- diff of stderr: - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN } + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } 2 --> $DIR/enum.rs:9:1 3 | 4 LL | enum UninhabitedVariantAlign { Note: some mismatched output was normalized before being compared - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) } - --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1 + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } ```
4ba7019
to
8aacd1c
Compare
Rebased due to one single
|
@bors r+ rollup (trivial rebase, no functional changes) |
compiletest: show the difference between the normalized output and the actual output for lines which didn't match example output: ``` failures: ---- [ui] tests/ui/layout/enum.rs stdout ---- diff of stderr: - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN } + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } 2 --> $DIR/enum.rs:9:1 3 | 4 LL | enum UninhabitedVariantAlign { Note: some mismatched output was normalized before being compared - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) } - --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1 + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } ```
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#131669 (lint: change help for pointers to dyn types in FFI) - rust-lang#133265 (Add a range argument to vec.extract_if) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133955 (Pass the arch rather than full target name to windows_registry::find_tool) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#133987 (Define acronym for thread local storage) - rust-lang#133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#131669 (lint: change help for pointers to dyn types in FFI) - rust-lang#133265 (Add a range argument to vec.extract_if) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133955 (Pass the arch rather than full target name to windows_registry::find_tool) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#133987 (Define acronym for thread local storage) - rust-lang#133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#131669 (lint: change help for pointers to dyn types in FFI) - rust-lang#133265 (Add a range argument to vec.extract_if) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133955 (Pass the arch rather than full target name to windows_registry::find_tool) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#133987 (Define acronym for thread local storage) - rust-lang#133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 11 pull requests Successful merges: - rust-lang#131669 (lint: change help for pointers to dyn types in FFI) - rust-lang#133265 (Add a range argument to vec.extract_if) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133955 (Pass the arch rather than full target name to windows_registry::find_tool) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#133987 (Define acronym for thread local storage) - rust-lang#133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`) r? `@ghost` `@rustbot` modify labels: rollup
compiletest: show the difference between the normalized output and the actual output for lines which didn't match example output: ``` failures: ---- [ui] tests/ui/layout/enum.rs stdout ---- diff of stderr: - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN } + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } 2 --> $DIR/enum.rs:9:1 3 | 4 LL | enum UninhabitedVariantAlign { Note: some mismatched output was normalized before being compared - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) } - --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1 + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } ```
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#133522 (Don't suggest restricting bound with unstable traits on stable and mention it's unstable on nightly) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133861 (Add allocate_bytes and refactor allocate_str in InterpCx for raw byte…) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#133987 (Define acronym for thread local storage) - rust-lang#133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`) r? `@ghost` `@rustbot` modify labels: rollup
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#133522 (Don't suggest restricting bound with unstable traits on stable and mention it's unstable on nightly) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133861 (Add allocate_bytes and refactor allocate_str in InterpCx for raw byte…) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) - rust-lang#133987 (Define acronym for thread local storage) - rust-lang#133992 (Actually walk into lifetimes and attrs in `EarlyContextAndPass`) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`) r? `@ghost` `@rustbot` modify labels: rollup
compiletest: show the difference between the normalized output and the actual output for lines which didn't match example output: ``` failures: ---- [ui] tests/ui/layout/enum.rs stdout ---- diff of stderr: - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN } + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } 2 --> $DIR/enum.rs:9:1 3 | 4 LL | enum UninhabitedVariantAlign { Note: some mismatched output was normalized before being compared - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) } - --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1 + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } ```
[TEST] Rollup of 5 pull requests Successful merges: - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133861 (Add allocate_bytes and refactor allocate_str in InterpCx for raw byte…) - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates) - rust-lang#133976 (Removed Unnecessary Spaces From RELEASES.md) - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-mingw
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133424 (Parse guard patterns) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#134013 (Adds new intrinsic declaration) - rust-lang#134020 (Remove unnecessary `int_type_width_signed` function) - rust-lang#134024 (Advent of `tests/ui` (misc cleanups and improvements) [2/N]) - rust-lang#134038 (deps: Update psm) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133424 (Parse guard patterns) - rust-lang#133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - rust-lang#133993 (Fix: typo in E0751 error explanation) - rust-lang#134013 (Adds new intrinsic declaration) - rust-lang#134020 (Remove unnecessary `int_type_width_signed` function) - rust-lang#134024 (Advent of `tests/ui` (misc cleanups and improvements) [2/N]) - rust-lang#134038 (deps: Update psm) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133733 - jyn514:compiletest-diffs, r=jieyouxu compiletest: show the difference between the normalized output and the actual output for lines which didn't match example output: ``` failures: ---- [ui] tests/ui/layout/enum.rs stdout ---- diff of stderr: - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN } + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } 2 --> $DIR/enum.rs:9:1 3 | 4 LL | enum UninhabitedVariantAlign { Note: some mismatched output was normalized before being compared - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) } - --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1 + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } ```
example output: