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 → show Test 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 plain No 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/> shows No logs available., not Tests failed to run
  • tmt-inprogress-pending now asserts pending tests without logs show Test is being executed.
  • tmt-error-no-logs now asserts the "File an issue" link points to the docs page
  • the existing tmt-error-no-logs / tmt-error-pending / tmt-failed-prepare cases (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

Merge request reports

Loading