-
Notifications
You must be signed in to change notification settings - Fork 144
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
Verbose mode not working in tmt * show
commands
#2364
Comments
@psss are you sure it's caused by the patch you mentioned? I'm getting the same outcome with 1.27.0: [pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ type tmt
tmt is hashed (/usr/bin/tmt)
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ tmt --version
tmt version: 1.27.0 (9c35269a)
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ tmt test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ tmt test show -v smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ tmt test show -vv smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ The position of [pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ tmt test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ tmt -v test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
sources /home/happz/git/tmt/tests/main.fmf
/home/happz/git/tmt/tests/core/main.fmf
/home/happz/git/tmt/tests/core/smoke/main.fmf
fmf-id url: github:teemtee/tmt
ref: HEAD
name: /tests/core/smoke
web github:teemtee/tmt/tree/HEAD/tests/core/smoke/main.fmf
[pts-2:0]: happz@multivac [(HEAD detached at 1.27.0)] ~/git/tmt $ The current [pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt -v test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
sources /home/happz/git/tmt/tests/main.fmf
/home/happz/git/tmt/tests/core/main.fmf
/home/happz/git/tmt/tests/core/smoke/main.fmf
fmf-id url: github:teemtee/tmt
ref: main
name: /tests/core/smoke
web github:teemtee/tmt/tree/main/tests/core/smoke/main.fmf
[pts-2:0]: happz@multivac [main] ~/git/tmt $ I guess if there's a regression, it happened earlier than in ec6ba65 :/ Might have happened when I was messing with loggers, for example. It feels like [pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt test show -v smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt test -v show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt -v test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
sources /home/happz/git/tmt/tests/main.fmf
/home/happz/git/tmt/tests/core/main.fmf
/home/happz/git/tmt/tests/core/smoke/main.fmf
fmf-id url: github:teemtee/tmt
ref: main
name: /tests/core/smoke
web github:teemtee/tmt/tree/main/tests/core/smoke/main.fmf
[pts-2:0]: happz@multivac [main] ~/git/tmt $ And indeed, with this patch: diff --git a/tmt/cli.py b/tmt/cli.py
index 059ae919..3b546710 100644
--- a/tmt/cli.py
+++ b/tmt/cli.py
@@ -531,7 +531,11 @@ def tests_show(context: Context, **kwargs: Any) -> None:
Use '.' to select tests under the current working directory.
"""
tmt.Test.store_cli_invocation(context)
- for test in context.obj.tree.tests():
+
+ logger = context.obj.logger.clone() \
+ .apply_verbosity_options(**kwargs)
+
+ for test in context.obj.tree.tests(logger=logger):
test.show()
echo() ... I get what you're looking for: [pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt test show smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
[pts-2:0]: happz@multivac [main] ~/git/tmt $ hatch run dev:tmt test show -v smoke
/tests/core/smoke
summary Just a basic smoke test
contact Petr Šplíchal <[email protected]>
test tmt --help
path /tests/core/smoke
framework shell
manual false
require tmt
duration 5m
enabled true
result respect
tag 'container' and 'virtual'
tier 0
sources /home/happz/git/tmt/tests/main.fmf
/home/happz/git/tmt/tests/core/main.fmf
/home/happz/git/tmt/tests/core/smoke/main.fmf
fmf-id url: github:teemtee/tmt
ref: main
name: /tests/core/smoke
web github:teemtee/tmt/tree/main/tests/core/smoke/main.fmf
[pts-2:0]: happz@multivac [main] ~/git/tmt $ |
So, it's probably been around for some time already. What shall I do about it? :) I can propose a patch, but it won't be a one-liner. |
Yes, indeed, the ec6ba65 commit went to
If you could propose a patch, that would be great. Whatever number of lines it would cost :) |
@happz, do you plan to work on this for |
@psss 1.29, please |
Moving to 1.30. I do have a draft, but I'm not happy about the shape it takes, and I want to find a better way of involving verbosity options in |
I can't get the decorator right, trying to add pyright into the mix to help me with annotations in #2520. |
tmt * show
commnandstmt * show
commands
It seems that a regression has been introduced in ec6ba65 which breaks
tmt test show --verbose
:Verbose mode should include
sources
,fmf-id
andweb
link:@happz, could you possibly have a look into this?
The text was updated successfully, but these errors were encountered: