Skip to content

Commit

Permalink
templates: Change overview for build
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbazzan committed May 19, 2022
1 parent 5385055 commit 9e100b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions kcidb/templates/build_description.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ OVERVIEW

Build: {{ misc_macros.valid_badge(build.valid) }}
{% if build.tests %}
Tests: {{ test_macros.waived_status_badge(build.tests_root.waived,
build.tests_root.status) }}
Tests: {{ test_macros.test_status(build.tests_root.waived_status_nodes) }}
{% endif %}

BUILD
Expand Down
20 changes: 12 additions & 8 deletions kcidb/templates/test.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,24 @@
reject("none") | join(" ") | default(test.id, true) -}}
{% endmacro %}

{% macro test_status(waived_status_nodes) %}
{% for waived, status_nodes in waived_status_nodes.items() %}
{% for status, nodes in status_nodes.items() %}
{% if nodes %}
{{- " " + waived_status_emoji(waived, status) +
" " + (nodes | length | string) -}}
{% endif %}
{% endfor %}
{% endfor %}
{% endmacro %}

{% macro container_summary(container, max_list_len) %}
{% if container.tests %}
{{- "\nTESTS" }}
{% set waived_status_nodes = container.tests_root.waived_status_nodes %}
{{- "\n Status" }}
{{- "\n " -}}
{% for waived, status_nodes in waived_status_nodes.items() %}
{% for status, nodes in status_nodes.items() %}
{% if nodes %}
{{- " " + waived_status_emoji(waived, status) +
" " + (nodes | length | string) -}}
{% endif %}
{% endfor %}
{% endfor %}
{{ test_status(waived_status_nodes) }}
{{- "" }}
{% set errored_nodes = waived_status_nodes[false]["ERROR"] %}
{% if errored_nodes %}
Expand Down

0 comments on commit 9e100b0

Please sign in to comment.