Skip to content

Commit b536dd7

Browse files
authored
fix(template): guard against test.result=None to stop false Pass labels on missing-row regression tests (#1136)
1 parent dda7618 commit b536dd7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

templates/test/by_id.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,16 @@ <h4 class="category-header {{ 'fail' if result.error else 'pass' }}" data-catego
145145
{%- endif %}
146146
{%- endfor %}
147147
{%- endif %}
148-
{% if test.result.exit_code != test.result.expected_rc %}
148+
{% if test.result and test.result.exit_code != test.result.expected_rc %}
149149
{% if file.got is none or no_error.found-%}
150150
Fail
151151
{% else %}
152152
<a href="#" class="diff_link" data-test="{{ file.test_id }}" data-regression="{{ file.regression_test_id }}" data-output="{{ file.regression_test_output_id }}">Fail</a>
153153
{%- endif %}
154-
{% elif file.got is none or no_error.found or test.result.exit_code != 0 -%}
155-
Pass
156154
{% elif file.got == "error" %}
157155
No output generated but there should be
156+
{% elif file.got is none or no_error.found or (test.result and test.result.exit_code != 0) -%}
157+
Pass
158158
{% else %}
159159
<a href="#" class="diff_link" data-test="{{ file.test_id }}" data-regression="{{ file.regression_test_id }}" data-output="{{ file.regression_test_output_id }}">Fail</a>
160160
{%- endif %}

0 commit comments

Comments
 (0)