Show subresults and their checks in report display plugin
This is a proposal to show the result phases (aka subresults) and their checks in the display report plugin.
Related to:
- https://github.com/teemtee/tmt/issues/2826
Depends on:
- https://github.com/teemtee/tmt/pull/3094
Blocked by:
- https://github.com/teemtee/tmt/pull/3106
The code uses faked subresult data in plans/example/execute/results.yaml for testing purposes.
$ python -m tmt -r ~/tmt-learning/13 run --last report --how display --force -v
/var/tmp/tmt/run-001
/plans/example
report
how: display
pass /tests/call-dmesg
skip dmesg (before-test check)
skip dmesg (after-test check)
fail /tests/mine-rep-multi
skip dmesg (before-test check)
skip dmesg (after-test check)
pass /tests/mine-rep-multi/test/good
fail /tests/mine-rep-multi/test/fail
warn /tests/mine-rep-multi/test/weird
skip dmesg (before-test check)
skip dmesg (after-test check)
pass /tests/mine-rep-pass
summary: 2 tests passed and 1 test failed
total: 2 tests passed and 1 test failed
Pull Request Checklist
- [x] implement the feature
- [ ] write the documentation
- [x] extend the test coverage
- [ ] update the specification
- [ ] adjust plugin docstring
- [ ] modify the json schema
- [ ] mention the version
- [ ] include a release note
I wouldn't dare to call it "trivial", with the involved verbosity levels, indentation, and more than just a few lines of changes :)
When https://github.com/teemtee/tmt/pull/3106 gets merged, more renaming will need to happen in this PR.
Looks good, thanks! Just one nitpick. Would be good to include at least a simple
results.yamlexample together with a test which would check the output is as expected. What do you think?
Hello @psss , I've added the tests. Could you please take a look?
Thanks!
Unrelated failures, merging.