Merge pull request #4649 from sloriot/CGAL-no_third_party_warnings

Try to filter out warnings not in CGAL
This commit is contained in:
Laurent Rineau 2021-04-20 09:50:14 +02:00
commit 04bdd14821
3 changed files with 23 additions and 3 deletions

View File

@ -151,7 +151,7 @@ sub collect_results_of_platform($)
# Create an anonymous hash that hashes packages to their result. # Create an anonymous hash that hashes packages to their result.
my $platform_results = {}; my $platform_results = {};
my $test_result="results_${platform}.txt"; 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; my $resulttext;
open(TESTRESULT, $test_result) or return $platform_results; open(TESTRESULT, $test_result) or return $platform_results;
while (<TESTRESULT>) { while (<TESTRESULT>) {
@ -163,6 +163,9 @@ sub collect_results_of_platform($)
} elsif ($2 eq 'w' or $2 eq 'W') { } elsif ($2 eq 'w' or $2 eq 'W') {
$resulttext = 'w'; $resulttext = 'w';
++$warnings; ++$warnings;
} elsif ($2 eq 't' or $2 eq 'T') {
$resulttext = 't';
++$third_party_warnings;
} elsif ($2 eq 'n' or $2 eq 'N') { } elsif ($2 eq 'n' or $2 eq 'N') {
$resulttext = 'n'; $resulttext = 'n';
++$nays; ++$nays;
@ -179,6 +182,7 @@ sub collect_results_of_platform($)
$platform_results->{"y"} = $yeahs; $platform_results->{"y"} = $yeahs;
$platform_results->{"n"} = $nays; $platform_results->{"n"} = $nays;
$platform_results->{"w"} = $warnings; $platform_results->{"w"} = $warnings;
$platform_results->{"t"} = $third_party_warnings;
$platform_results->{"r"} = $reqs; $platform_results->{"r"} = $reqs;
return $platform_results; return $platform_results;
} }
@ -254,6 +258,8 @@ EOF
print OUTPUT ' class="ok"'; print OUTPUT ' class="ok"';
} elsif ($resulttext eq 'w') { } elsif ($resulttext eq 'w') {
print OUTPUT ' class="warning"'; print OUTPUT ' class="warning"';
} elsif ($resulttext eq 't') {
print OUTPUT ' class="third_party_warning"';
} elsif ($resulttext eq 'n') { } elsif ($resulttext eq 'n') {
print OUTPUT ' class="error"'; print OUTPUT ' class="error"';
} elsif ($resulttext eq 'r') { } elsif ($resulttext eq 'r') {
@ -453,6 +459,7 @@ sub print_platform_descriptions()
<th colspan="2">OS and compiler</th> <th colspan="2">OS and compiler</th>
<th>Tester</th> <th>Tester</th>
<th class="ok">y</th> <th class="ok">y</th>
<th class="third_party_warning">t</th>
<th class="warning">w</th> <th class="warning">w</th>
<th class="error">n</th> <th class="error">n</th>
<th class="requirements">r</th> <th class="requirements">r</th>
@ -491,6 +498,7 @@ EOF
my $tester_address = $_; my $tester_address = $_;
my $county = $testresults[$platform_num]->{"y"}; my $county = $testresults[$platform_num]->{"y"};
my $countt = $testresults[$platform_num]->{"t"};
my $countw = $testresults[$platform_num]->{"w"}; my $countw = $testresults[$platform_num]->{"w"};
my $countn = $testresults[$platform_num]->{"n"}; my $countn = $testresults[$platform_num]->{"n"};
my $countr = $testresults[$platform_num]->{"r"}; my $countr = $testresults[$platform_num]->{"r"};
@ -509,6 +517,7 @@ EOF
print OUTPUT "</td>\n"; print OUTPUT "</td>\n";
print OUTPUT "<td><a href=\"mailto:$tester_address\">$tester_name</a></td>\n"; print OUTPUT "<td><a href=\"mailto:$tester_address\">$tester_name</a></td>\n";
print OUTPUT "<td>$county</td>\n"; print OUTPUT "<td>$county</td>\n";
print OUTPUT "<td>$countt</td>\n";
print OUTPUT "<td>$countw</td>\n"; print OUTPUT "<td>$countw</td>\n";
print OUTPUT "<td>$countn</td>\n"; print OUTPUT "<td>$countn</td>\n";
print OUTPUT "<td>$countr</td>\n"; print OUTPUT "<td>$countr</td>\n";
@ -602,7 +611,7 @@ sub print_little_header(){
<a id="jump_to_results" href="#testresults">jump to results</a></h1> <a id="jump_to_results" href="#testresults">jump to results</a></h1>
<!--#include virtual="versions.inc"--> <!--#include virtual="versions.inc"-->
<p>The results of the tests are presented in a table <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 and the error + compiler output from each test can be retrieved by clicking
on it.</p> on it.</p>
<p><b>N.B. The detection of warnings is not exact. <p><b>N.B. The detection of warnings is not exact.

View File

@ -27,12 +27,14 @@ TD.os64bits {font-style:italic}
TD.ok {background-color: rgb(50%,100%,50%)} TD.ok {background-color: rgb(50%,100%,50%)}
TD.warning {background-color: rgb(100%,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.error {background-color: rgb(100%,50%,50%)}
TD.na {background-color: white;} TD.na {background-color: white;}
TD.requirements { background-color: rgb(65%,65%,100%) } TD.requirements { background-color: rgb(65%,65%,100%) }
TH.ok {background-color: rgb(50%,100%,50%)} TH.ok {background-color: rgb(50%,100%,50%)}
TH.warning {background-color: rgb(100%,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.error {background-color: rgb(100%,50%,50%)}
TH.requirements { background-color: rgb(65%,65%,100%) } TH.requirements { background-color: rgb(65%,65%,100%) }
@ -44,6 +46,10 @@ TD.warning A {font-size:large; text-decoration: none}
TD.warning A:link {color: rgb(0%,0%,100%)} TD.warning A:link {color: rgb(0%,0%,100%)}
TD.warning A:visited {color: rgb(80%,80%,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 {font-size: large; text-decoration: none}
TD.error A:link {color: rgb(0%,0%,100%)} TD.error A:link {color: rgb(0%,0%,100%)}
TD.error A:visited {color: rgb(80%,0%,100%)} TD.error A:visited {color: rgb(80%,0%,100%)}

View File

@ -50,7 +50,12 @@ print_testresult()
# 'QMessageBox::warning'. # 'QMessageBox::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' 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 then
RESULT="w" if grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1 | grep -i -E '(^|[^a-zA-Z_,:-])warning' | grep -i -q "include[/\]CGAL\|cmake"
then
RESULT="w"
else
RESULT="t"
fi
else else
if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1 if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1
then then