Abstract over test suites

This commit is contained in:
southerntofu 2020-09-24 15:09:08 -04:00
parent c39b94bc17
commit 272e89dabe
1 changed files with 9 additions and 4 deletions

View File

@ -40,21 +40,26 @@
{% endfor %}
</table>
<h2>forgebuild.sh</h2>
{% for suite in suites %}
{% set suite_index = loop.index0 %}
<h2>{{ suite }}</h2>
{# This is a hack because we can't reverse a map (only arrays) #}
{% set_global runs = [] %}
{% for key, val in bash_data %}{% set_global runs = runs | concat(with=key) %}{% endfor %}
{% for key, val in data[suite_index] %}{% set_global runs = runs | concat(with=key) %}{% endfor %}
<ul>
{% for run in runs | reverse %}
{# TODO: configure in config.extra how many commits to display #}
{% if loop.index > 2 %}{% break %}{% endif %}
{% set date_commit = run | split(pat="-") %}
<li><a href="{{ get_url(path="tests/forgebuild.sh/" ~ date_commit.0) }}">{{ date_commit[0] | int | date(format=trans(key="dateFormat", lang=lang)) }} ({{ date_commit[1] }})</a>
<li><a href="{{ get_url(path=directory~"/"~suite~"/" ~ date_commit.0) }}">{{ date_commit[0] | int | date(format=trans(key="dateFormat", lang=lang)) }} ({{ date_commit[1] }})</a>
<ul>
{% for testname, result in bash_data[run] %}
{% for testname, result in data[suite_index][run] %}
<li>{{ result }} {{ testname }}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
{% endfor %}
{% endblock main %}