Stop showing "Tests failed to run" for tests without logs
Problem
Per-test log files are not mandatory in the results format, but renderLogs treated any test whose <logs/> element was empty as an infrastructure failure and printed "Tests failed to run". A results file with all-passing tests but no per-test logs (e.g. a large test harness running many subtests) was therefore reported as failed for every passing test.
Reported by esandeen: an all-green results file showed "Tests failed to run" under each passed test.
Change
In renderLogs, the empty-logs branch now distinguishes by result:
running→ showTest is being executed.(logs may still appear)error→ keep the full infrastructure-problem hint ("Tests failed to run", status page, file an issue) — this is the genuine "did not run" case (e.g. a failed prepare step)- any other result (
pass/skip/fail/info/warn) → show a plainNo logs available.note
The "File an issue" link now points to the docs issue-reporting page (https://docs.testing-farm.io/Testing%20Farm/0.1/issues.html).
Tests
- new
scenarios/tmt-pass-no-logs+ test: a passed test with empty<logs/>showsNo logs available., notTests failed to run tmt-inprogress-pendingnow asserts pending tests without logs showTest is being executed.tmt-error-no-logsnow asserts the "File an issue" link points to the docs page- the existing
tmt-error-no-logs/tmt-error-pending/tmt-failed-preparecases (error, no logs) still show the infrastructure message — unaffected
Follow-up: the "show passed tests" / skipped-tests filtering is handled in !99 (merged).
Edited by Miroslav Vadkerti