Unverified Commit 29a96dd4 authored by boklm's avatar boklm
Browse files

Add the known fail_type, for known tests failure

parent 33b2b72a
......@@ -25,6 +25,7 @@ BEGIN {
my %template_functions = (
is_test_error => \&TBBTestSuite::Tests::is_test_error,
is_test_warning => \&TBBTestSuite::Tests::is_test_warning,
is_test_known => \&TBBTestSuite::Tests::is_test_known,
test_by_name => \&TBBTestSuite::Tests::test_by_name,
);
......
......@@ -66,6 +66,12 @@ sub is_test_warning {
&& !$test->{results}{success};
}
sub is_test_known {
my ($test) = @_;
return $test->{results} && $test->{fail_type} eq 'known'
&& !$test->{results}{success};
}
sub is_success {
my ($tests) = @_;
foreach my $test (@$tests) {
......
......@@ -28,6 +28,9 @@ sub set_report_success {
if (TBBTestSuite::Tests::is_test_warning($test)) {
push @{$report->{warning_tests}{$test->{name}}}, $tbbfile_name;
}
if (TBBTestSuite::Tests::is_test_known($test)) {
push @{$report->{known_tests}{$test->{name}}}, $tbbfile_name;
}
}
}
}
......
......@@ -138,7 +138,7 @@
<a href="javascript:togglecontent('test_[% test.name %]');">
[% IF is_test_error(test) %]
<img src="../../static/failed-small.png" />
[% ELSIF is_test_warning(test) %]
[% ELSIF is_test_warning(test) or is_test_known(test) %]
<img src="../../static/warning-small.png" />
[% ELSE %]
<img src="../../static/ok-small.png" />
......
......@@ -26,7 +26,7 @@
[% END %]
</ul>
<h1>Summary</h1>
[% IF success && warning_tests.keys.size == 0 %]
[% IF success && warning_tests.keys.size == 0 && known_tests.keys.size == 0 %]
Everything OK.
[% END %]
[% IF error_tests.keys.size %]
......@@ -57,6 +57,21 @@
[% END %]
</ul>
[% END %]
[% IF known_tests.keys.size %]
List of known test failures:
<ul>
[% FOREACH test IN known_tests.keys.sort %]
<li>[% test %]
<ul>
[% FOREACH tbbfile IN known_tests.$test.sort %]
<li><a href="[% tbbfile %].html#[% test %]">[% tbbfile %]</a></li>
[% END %]
</ul>
</li>
[% END %]
</ul>
[% END %]
<hr>
<a href="screenshots.html">screenshots</a>
......
......@@ -8,7 +8,7 @@ Summary
URL: [% options.$ru %]r/[% options.name %]/
[% END -%]
[% IF success && warning_tests.keys.size == 0 -%]
[% IF success && warning_tests.keys.size == 0 && known_tests.keys.size == 0 -%]
Everything OK
[% END -%]
[% IF error_tests.keys.size -%]
......@@ -38,6 +38,20 @@ Summary
[%- END -%]
[%- END -%]
[% END -%]
[% IF known_tests.keys.size -%]
Known issues
[%- FOREACH test IN known_tests.keys.sort -%]
- [% test %]:
[%- FOREACH tbbfile IN known_tests.$test.sort -%]
[% tbbfile %]
[%- END -%]
[%- END -%]
[% END -%]
Details
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment