compiletest: show the difference between the normalized output and the actual output for lines which didn't match by jyn514 · Pull Request #133733 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation19 Commits1 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jyn514

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 }

@rustbot rustbot added A-compiletest

Area: The compiletest test runner

A-testsuite

Area: The testsuite used to check the correctness of rustc

S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

labels

Dec 2, 2024

@rustbot

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@jyn514

let's just r? jieyouxu since you have context from discord already

@jyn514

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?

@jyn514

oh, also i am going to change this to unconditionally print the full stdout if you pass --verbose

jieyouxu

Member

@jieyouxu jieyouxu left a comment • Loading

@jyn514

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.

i don't understand what you mean by this. what are the other diffs you think are being hidden?

@jyn514

i have changed this to do nothing except show the diff between the actual stderr and the normalized output.

@jyn514 jyn514 changed the titleMake compiletest diffs more useful compiletest: show the difference between the normalized output and th…

Dec 3, 2024

@jyn514 jyn514 changed the title compiletest: show the difference between the normalized output and th… compiletest: show the difference between the normalized output and the actual output for lines which didn't match

Dec 3, 2024

@rust-log-analyzer

This comment has been minimized.

@jieyouxu

i don't understand what you mean by this. what are the other diffs you think are being hidden?

I think I misinterpreted when you said

Outside of CI, only show one of the diff and the full stderr

jieyouxu

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.

@jieyouxu

@bors

✌️ @jyn514, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@jieyouxu jieyouxu added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Dec 4, 2024

@bors

@jyn514

@jieyouxu

@bors r- (needs a rebase)

@bors bors added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Dec 7, 2024

@jyn514 @jieyouxu

…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 }

@jieyouxu

Rebased due to one single eprintln vs println difference, no functional changes. Retested locally e.g.

Note: some mismatched output was normalized before being compared
-       error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-         --> /home/joe/repos/rust/tests/ui/alias-uninit-value.rs:8:12
+       error[E0277]: the meow values of type `[u8]` cannot be known at compilation time
+          = help: unsized fn params are gated as an unstable feature

@jieyouxu

@bors r+ rollup (trivial rebase, no functional changes)

@bors

📌 Commit 8aacd1c has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Dec 7, 2024

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Dec 7, 2024

@workingjubilee

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 }

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 7, 2024

@bors

…kingjubilee

Rollup of 11 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 7, 2024

@bors

…kingjubilee

Rollup of 11 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 7, 2024

@bors

…kingjubilee

Rollup of 11 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 7, 2024

@bors

…kingjubilee

Rollup of 11 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Dec 8, 2024

@workingjubilee

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 }

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 8, 2024

@bors

…kingjubilee

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 8, 2024

@bors

…kingjubilee

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Dec 8, 2024

@workingjubilee

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 }

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 8, 2024

@bors

[TEST] Rollup of 5 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

try-job: i686-mingw

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 8, 2024

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 8, 2024

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Dec 9, 2024

@rust-timer

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 }

Labels

A-compiletest

Area: The compiletest test runner

A-testsuite

Area: The testsuite used to check the correctness of rustc

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)