diff --git a/tmt/steps/report/junit/templates/_base.xml.j2 b/tmt/steps/report/junit/templates/_base.xml.j2 index a3a1a65829..177112ba57 100644 --- a/tmt/steps/report/junit/templates/_base.xml.j2 +++ b/tmt/steps/report/junit/templates/_base.xml.j2 @@ -5,21 +5,19 @@ {% block testcases %} {% for result in RESULTS %} - {% set main_log = result.log | first | read_log %} - {% set log_failures = main_log | failures | e %} {% set test_duration = result.duration | duration_to_seconds | float %} {% if result.result.value == 'error' or result.result.value == 'warn' %} - {{ log_failures }} + {{ result.log | first | read_log | failures | e }} {% elif result.result.value == 'fail' %} - {{ log_failures }} + {{ result.log | first | read_log | failures | e }} {% elif result.result.value == 'info' %} - {{ log_failures }} + {{ result.log | first | read_log | failures | e }} {% endif %} - {% if INCLUDE_OUTPUT_LOG and main_log %} - {{ main_log | e }} + {% if INCLUDE_OUTPUT_LOG %} + {{ result.log | first | read_log | e }} {% endif %} {# Optionally add the result properties #}