Skip to content
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

More verbose output: Report passed tests, tool invocations. #763

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

garloff
Copy link
Member

@garloff garloff commented Sep 25, 2024

When running the test suite interactively, I want to see know what it's currently doing and what the current state of success is. This is actually already logged, but with log level debug and we have no way to make this visible by cmd line options. Rather than introducing an option -d|--debug, let's just attach it to -v|--verbose, as it does not add all that much output.

Also, when used with -v, let's also report all passed checks in the summary.

When running the test suite interactively, I want to see know what it's
currently doing and what the current state of success is.
This is actually already logged, but with log level debug and we have
no way to make this visible by cmd line options. Rather than introducing
an option '-d|--debug', let's just attach it to '-v|--verbose', as it
does not add all that much output.

Also, when used with '-v', let's also report all passed checks in the
summary.

Signed-off-by: Kurt Garloff <[email protected]>
@garloff garloff added enhancement New feature or request standards Issues / ADR / pull requests relevant for standardization & certification labels Sep 25, 2024
@garloff garloff self-assigned this Sep 25, 2024
@mbuechse
Copy link
Contributor

@garloff Just FYI: The tool does have -d|--date as well as --debug.

Copy link
Contributor

@mbuechse mbuechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't stand in the way, but please consider my comment.

@@ -109,6 +109,7 @@ def apply_argv(self, argv):
sys.exit(0)
elif opt[0] == "-v" or opt[0] == "--verbose":
self.verbose = True
logger.setLevel(logging.DEBUG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep this decoupled from --debug (see the next two lines). Callers can always pass -v --debug if they like. However, if that is not user friendly enough, we might consider improving the log output even further, because currently, you cannot tell when running CMD... is not running anything for real (because this CMD has already been memoized from a previous run), except that stdout is not repeated in that case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must have overlooked the --debug setting, sorry ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, changed it to only enable --debug upon a second --verbose or -vv, which is in line with how many CLI tools behave.
I hope that this finds your support.

This makes -vv enable --debug, which is in line with many tools.

Signed-off-by: Kurt Garloff <[email protected]>
@mbuechse
Copy link
Contributor

mbuechse commented Oct 4, 2024

Fine by me!

@garloff garloff merged commit a76464a into main Oct 4, 2024
8 checks passed
@garloff garloff deleted the feat/more-verbose-output branch October 4, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request standards Issues / ADR / pull requests relevant for standardization & certification
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants