From b6e8e41404f9fda12a777f07774df3a48db37db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 15 Apr 2021 13:58:24 +0200 Subject: [PATCH] add a fourth category of result --- Maintenance/test_handling/create_testresult_page | 13 +++++++++++-- Maintenance/test_handling/testresult.css | 6 ++++++ Testsuite/test/collect_cgal_testresults_from_cmake | 9 +++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index 2fc447b2eba..d821033fcc7 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -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 () { @@ -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() Tester y w +t n r CMake @@ -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 "$tester_name\n"; print OUTPUT "$county\n"; print OUTPUT "$countw\n"; + print OUTPUT "$countt\n"; print OUTPUT "$countn\n"; print OUTPUT "$countr\n"; $index = 8; @@ -589,7 +598,7 @@ sub print_little_header(){ jump to results

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.

N.B. The detection of warnings is not exact. diff --git a/Maintenance/test_handling/testresult.css b/Maintenance/test_handling/testresult.css index 144fd9f8f62..a48811ec466 100644 --- a/Maintenance/test_handling/testresult.css +++ b/Maintenance/test_handling/testresult.css @@ -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%)} diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index b2103851168..7e360cc72f4 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -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