Skip to content

test_schedule_tmt: Expose all TMT artifacts in results.xml

tmt 1.18 now supports generating a custom results.yaml [1], mostly so that tests can declare additional log files and artifacts. This is already anticipated in tests/assets/test_schedule_tmt/passed/, where the first test creates an additional journal.txt, but this was entirely ignored. Let's expose these additional logs in oculus through results.xml.

Until now, serialize_test_schedule_entry_results() picked the first log and (re)named this testout.log, and added an additional log_dir. Move that logic in to gather_plan_results(), and generalize TestResult to contain a list of named artifacts instead of just a single log. This can be extended more easily in the future, and can also be checked much more easily in unit tests. Adjust the expected parsing results accordingly. This simplifies serialize_test_schedule_entry_results() to merely attach all artifacts from the TestResult without any post-processing.

This keeps the log_dir and testout.log names for backwards compatibility. All other artifacts are named by their file names for now. This leaves the possibility of extending TMT's result.yaml format in the future to explicitly specify a name (e.g. to define a html-viewer).

[1] https://github.com/teemtee/tmt/pull/1488


This blocks our reworking of rpminspect testing to present the results in a nicer way. See https://github.com/fedora-ci/rpminspect-runner/pull/80 and https://github.com/fedora-ci/rpminspect-pipeline/pull/64

Edited by Martin Pitt

Merge request reports