-
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
Squelch a noisy rustc_expand unittest #113942
Conversation
r? @fee1-dead (rustbot has picked a reviewer for you, use r? to override) |
I would prefer this approach. I'm fine for this to land as a temporary solution. Would you be willing to do this in this PR or in a followup PR? If not I'd be happy to open an issue for this. I suppose In any case, could you please add a FIXME here and r=me afterwards? Thanks. |
Unfortunately that doesn't work because the panic is a non-string value (FatalErrorMarker I think?). It could maybe do a catch_unwind to assert the correct panic is raised. |
294c119
to
1584e5f
Compare
OK, I pushed an update that uses a custom EmitterWriter. I tried to avoid creating too much extra code, and share what was already there. As a side note, I changed the default diagnostic-width from |
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.
LGTM. Thanks!
@bors r+ rollup |
…ee1-dead Squelch a noisy rustc_expand unittest The test `rustc_parse::tests::bad_path_expr_1` prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.
…ee1-dead Squelch a noisy rustc_expand unittest The test `rustc_parse::tests::bad_path_expr_1` prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.
…ee1-dead Squelch a noisy rustc_expand unittest The test `rustc_parse::tests::bad_path_expr_1` prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.
☔ The latest upstream changes (presumably #114054) made this pull request unmergeable. Please resolve the merge conflicts. |
1584e5f
to
9914ae3
Compare
Rebased due to conflicts. @bors r=fee1-dead |
…ee1-dead Squelch a noisy rustc_expand unittest The test `rustc_parse::tests::bad_path_expr_1` prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#101994 (rand: freebsd update, using getrandom.) - rust-lang#113930 (Add Param and Bound ty to SMIR) - rust-lang#113942 (Squelch a noisy rustc_expand unittest) - rust-lang#113996 (Define CMAKE_SYSTEM_NAME on a cross build targeting DragonFly.) - rust-lang#114070 (Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy) - rust-lang#114073 (Remove -Z diagnostic-width) - rust-lang#114090 (compiletest: remove ci-specific remap-path-prefix) r? `@ghost` `@rustbot` modify labels: rollup
The test
rustc_parse::tests::bad_path_expr_1
prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.