-
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 failing tests aren't that noisy by default #131182
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in src/tools/compiletest cc @jieyouxu |
So this one I'm not very sure about. Because having the exact command invocation has been useful for me multiple times especially because some test suites have preset flags that can affect the behavior of what I'm trying to test / what failed. I would imagine that this should be an option in |
@dev-ardi could you elaborate on why you want to suppress the exact command status and command output? |
It's very useful when you need it, but most of the time you don't need it and are just big blocks of noise in the output. I would at least have an option to hide it. I don't really care whether it's in config.toml or an env variable, and whether it should be on or off by default. As long as I can hide (and it's documented somewhere how to hide it for others) it I'm happy :P |
That sounds reasonable to me. I would prefer this, like the diff tool, to be an option that's configurable from bootstrap # config.toml
[test]
# Verbose command output is enabled-by-default, but you can toggle it off
# if you don't need the verbose command invocation.
verbose-command-invocation = true Specifically I would prefer that the current verbose command invocation is shown-by-default, but offer an option to hide that if for some reason you don't need it. |
Also please do not hide the command status in any case, e.g. a test failing with exit status 1 can be significantly different from a test failing with exit status 101 (panics, ICEs, etc.). @rustbot author |
There seems to already be an option like that, Do you think I should hide it by default or not? |
No we should not hide it by default, because quite a few people actually want to see the exact command invocation.
We could try use that, though I'm not too sure what that particular bootstrap config does. I'll roll a T-bootstrap reviewer. r? bootstrap |
Then if that shouldn't be the default we can't use that option. Thoughts? |
I would add a new config option like |
This likely needs some discussion with T-compiler/contributors. I personally find the information very useful in compiler tests and I don't think it should be hidden by default. But that's just my opinion. I use compiler tests infrequently so the less I need to configure the better. Someone who uses them alot may not mind having to tune different nobs to get the information they need. |
(I forgor to link it)
|
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](rust-lang#131182) (rust-lang#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](rust-lang#131182) (rust-lang#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](rust-lang#131182) (rust-lang#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
Rollup merge of rust-lang#131181 - dev-ardi:custom-differ, r=jieyouxu Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](rust-lang#131182) (rust-lang#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
☔ The latest upstream changes (presumably #133841) made this pull request unmergeable. Please resolve the merge conflicts. |
This suppresses the whole block if the env var is not set.
I don't think that it's very useful to have that information, especially when it's in the middle of other important information.
I'd even suggest pushing all of the duplicate information up or down in order to condense the diffs as much as possible.