add a fourth category of result

This commit is contained in:
Sébastien Loriot 2021-04-15 13:58:24 +02:00
parent 54f766f1d3
commit b6e8e41404
3 changed files with 24 additions and 4 deletions

View File

@ -142,7 +142,7 @@ sub collect_results_of_platform($)
# Create an anonymous hash that hashes packages to their result.
my $platform_results = {};
my $test_result="results_${platform}.txt";
my ($yeahs, $nays, $warnings,$reqs) = (0,0,0,0);
my ($yeahs, $nays, $warnings,$third_party_warnings,$reqs) = (0,0,0,0,0);
my $resulttext;
open(TESTRESULT, $test_result) or return $platform_results;
while (<TESTRESULT>) {
@ -154,6 +154,9 @@ sub collect_results_of_platform($)
} elsif ($2 eq 'w' or $2 eq 'W') {
$resulttext = 'w';
++$warnings;
} elsif ($2 eq 't' or $2 eq 'T') {
$resulttext = 't';
++$third_party_warnings;
} elsif ($2 eq 'n' or $2 eq 'N') {
$resulttext = 'n';
++$nays;
@ -170,6 +173,7 @@ sub collect_results_of_platform($)
$platform_results->{"y"} = $yeahs;
$platform_results->{"n"} = $nays;
$platform_results->{"w"} = $warnings;
$platform_results->{"t"} = $third_party_warnings;
$platform_results->{"r"} = $reqs;
return $platform_results;
}
@ -245,6 +249,8 @@ EOF
print OUTPUT ' class="ok"';
} elsif ($resulttext eq 'w') {
print OUTPUT ' class="warning"';
} elsif ($resulttext eq 't') {
print OUTPUT ' class="third_party_warning"';
} elsif ($resulttext eq 'n') {
print OUTPUT ' class="error"';
} elsif ($resulttext eq 'r') {
@ -445,6 +451,7 @@ sub print_platform_descriptions()
<th>Tester</th>
<th class="ok">y</th>
<th class="warning">w</th>
<th class="third_party_warning">t</th>
<th class="error">n</th>
<th class="requirements">r</th>
<th>CMake</th>
@ -480,6 +487,7 @@ EOF
my $county = $testresults[$platform_num]->{"y"};
my $countw = $testresults[$platform_num]->{"w"};
my $countt = $testresults[$platform_num]->{"t"};
my $countn = $testresults[$platform_num]->{"n"};
my $countr = $testresults[$platform_num]->{"r"};
@ -498,6 +506,7 @@ EOF
print OUTPUT "<td><a href=\"mailto:$tester_address\">$tester_name</a></td>\n";
print OUTPUT "<td>$county</td>\n";
print OUTPUT "<td>$countw</td>\n";
print OUTPUT "<td>$countt</td>\n";
print OUTPUT "<td>$countn</td>\n";
print OUTPUT "<td>$countr</td>\n";
$index = 8;
@ -589,7 +598,7 @@ sub print_little_header(){
<a id="jump_to_results" href="#testresults">jump to results</a></h1>
<!--#include virtual="versions.inc"-->
<p>The results of the tests are presented in a table
('y' = success, 'w' = warning, 'n' = failure, 'r' = a requirement is not found),
('y' = success, 'w' = warning, 't' = third party warning 'n' = failure, 'r' = a requirement is not found),
and the error + compiler output from each test can be retrieved by clicking
on it.</p>
<p><b>N.B. The detection of warnings is not exact.

View File

@ -19,12 +19,14 @@ TD.os64bits {font-style:italic}
TD.ok {background-color: rgb(50%,100%,50%)}
TD.warning {background-color: rgb(100%,100%,50%)}
TD.third_party_warning {background-color: rgb(93%,65%,0%)}
TD.error {background-color: rgb(100%,50%,50%)}
TD.na {background-color: white;}
TD.requirements { background-color: rgb(65%,65%,100%) }
TH.ok {background-color: rgb(50%,100%,50%)}
TH.warning {background-color: rgb(100%,100%,50%)}
TH.third_party_warning {background-color: rgb(93%,65%,0%)}
TH.error {background-color: rgb(100%,50%,50%)}
TH.requirements { background-color: rgb(65%,65%,100%) }
@ -36,6 +38,10 @@ TD.warning A {font-size:large; text-decoration: none}
TD.warning A:link {color: rgb(0%,0%,100%)}
TD.warning A:visited {color: rgb(80%,80%,100%)}
TD.third_party_warning A {font-size:large; text-decoration: none}
TD.third_party_warning A:link {color: rgb(0%,0%,100%)}
TD.third_party_warning A:visited {color: rgb(80%,80%,100%)}
TD.error A {font-size: large; text-decoration: none}
TD.error A:link {color: rgb(0%,0%,100%)}
TD.error A:visited {color: rgb(80%,0%,100%)}

View File

@ -49,9 +49,14 @@ print_testresult()
# or ',' or ':'. That avoids some false positives such as
# '-read_only_relocs,warning' or '-D_CRT_SECURE_NO_WARNINGS', or
# 'QMessageBox::warning'.
if grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1 | grep -i "include[/\]CGAL\|cmake" | grep -i -E -q '(^|[^a-zA-Z_,:-])warning'
if grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1 | grep -i -E -q '(^|[^a-zA-Z_,:-])warning'
then
RESULT="w"
if grep -i "include[/\]CGAL\|cmake"
then
RESULT="w"
else
RESULT="t"
fi
else
if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1
then