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
mtest: print command line when invoked with -v #5025
Conversation
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.
One small nit, and then please add a documentation snippet for the 0.51 release with this change.
There are no release notes for 0.51 yet. I'll wait for 0.50 to be released before updating. |
Just put a snippet in |
Rebased to rerun CI and to squash review fixes into a single patch. |
Tests are failing around Boost. Maybe because Azure has added Boost to the VS 2017 image? Not sure. |
For easier reproducibility, when "meson test" is invoked with -v it will print the command line that was invoked. This makes it a bit easier to cut and paste from a failing test log into a terminal, and when using --gdb it will also provide a hint for how gdb was invoked. This was requested by a developer on a project that I am converting.
@jpakkane Is this going to be applied? |
The output looks a bit messy:
The description says about using this for failure cases, but we already print the command in that case:
The only thing it does not have is the envvar setup. Could we enhance that output instead? |
I would do both... Even for passes, sometimes the command line is not obvious and having it before the output can be useful to understand why one test is failing and the other isn't. Verbose output is naturally somewhat messy. But we certainly should include the environment in the non-verbose case. How would you feel about preceding the command with a Unicode arrow such as |
Another issue is that the command line can be hidden completely from --print-errorlogs if the stdout/stderr is long enough. This can be fixed separately by restricting the output to the last 100 lines of stdout/stderr instead of the last 100 lines of the log. I'm closing this PR and will come back with something more complete. |
For easier reproducibility, when "meson test" is invoked with -v it will print the
command line that was invoked. This makes it a bit easier to cut and paste
from a failing test log into a terminal, and when using --gdb it will also provide
a hint for how gdb was invoked.
This was requested by a developer on a project that I am converting.