Skip to content

Commit 9e100b0

Browse files
committed
templates: Change overview for build
1 parent 5385055 commit 9e100b0

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

kcidb/templates/build_description.txt.j2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ OVERVIEW
1313

1414
Build: {{ misc_macros.valid_badge(build.valid) }}
1515
{% if build.tests %}
16-
Tests: {{ test_macros.waived_status_badge(build.tests_root.waived,
17-
build.tests_root.status) }}
16+
Tests: {{ test_macros.test_status(build.tests_root.waived_status_nodes) }}
1817
{% endif %}
1918

2019
BUILD

kcidb/templates/test.j2

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,24 @@
3737
reject("none") | join(" ") | default(test.id, true) -}}
3838
{% endmacro %}
3939

40+
{% macro test_status(waived_status_nodes) %}
41+
{% for waived, status_nodes in waived_status_nodes.items() %}
42+
{% for status, nodes in status_nodes.items() %}
43+
{% if nodes %}
44+
{{- " " + waived_status_emoji(waived, status) +
45+
" " + (nodes | length | string) -}}
46+
{% endif %}
47+
{% endfor %}
48+
{% endfor %}
49+
{% endmacro %}
50+
4051
{% macro container_summary(container, max_list_len) %}
4152
{% if container.tests %}
4253
{{- "\nTESTS" }}
4354
{% set waived_status_nodes = container.tests_root.waived_status_nodes %}
4455
{{- "\n Status" }}
4556
{{- "\n " -}}
46-
{% for waived, status_nodes in waived_status_nodes.items() %}
47-
{% for status, nodes in status_nodes.items() %}
48-
{% if nodes %}
49-
{{- " " + waived_status_emoji(waived, status) +
50-
" " + (nodes | length | string) -}}
51-
{% endif %}
52-
{% endfor %}
53-
{% endfor %}
57+
{{ test_status(waived_status_nodes) }}
5458
{{- "" }}
5559
{% set errored_nodes = waived_status_nodes[false]["ERROR"] %}
5660
{% if errored_nodes %}

0 commit comments

Comments
 (0)