Add Compiler and OS Info to the TestSuite description table (#8188)

## Summary of Changes
Add Compiler and OS Information to TestSuite Platform Description Table
This PR is linked with those PRs:
   - https://github.com/CGAL/cgal-testsuite-dockerfiles/pull/153
   - https://github.com/CGAL/cgal-testsuite-dockerfiles/pull/154

The version of this Pull Request can be reviewed at [this
link](https://cgal.geometryfactory.com/~nsaillant/testsuite8188/TESTRESULTS/)

## Release Management

* Issue(s) solved (if any): #8167
This commit is contained in:
Sebastien Loriot 2024-10-23 11:57:16 +02:00 committed by GitHub
commit 2a572754d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 412 additions and 397 deletions

View File

@ -361,13 +361,17 @@ include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake)
cgal_setup_module_path() cgal_setup_module_path()
if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE)
message(STATUS "Operating system:") find_program(LSB_RELEASE_EXEC lsb_release)
execute_process( if(LSB_RELEASE_EXEC)
COMMAND uname -a execute_process(
TIMEOUT 5 COMMAND ${LSB_RELEASE_EXEC} -ds
OUTPUT_VARIABLE uname_a OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
ERROR_VARIABLE uname_a) OUTPUT_STRIP_TRAILING_WHITESPACE
message(STATUS "${uname_a}") )
message(STATUS "Operating system: ${LSB_RELEASE_ID_SHORT} ${CMAKE_SYSTEM_PROCESSOR}")
else()
message(STATUS "Operating system: ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
endif()
cgal_display_compiler_version() cgal_display_compiler_version()
endif() endif()

View File

@ -125,8 +125,8 @@ sub list_platforms()
{ {
my ($filename, @result); my ($filename, @result);
foreach $_ (glob("results_*.txt")) { foreach $_ (glob("results_*.txt")) {
($filename) = m/results_(.*?)\.txt\s*/; ($filename) = m/results_(.*?)\.txt\s*/;
push(@result, $filename) if $filename; push(@result, $filename) if $filename;
} }
return @result; return @result;
} }
@ -140,9 +140,9 @@ sub list_packages($)
my $test_result="results_${platform}.txt"; my $test_result="results_${platform}.txt";
open(TESTRESULT, $test_result) or return 0; open(TESTRESULT, $test_result) or return 0;
while (<TESTRESULT>) { while (<TESTRESULT>) {
if (/^\s*(.*?)\s+(\w)\s*$/) { if (/^\s*(.*?)\s+(\w)\s*$/) {
$test_directories{$1} = ''; $test_directories{$1} = '';
} }
} }
close TESTRESULT or return 0; close TESTRESULT or return 0;
return 1; return 1;
@ -158,31 +158,31 @@ sub collect_results_of_platform($)
my $resulttext; my $resulttext;
open(TESTRESULT, $test_result) or return $platform_results; open(TESTRESULT, $test_result) or return $platform_results;
while (<TESTRESULT>) { while (<TESTRESULT>) {
if (/^\s*(.*?)\s+(\w)\s*$/) { if (/^\s*(.*?)\s+(\w)\s*$/) {
#($package,$succes) = ($1,$2); #($package,$succes) = ($1,$2);
if ($2 eq 'y' or $2 eq 'Y') { if ($2 eq 'y' or $2 eq 'Y') {
$resulttext = 'y'; $resulttext = 'y';
++$yeahs; ++$yeahs;
} 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') { } elsif ($2 eq 't' or $2 eq 'T') {
$resulttext = 't'; $resulttext = 't';
++$third_party_warnings; ++$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;
} elsif ($2 eq 'o' or $2 eq 'O') { } elsif ($2 eq 'o' or $2 eq 'O') {
$resulttext = 'o'; $resulttext = 'o';
++$timeout; ++$timeout;
} elsif ($2 eq 'r') { } elsif ($2 eq 'r') {
$resulttext = 'r'; $resulttext = 'r';
++$reqs; ++$reqs;
} else { } else {
$resulttext = ' '; $resulttext = ' ';
} }
$platform_results->{$1} = $resulttext; $platform_results->{$1} = $resulttext;
} }
} }
close TESTRESULT; close TESTRESULT;
$platform_results->{"y"} = $yeahs; $platform_results->{"y"} = $yeahs;
@ -198,10 +198,10 @@ sub collect_results()
{ {
my $platform; my $platform;
foreach $platform (@platforms_to_do) { foreach $platform (@platforms_to_do) {
list_packages($platform); list_packages($platform);
} }
foreach $platform (@platforms_to_do) { foreach $platform (@platforms_to_do) {
push(@testresults, collect_results_of_platform($platform)); push(@testresults, collect_results_of_platform($platform));
} }
} }
@ -225,66 +225,66 @@ EOF
my $test_directory; my $test_directory;
my $test_num = 0; my $test_num = 0;
foreach $test_directory (sort keys %test_directories) { foreach $test_directory (sort keys %test_directories) {
if ($PLATFORMS_REF_BETWEEN_RESULTS) { if ($PLATFORMS_REF_BETWEEN_RESULTS) {
$test_num++; $test_num++;
if ($test_num == 15) { if ($test_num == 15) {
$test_num = 0; $test_num = 0;
print OUTPUT "\n<tr> <td align=\"center\">\n"; print OUTPUT "\n<tr> <td align=\"center\">\n";
print OUTPUT "<a href=\"summary-$release_version.html?platform=all\">Platform Description</a>"; print OUTPUT "<a href=\"summary-$release_version.html?platform=all\">Platform Description</a>";
print OUTPUT "\n"; print OUTPUT "\n";
print_platforms_numbers(); print_platforms_numbers();
print OUTPUT "\n</tr>\n"; print OUTPUT "\n</tr>\n";
} }
} }
# my $version; # my $version;
# if ( -r "$test_directory/version" ) { # if ( -r "$test_directory/version" ) {
# open(VERSION, "$test_directory/version"); # open(VERSION, "$test_directory/version");
# while(<VERSION>) { # while(<VERSION>) {
# ($version) = /^\s*([^\s]*)\s/; # ($version) = /^\s*([^\s]*)\s/;
# last if $version; # last if $version;
# } # }
# close VERSION; # close VERSION;
# } # }
print OUTPUT "\n<tr>\n"; print OUTPUT "\n<tr>\n";
print OUTPUT "<td><a class=\"package_name\" href=\"summary-$release_version.html?package=$test_directory\" name=\"$test_directory\">$test_directory</a></td>\n"; print OUTPUT "<td><a class=\"package_name\" href=\"summary-$release_version.html?package=$test_directory\" name=\"$test_directory\">$test_directory</a></td>\n";
# if ( $version ) { # if ( $version ) {
# print OUTPUT "<TD ALIGN=CENTER>$version</TD>\n"; # print OUTPUT "<TD ALIGN=CENTER>$version</TD>\n";
# } else { # } else {
# print OUTPUT "<TD ALIGN=CENTER>?.?</TD>\n"; # print OUTPUT "<TD ALIGN=CENTER>?.?</TD>\n";
# } # }
my ($platform_num,$platform)=(0,""); my ($platform_num,$platform)=(0,"");
$platform_num=0; $platform_num=0;
foreach $platform (@platforms_to_do) { foreach $platform (@platforms_to_do) {
my ($result,$resulttext); my ($result,$resulttext);
$resulttext = $testresults[$platform_num]->{$test_directory}; $resulttext = $testresults[$platform_num]->{$test_directory};
if (! defined($resulttext)) { if (! defined($resulttext)) {
$resulttext = ' '; $resulttext = ' ';
} }
print OUTPUT '<td align=center'; print OUTPUT '<td align=center';
if ($resulttext eq 'y') { if ($resulttext eq 'y') {
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') { } elsif ($resulttext eq 't') {
print OUTPUT ' class="third_party_warning"'; print OUTPUT ' class="third_party_warning"';
} elsif ($resulttext eq 'o') { } elsif ($resulttext eq 'o') {
print OUTPUT ' class="timeout"'; print OUTPUT ' class="timeout"';
} elsif ($resulttext eq 'n') { } elsif ($resulttext eq 'n') {
print OUTPUT ' class="error"'; print OUTPUT ' class="error"';
} elsif ($resulttext eq 'r') { } elsif ($resulttext eq 'r') {
print OUTPUT ' class="requirements"'; print OUTPUT ' class="requirements"';
} }
else { else {
print OUTPUT ' class="na"'; print OUTPUT ' class="na"';
} }
print OUTPUT '> <a href="', print OUTPUT '> <a href="',
"$release_name/$test_directory/TestReport_$platform.gz\""; "$release_name/$test_directory/TestReport_$platform.gz\"";
print OUTPUT '>', "$resulttext</a></td>\n"; print OUTPUT '>', "$resulttext</a></td>\n";
++$platform_num; ++$platform_num;
} }
print OUTPUT "</tr>\n"; print OUTPUT "</tr>\n";
} }
print OUTPUT "</table>\n"; print OUTPUT "</table>\n";
} }
@ -297,7 +297,7 @@ sub print_resultpage()
print OUTPUT '<p>In the table below, each column is numbered, and corresponds to a platform. '; print OUTPUT '<p>In the table below, each column is numbered, and corresponds to a platform. ';
print OUTPUT 'Each column number is a link to the platform description table.</p> ', "\n"; print OUTPUT 'Each column number is a link to the platform description table.</p> ', "\n";
if ($PLATFORMS_BESIDE_RESULTS) { if ($PLATFORMS_BESIDE_RESULTS) {
print OUTPUT <<"EOF"; print OUTPUT <<"EOF";
<table border="0" cellspacing="5" cellpadding="0"> <table border="0" cellspacing="5" cellpadding="0">
<tr align="center"> <tr align="center">
<td> <td>
@ -307,17 +307,17 @@ EOF
print_result_table(); print_result_table();
if ($PLATFORMS_BESIDE_RESULTS) { if ($PLATFORMS_BESIDE_RESULTS) {
print OUTPUT "<td>\n<table class=\"beside\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n"; print OUTPUT "<td>\n<table class=\"beside\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\">\n";
if ($platform_count > 0) { if ($platform_count > 0) {
my $repeat_count = (1 + 1.1/16.5)*scalar(keys %test_directories)/($platform_count+0.25); my $repeat_count = (1 + 1.1/16.5)*scalar(keys %test_directories)/($platform_count+0.25);
while ($repeat_count >= 1) { while ($repeat_count >= 1) {
$repeat_count--; $repeat_count--;
print OUTPUT "<tr><td>\n"; print OUTPUT "<tr><td>\n";
print_platforms(); print_platforms();
print OUTPUT "</tr>\n"; print OUTPUT "</tr>\n";
} }
} }
print OUTPUT "</table>\n</tr>\n</table>\n"; print OUTPUT "</table>\n</tr>\n</table>\n";
} }
} }
@ -390,7 +390,7 @@ sub parse_platform_2($)
# splice(@list,0,@list-3); # splice(@list,0,@list-3);
# } # }
while (@list < 3) { while (@list < 3) {
push(@list,'?'); push(@list,'?');
} }
return @list; return @list;
} }
@ -400,19 +400,19 @@ sub short_pfname($)
my @pflist = parse_platform_2($_[0]); my @pflist = parse_platform_2($_[0]);
my $shortpf; my $shortpf;
if(@pflist < 4) { if(@pflist < 4) {
$shortpf = join('_', $pflist[1], $pflist[2]); $shortpf = join('_', $pflist[1], $pflist[2]);
} }
elsif($pflist[2] !~ /Linux/i) { elsif($pflist[2] !~ /Linux/i) {
$shortpf = join('_', $pflist[3], $pflist[2]); $shortpf = join('_', $pflist[3], $pflist[2]);
if(@pflist >= 5) { if(@pflist >= 5) {
$shortpf = join('_', $shortpf, $pflist[4]); $shortpf = join('_', $shortpf, $pflist[4]);
} }
} }
else { else {
$shortpf = $pflist[3]; $shortpf = $pflist[3];
if(@pflist >= 5) { if(@pflist >= 5) {
$shortpf = join('_', $shortpf, $pflist[4]); $shortpf = join('_', $shortpf, $pflist[4]);
} }
} }
return $shortpf; return $shortpf;
} }
@ -425,22 +425,22 @@ sub choose_platforms()
my $index = 0; my $index = 0;
# Put all known platforms in a hash table. # Put all known platforms in a hash table.
for ($index=0; $index < @known_platforms; $index += 1) { for ($index=0; $index < @known_platforms; $index += 1) {
$pf = $known_platforms[$index]; $pf = $known_platforms[$index];
$platform_index{$pf} = 1; $platform_index{$pf} = 1;
} }
# Check if there are platforms listed that are not known. Warn about this # Check if there are platforms listed that are not known. Warn about this
# and add those platforms at the end of the list of known platforms. # and add those platforms at the end of the list of known platforms.
foreach (@available_platforms) { foreach (@available_platforms) {
$pf = $_; $pf = $_;
my $shortpf = short_pfname($pf); my $shortpf = short_pfname($pf);
$pf =~ s/^[^_]*_//; $pf =~ s/^[^_]*_//;
$pf =~ s/_LEDA$//; $pf =~ s/_LEDA$//;
if (!exists $platform_index{$shortpf}) { if (!exists $platform_index{$shortpf}) {
# print STDERR "Warning: Platform $_ is unknown!\n"; # print STDERR "Warning: Platform $_ is unknown!\n";
$platform_index{$shortpf} = 1; $platform_index{$shortpf} = 1;
push(@known_platforms,$shortpf); # ??? push(@known_platforms,$shortpf); # ???
$platform_short_names{$shortpf} = $shortpf; $platform_short_names{$shortpf} = $shortpf;
} }
} }
# Make a list of all the platforms that are to be treated, in the order they # Make a list of all the platforms that are to be treated, in the order they
@ -448,14 +448,14 @@ sub choose_platforms()
@platforms_to_do = (); @platforms_to_do = ();
@known_platforms = sort sort_pf @known_platforms; @known_platforms = sort sort_pf @known_platforms;
for ($index=0; $index < @known_platforms; $index += 1) { for ($index=0; $index < @known_platforms; $index += 1) {
$pf = $known_platforms[$index]; $pf = $known_platforms[$index];
my $ind2 = 0; my $ind2 = 0;
foreach (@available_platforms) { foreach (@available_platforms) {
my $apf = short_pfname($_); my $apf = short_pfname($_);
if ($apf eq $pf) { if ($apf eq $pf) {
push(@platforms_to_do, $_); push(@platforms_to_do, $_);
} }
} }
} }
} }
@ -466,96 +466,103 @@ sub print_platform_descriptions()
<h2><a name="platforms">Platform Description and Summary</a></h2> <h2><a name="platforms">Platform Description and Summary</a></h2>
<table border="1" cellspacing="2" cellpadding="5" class="summary"> <table border="1" cellspacing="2" cellpadding="5" class="summary">
<tr align="center"> <tr align="center">
<th colspan="2">OS and compiler</th> <th colspan="2">Platform Name</th>
<th>Tester</th> <th>Compiler</th>
<th class="ok">y</th> <th>Operating System</th>
<th class="third_party_warning">t</th> <th>Tester</th>
<th class="warning">w</th> <th class="ok">y</th>
<th class="timeout">o</th> <th class="third_party_warning">t</th>
<th class="error">n</th> <th class="warning">w</th>
<th class="requirements">r</th> <th class="timeout">o</th>
<th>DEBUG?</th> <th class="error">n</th>
<th>CMake</th> <th class="requirements">r</th>
<th>BOOST</th> <th>DEBUG?</th>
<th>MPFR</th> <th>CMake</th>
<th>GMP</th> <th>BOOST</th>
<th>QT</th> <th>MPFR</th>
<th>LEDA</th> <th>GMP</th>
<th>CXXFLAGS</th> <th>QT</th>
<th>LDFLAGS</th> <th>LEDA</th>
<th>CXXFLAGS</th>
<th>LDFLAGS</th>
</tr> </tr>
EOF EOF
my ($platform_num)=(0); my ($platform_num)=(0);
foreach $pf (@platforms_to_do) { foreach $pf (@platforms_to_do) {
my $pf_num_plus_one = $platform_num + 1; my $pf_num_plus_one = $platform_num + 1;
print OUTPUT "<tr>\n<td><a name=\"platform$pf_num_plus_one\">$pf_no</a>\n"; print OUTPUT "<tr>\n<td><a name=\"platform$pf_num_plus_one\">$pf_no</a>\n";
$pf_no++; $pf_no++;
# my $pf_short = join('_',parse_platform_2($pf)); # my $pf_short = join('_',parse_platform_2($pf));
(my $pf_short) = ($pf =~ m/_(.*)/); (my $pf_short) = ($pf =~ m/_(.*)/);
print OUTPUT "<td><a href=\"$release_name/Installation/TestReport_$pf.gz\""; print OUTPUT "<td><a href=\"$release_name/Installation/TestReport_$pf.gz\"";
($platform_is_64bits{$pf}) = ! ($pf =~ m/32/); ($platform_is_64bits{$pf}) = ! ($pf =~ m/32/);
if (open (PLATFORM_INFO, "results_${pf}.info")) { if (open (PLATFORM_INFO, "results_${pf}.info")) {
$_ = <PLATFORM_INFO>; # CGAL_VERSION $_ = <PLATFORM_INFO>; # CGAL_VERSION
$_ = <PLATFORM_INFO>; # COMPILER $_ = <PLATFORM_INFO>; # COMPILER
chomp; chomp;
my $compiler = $_; my $compiler = $_;
print OUTPUT " title=\"$compiler\">$pf_short</a>"; print OUTPUT " title=\"$compiler\">$pf_short</a>";
$_ = <PLATFORM_INFO>; # TESTER_NAME $_ = <PLATFORM_INFO>; # OPERATING_SYSTEM
chomp; chomp;
my $tester_name = $_; my $operating_system = $_;
$_ = <PLATFORM_INFO>; # TESTER_ADDRESS $_ = <PLATFORM_INFO>; # TESTER_NAME
chomp; chomp;
my $tester_address = $_; my $tester_name = $_;
$_ = <PLATFORM_INFO>; # TESTER_ADDRESS
chomp;
my $tester_address = $_;
my $county = $testresults[$platform_num]->{"y"}; my $county = $testresults[$platform_num]->{"y"};
my $countt = $testresults[$platform_num]->{"t"}; my $countt = $testresults[$platform_num]->{"t"};
my $countw = $testresults[$platform_num]->{"w"}; my $countw = $testresults[$platform_num]->{"w"};
my $counto = $testresults[$platform_num]->{"o"}; my $counto = $testresults[$platform_num]->{"o"};
my $countn = $testresults[$platform_num]->{"n"}; my $countn = $testresults[$platform_num]->{"n"};
my $countr = $testresults[$platform_num]->{"r"}; my $countr = $testresults[$platform_num]->{"r"};
my $index = 8; my $index = 8;
my @tmp; my @tmp;
while ($index) { while ($index) {
$index--; $index--;
$_ = <PLATFORM_INFO>; $_ = <PLATFORM_INFO>;
chomp; chomp;
$tmp[$index] = $_; $tmp[$index] = $_;
} }
($platform_is_optimized{$pf}) = ($tmp[1] =~ m|([-/]x?O[1-9])|); ($platform_is_optimized{$pf}) = ($tmp[1] =~ m|([-/]x?O[1-9])|);
$_ = <PLATFORM_INFO>; $_ = <PLATFORM_INFO>;
chomp; chomp;
my $build_type = $platform_is_optimized{$pf} ? " - " : "YES"; my $build_type = $platform_is_optimized{$pf} ? " - " : "YES";
print OUTPUT "</td>\n"; print OUTPUT "</td>\n";
print OUTPUT "<td><a href=\"mailto:$tester_address\">$tester_name</a></td>\n"; print OUTPUT "<td>$compiler</td>\n"; # Compiler
print OUTPUT "<td>$county</td>\n"; print OUTPUT "<td>$operating_system</td>\n"; # Operating System
print OUTPUT "<td>$countt</td>\n"; print OUTPUT "<td><a href=\"mailto:$tester_address\">$tester_name</a></td>\n";
print OUTPUT "<td>$countw</td>\n"; print OUTPUT "<td>$county</td>\n";
print OUTPUT "<td>$counto</td>\n"; print OUTPUT "<td>$countt</td>\n";
print OUTPUT "<td>$countn</td>\n"; print OUTPUT "<td>$countw</td>\n";
print OUTPUT "<td>$countr</td>\n"; print OUTPUT "<td>$counto</td>\n";
print OUTPUT "<td align=\"center\">$build_type</td>\n"; print OUTPUT "<td>$countn</td>\n";
$index = 8; print OUTPUT "<td>$countr</td>\n";
while ($index) { print OUTPUT "<td align=\"center\">$build_type</td>\n";
$index--; $index = 8;
$_ = $tmp[$index]; while ($index) {
$index--;
$_ = $tmp[$index];
if($index > 2) { if($index > 2) {
print OUTPUT "<td align=\"center\">$_</td>\n"; print OUTPUT "<td align=\"center\">$_</td>\n";
} else { } else {
print OUTPUT "<td>$_</td>\n"; print OUTPUT "<td>$_</td>\n";
} }
} }
} else { } else {
print OUTPUT ">$pf_short</a>"; print OUTPUT ">$pf_short</a>";
my $index = 12; my $index = 12;
while ($index) { while ($index) {
$index--; $index--;
print OUTPUT "<td>?</td>\n"; print OUTPUT "<td>?</td>\n";
} }
} }
++$platform_num; ++$platform_num;
} }
print OUTPUT "</table>\n<p>\n"; print OUTPUT "</table>\n<p>\n";
} }
@ -565,15 +572,15 @@ sub print_platforms_numbers()
my ($platform_num,$platform)=(0,""); my ($platform_num,$platform)=(0,"");
my $release_version = substr($release_name, 5); my $release_version = substr($release_name, 5);
foreach $platform (@platforms_to_do) { foreach $platform (@platforms_to_do) {
++$platform_num; ++$platform_num;
my $pf_short = short_pfname($platform); my $pf_short = short_pfname($platform);
my $class = ""; my $class = "";
my $tag = ""; my $tag = "";
my $platformlink = $platform; my $platformlink = $platform;
if($platform_is_optimized{$platform} || $platform_is_64bits{$platform}) if($platform_is_optimized{$platform} || $platform_is_64bits{$platform})
{ {
$class = " class=\""; $class = " class=\"";
$tag = " ( "; $tag = " ( ";
if($platform_is_64bits{$platform}) { if($platform_is_64bits{$platform}) {
$class = "$class os64bits"; $class = "$class os64bits";
$tag = $tag . "64 bits "; $tag = $tag . "64 bits ";
@ -584,8 +591,8 @@ sub print_platforms_numbers()
} }
$class = $class . "\""; $class = $class . "\"";
$tag = $tag . " )"; $tag = $tag . " )";
} }
print OUTPUT "<td$class><a href=\"summary-$release_version.html?platform=$platformlink\" title=\"$pf_short$tag\"><b>$platform_num</b></a>\n"; print OUTPUT "<td$class><a href=\"summary-$release_version.html?platform=$platformlink\" title=\"$pf_short$tag\"><b>$platform_num</b></a>\n";
} }
} }
@ -594,11 +601,11 @@ sub print_platforms()
my ($pf_no,$pf) = (1,""); my ($pf_no,$pf) = (1,"");
print OUTPUT '<table border="1" cellspacing="2" cellpadding="5" >',"\n"; print OUTPUT '<table border="1" cellspacing="2" cellpadding="5" >',"\n";
foreach $pf (@platforms_to_do) { foreach $pf (@platforms_to_do) {
print OUTPUT "<tr>\n<td>$pf_no\n"; print OUTPUT "<tr>\n<td>$pf_no\n";
$pf_no++; $pf_no++;
my $pf_short = short_pfname($pf); my $pf_short = short_pfname($pf);
print OUTPUT "<td>$platform_short_names{$pf_short}"; print OUTPUT "<td>$platform_short_names{$pf_short}";
print OUTPUT "\n</td></tr>\n"; print OUTPUT "\n</td></tr>\n";
} }
print OUTPUT "</table>\n"; print OUTPUT "</table>\n";
} }
@ -651,8 +658,8 @@ EOF
sub main() sub main()
{ {
if (scalar(@ARGV) != 1 ) { if (scalar(@ARGV) != 1 ) {
print STDERR "usage: $0 directory\n"; print STDERR "usage: $0 directory\n";
exit 1; exit 1;
} }
$release_name =shift(@ARGV); $release_name =shift(@ARGV);
@ -661,8 +668,8 @@ sub main()
$release_name =~ s<(/)$><>; $release_name =~ s<(/)$><>;
chdir $testresult_dir or die; chdir $testresult_dir or die;
if ( ! -d $release_name ) { if ( ! -d $release_name ) {
print STDERR "$release_name is not a valid directory\n"; print STDERR "$release_name is not a valid directory\n";
exit 1; exit 1;
} }
# init_known_platforms(); # init_known_platforms();
@ -721,9 +728,9 @@ sub init_known_platforms()
@known_platforms = (); @known_platforms = ();
while(<PLATFORMS>) { while(<PLATFORMS>) {
($short_name, $full_name) =split; ($short_name, $full_name) =split;
$full_name = short_pfname($full_name); $full_name = short_pfname($full_name);
push(@known_platforms,$full_name); push(@known_platforms,$full_name);
$platform_short_names{$full_name} = $full_name; $platform_short_names{$full_name} = $full_name;
} }
close(PLATFORMS); close(PLATFORMS);
} }

View File

@ -32,8 +32,8 @@ sub make_tempdir()
my $dirno = 1; my $dirno = 1;
$TMPDIR = "TMP$dirno"; $TMPDIR = "TMP$dirno";
while ( -f $TMPDIR or -d $TMPDIR ) { while ( -f $TMPDIR or -d $TMPDIR ) {
++$dirno; ++$dirno;
$TMPDIR = "TMP$dirno"; $TMPDIR = "TMP$dirno";
} }
mkdir($TMPDIR,0770) or die "Cannot create temporary directory $TMPDIR\n"; mkdir($TMPDIR,0770) or die "Cannot create temporary directory $TMPDIR\n";
} }
@ -51,63 +51,66 @@ sub reformat_results($)
$_ = $line; $_ = $line;
open (PLATFORM_INFO,">${platform}.info") or return; open (PLATFORM_INFO,">${platform}.info") or return;
open (PLATFORM_NEW_RESULTS,">${platform}.new_results") or return; open (PLATFORM_NEW_RESULTS,">${platform}.new_results") or return;
my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE,$TPL) = ("-","-","-","-","-","-","-","-","-","-","-","no","TPL:"); my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$OS,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE,$TPL) = ("-","-","-","-","-","-","-","-","-","-","-","no","TPL:");
my ($LDFLAGS,$CXXFLAGS) = ("", ""); my ($LDFLAGS,$CXXFLAGS) = ("", "");
while (! /^------/) { while (! /^------/) {
if(/^\s*$/) { if(/^\s*$/) {
goto NEXT; goto NEXT;
} }
if(/^-- USING CMake version: ([\w\.-]+)/) { if(/^-- USING CMake version: ([\w\.-]+)/) {
$CMAKE = $1; $CMAKE = $1;
} }
if (/^CGAL_VERSION\s+([\w\.-]+)/) { if (/^CGAL_VERSION\s+([\w\.-]+)/) {
$CGAL_VERSION = $1; $CGAL_VERSION = $1;
} }
if (/LEDA_VERSION = '([^']+)'/) { if (/LEDA_VERSION = '([^']+)'/) {
$LEDA_VERSION="$1"; $LEDA_VERSION="$1";
} }
if (/LEDAWIN_VERSION = '([^']+)'/) { if (/LEDAWIN_VERSION = '([^']+)'/) {
$LEDA_VERSION="$LEDA_VERSION+win"; $LEDA_VERSION="$LEDA_VERSION+win";
} }
if (/COMPILER_VERSION = '([^']+)'/) { if (/COMPILER_VERSION = '([^']+)'/) {
$COMPILER = $1; $COMPILER = $1;
} }
if (/^TESTER_NAME\s+(.*)$/) { if (/-- Operating system: (.*)/) {
$TESTER_NAME = $1; $OS = $1;
} }
if (/^TESTER_ADDRESS\s+(.*)$/) { if (/^TESTER_NAME\s+(.*)$/) {
$TESTER_ADDRESS = $1; $TESTER_NAME = $1;
} }
if (/MPFR_VERSION = '([^']+)'/) { if (/^TESTER_ADDRESS\s+(.*)$/) {
$MPFR="$1"; $TESTER_ADDRESS = $1;
} }
if (/ZLIB_VERSION = '([^']+)'/) { if (/MPFR_VERSION = '([^']+)'/) {
$ZLIB="$1"; $MPFR="$1";
} }
if (/OPENGL_VERSION = '([^']+)'/) { if (/ZLIB_VERSION = '([^']+)'/) {
$OPENGL="$1"; $ZLIB="$1";
} }
if (/GMP_VERSION = '([^']+)'/) { if (/OPENGL_VERSION = '([^']+)'/) {
$GMP="$1"; $OPENGL="$1";
} }
if (/GMPXX_VERSION = '([^']+)'/) { if (/GMP_VERSION = '([^']+)'/) {
$GMP="$GMP+gmpxx"; $GMP="$1";
} }
if (/QT_VERSION = '([^']+)'/) { if (/GMPXX_VERSION = '([^']+)'/) {
$QT="$1"; $GMP="$GMP+gmpxx";
} }
if (/QT4_VERSION = '([^']+)'/) { if (/QT_VERSION = '([^']+)'/) {
$QT="$1"; $QT="$1";
} }
if (/Qt5_VERSION = '([^']+)'/) { if (/QT4_VERSION = '([^']+)'/) {
$QT="$1"; $QT="$1";
} }
if (/Qt6_VERSION = '([^']+)'/) { if (/Qt5_VERSION = '([^']+)'/) {
$QT="$1"; $QT="$1";
} }
if (/BOOST_VERSION = '([^']+)'/) { if (/Qt6_VERSION = '([^']+)'/) {
$BOOST="$1"; $QT="$1";
} }
if (/BOOST_VERSION = '([^']+)'/) {
$BOOST="$1";
}
# if (/BOOST_THREAD_VERSION = '([^']+)'/) { # if (/BOOST_THREAD_VERSION = '([^']+)'/) {
# $BOOST="$BOOST+thread"; # $BOOST="$BOOST+thread";
# } # }
@ -117,12 +120,12 @@ sub reformat_results($)
# if (/BOOST_BIMAP_VERSION = '([^']+)'/) { # if (/BOOST_BIMAP_VERSION = '([^']+)'/) {
# $BOOST="$BOOST+bimap"; # $BOOST="$BOOST+bimap";
# } # }
if (/USING +CXXFLAGS = '([^']*)'/ && !$CXXFLAGS) { if (/USING +CXXFLAGS = '([^']*)'/ && !$CXXFLAGS) {
$CXXFLAGS="$CXXFLAGS $1"; $CXXFLAGS="$CXXFLAGS $1";
} }
if (/USING +LDFLAGS = '([^']*)'/) { if (/USING +LDFLAGS = '([^']*)'/) {
$LDFLAGS="$LDFLAGS $1"; $LDFLAGS="$LDFLAGS $1";
} }
# if(/^CGAL_TEST_PLATFORM /) { # if(/^CGAL_TEST_PLATFORM /) {
# # should be the last one of the header # # should be the last one of the header
# last; # last;
@ -141,12 +144,13 @@ NEXT: if(! ($_= <PLATFORM_RESULTS>)) {
} }
} }
while (<PLATFORM_RESULTS>) { while (<PLATFORM_RESULTS>) {
print PLATFORM_NEW_RESULTS $_; print PLATFORM_NEW_RESULTS $_;
} }
rename("${platform}.new_results","${platform}.txt") or die "cannot rename!"; rename("${platform}.new_results","${platform}.txt") or die "cannot rename!";
print PLATFORM_INFO <<"EOF"; print PLATFORM_INFO <<"EOF";
$CGAL_VERSION $CGAL_VERSION
$COMPILER $COMPILER
$OS
$TESTER_NAME $TESTER_NAME
$TESTER_ADDRESS $TESTER_ADDRESS
$CMAKE $CMAKE
@ -166,7 +170,7 @@ EOF
if ($version if ($version
&& $version ne "CGAL-$CGAL_VERSION" && $version ne "CGAL-$CGAL_VERSION"
&& ($version !~ /^CGAL-${CGAL_VERSION}-Ic?-[\d]+$/)) { && ($version !~ /^CGAL-${CGAL_VERSION}-Ic?-[\d]+$/)) {
die "Wrong version in $platform: $CGAL_VERSION instead of $version.\n"; die "Wrong version in $platform: $CGAL_VERSION instead of $version.\n";
} }
} }
@ -174,20 +178,20 @@ sub one_archive($)
{ {
my $archive = shift; my $archive = shift;
if (! -f $archive) { if (! -f $archive) {
print STDERR "$archive is not a valid filename\n"; print STDERR "$archive is not a valid filename\n";
return 0; return 0;
} }
if ( $archive =~ m/\.gz$/ ) { if ( $archive =~ m/\.gz$/ ) {
system("gunzip", "$archive") == 0 or return 0; system("gunzip", "$archive") == 0 or return 0;
$archive =~ s/\.gz$//; $archive =~ s/\.gz$//;
} }
if ( $archive =~ m/.*\.tgz$/ ) { if ( $archive =~ m/.*\.tgz$/ ) {
system("gunzip", "$archive") == 0 or return 0; system("gunzip", "$archive") == 0 or return 0;
$archive =~ s/\.tgz$/.tar/; $archive =~ s/\.tgz$/.tar/;
} }
if ( $archive !~ /\.tar$/) { if ( $archive !~ /\.tar$/) {
print STDERR "$0: $archive not a tar file\n"; print STDERR "$0: $archive not a tar file\n";
return 0; return 0;
} }
make_tempdir(); make_tempdir();
rename("$archive","$TMPDIR/$archive") or die "cannot rename(\"$archive\",\"$TMPDIR/$archive\")"; rename("$archive","$TMPDIR/$archive") or die "cannot rename(\"$archive\",\"$TMPDIR/$archive\")";
@ -207,13 +211,13 @@ sub one_archive($)
sub all_archives() { sub all_archives() {
my $archive; my $archive;
foreach $archive (@ARGV) { foreach $archive (@ARGV) {
if (one_archive($archive)) { if (one_archive($archive)) {
my $date=`date`; my $date=`date`;
chop $date; chop $date;
print_log("$final_version : $archive successfully reformatted. [ $date ]\n"); print_log("$final_version : $archive successfully reformatted. [ $date ]\n");
} else { } else {
print_log_err("$final_version : Could not reformat $archive\n"); print_log_err("$final_version : Could not reformat $archive\n");
} }
} }
} }

View File

@ -30,7 +30,7 @@ usage:
$0 (-h|-r) $0 (-h|-r)
[-n version number] [-n version number]
[-d releasedir] [-a allpackagesdir] [-d releasedir] [-a allpackagesdir]
[-c candidatesdir] [-c candidatesdir]
[-l lockfile] [-l lockfile]
Exactly one of the options -h or -r must be present. Exactly one of the options -h or -r must be present.
@ -96,11 +96,11 @@ sub termination_signal_handler {
sub lock() sub lock()
{ {
if (system("$LOCKCMD", "-r", '10', "$LOCKFILE") != 0) { if (system("$LOCKCMD", "-r", '10', "$LOCKFILE") != 0) {
print STDERR <<"TOTHIER"; print STDERR <<"TOTHIER";
The script could not proceed because The script could not proceed because
it could not acquire the needed lock on file $LOCKFILE. it could not acquire the needed lock on file $LOCKFILE.
TOTHIER TOTHIER
exit 1; exit 1;
} }
$SIG{QUIT} = \&termination_signal_handler; $SIG{QUIT} = \&termination_signal_handler;
$SIG{HUP} = \&termination_signal_handler; $SIG{HUP} = \&termination_signal_handler;
@ -153,12 +153,12 @@ sub install_packages() {
# option instead of --exclude=.svn # option instead of --exclude=.svn
# -- Laurent Rineau, 2009/12/04 (idea by Sylvain Pion) # -- Laurent Rineau, 2009/12/04 (idea by Sylvain Pion)
if( -f $dont_submit ) { if( -f $dont_submit ) {
@command = (@command, "--exclude-from=$dont_submit"); @command = (@command, "--exclude-from=$dont_submit");
} }
@command = (@command, @global_dont_submit_tar_options); @command = (@command, @global_dont_submit_tar_options);
@command = (@command, "-C", "$package_name", "."); @command = (@command, "-C", "$package_name", ".");
foreach( @command ) { foreach( @command ) {
print "$_ "; print "$_ ";
} }
print "\n"; print "\n";
system(@command); system(@command);
@ -186,15 +186,15 @@ sub install_packages() {
my $filename = $_->name(); my $filename = $_->name();
if( ! $_->is_dir() ) if( ! $_->is_dir() )
{ {
if(exists($files{$_->name()})) if(exists($files{$_->name()}))
{ {
print LOG_CONFLICTS "File ", $_->name(), " from package ", $package_name; print LOG_CONFLICTS "File ", $_->name(), " from package ", $package_name;
print LOG_CONFLICTS " conflicts with one from package ", $files{$_->name()}. "\n"; print LOG_CONFLICTS " conflicts with one from package ", $files{$_->name()}. "\n";
} }
else else
{ {
$files{$_->name()} = $package_name; $files{$_->name()} = $package_name;
} }
} }
else { # is_dir() returned true else { # is_dir() returned true
next if ($filename !~ /^\.\/?$/) and ($filename =~ /^\.\.?\/?$/); next if ($filename !~ /^\.\/?$/) and ($filename =~ /^\.\.?\/?$/);
@ -323,10 +323,10 @@ sub CreateExampleTestDirs()
chdir 'examples' or return; chdir 'examples' or return;
print "Creating $VERSION/test/example directories ...\n"; print "Creating $VERSION/test/example directories ...\n";
foreach $DIR (glob("*")) { foreach $DIR (glob("*")) {
if ( -d $DIR ) { if ( -d $DIR ) {
print "Creating test/${DIR}_Examples ...\n"; print "Creating test/${DIR}_Examples ...\n";
dircopy("$DIR", "../test/${DIR}_Examples"); dircopy("$DIR", "../test/${DIR}_Examples");
} }
} }
chdir '..'; chdir '..';
} }
@ -343,16 +343,16 @@ sub CreateDemoTestDirs()
chdir 'demo' or return; chdir 'demo' or return;
print "Creating $VERSION/test/demo directories ...\n"; print "Creating $VERSION/test/demo directories ...\n";
foreach $DIR (glob("*")) { foreach $DIR (glob("*")) {
if ( -d $DIR) { if ( -d $DIR) {
if( ("$DIR" ne "icons") && ("$DIR" ne "resources") ) { if( ("$DIR" ne "icons") && ("$DIR" ne "resources") ) {
print "Creating test/${DIR}_Demo ...\n"; print "Creating test/${DIR}_Demo ...\n";
dircopy("$DIR", "../test/${DIR}_Demo"); dircopy("$DIR", "../test/${DIR}_Demo");
} }
else { else {
print "Creating test/${DIR}...\n"; print "Creating test/${DIR}...\n";
dircopy("$DIR", "../test/${DIR}"); dircopy("$DIR", "../test/${DIR}");
} }
} }
} }
chdir '..'; chdir '..';
} }
@ -371,38 +371,38 @@ sub make_testscripts()
chdir 'test'; chdir 'test';
foreach $DIR (glob("*")) { foreach $DIR (glob("*")) {
if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") ) { if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") ) {
chdir $DIR; chdir $DIR;
if ( -f 'Makefile') { if ( -f 'Makefile') {
rename 'Makefile', 'makefile'; rename 'Makefile', 'makefile';
} }
if ( -f 'makefile' ) { if ( -f 'makefile' ) {
open MAKEFILE, "makefile"; open MAKEFILE, "makefile";
open NEW_MAKEFILE, ">makefile.new"; open NEW_MAKEFILE, ">makefile.new";
while (<MAKEFILE>) { while (<MAKEFILE>) {
s/\.o\b/\$(OBJ_EXT)/g; s/\.o\b/\$(OBJ_EXT)/g;
s/-g\b/\$(DEBUG_OPT)/g; s/-g\b/\$(DEBUG_OPT)/g;
print NEW_MAKEFILE $_; print NEW_MAKEFILE $_;
} }
close NEW_MAKEFILE; close NEW_MAKEFILE;
close MAKEFILE; close MAKEFILE;
rename("makefile.new","makefile"); rename("makefile.new","makefile");
} else { } else {
my $options = '-t'; my $options = '-t';
if ( -f 'cgal_create_makefile_options') { if ( -f 'cgal_create_makefile_options') {
if (open(OPTIONS, "<cgal_create_makefile_options")) { if (open(OPTIONS, "<cgal_create_makefile_options")) {
$_ = <OPTIONS>; $_ = <OPTIONS>;
chomp; chomp;
if (/^[\w\s-]+$/) { $options = $_; if (/^[\w\s-]+$/) { $options = $_;
} else { } else {
print STDERR "Rejected cgal_create_makefile_options in $DIR\n"; print STDERR "Rejected cgal_create_makefile_options in $DIR\n";
} }
close OPTIONS; close OPTIONS;
} }
} }
system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed"; system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed";
} }
if ( ! -f 'cgal_test' ) { if ( ! -f 'cgal_test' ) {
$_ = $DIR; $_ = $DIR;
# chomp; # chomp;
if (/_Demo$/) { if (/_Demo$/) {
@ -410,48 +410,48 @@ sub make_testscripts()
} else { } else {
system("$DEVELSCRIPTSDIR/create_cgal_test") == 0 or die "Execution of $DEVELSCRIPTSDIR/create_cgal_test failed"; system("$DEVELSCRIPTSDIR/create_cgal_test") == 0 or die "Execution of $DEVELSCRIPTSDIR/create_cgal_test failed";
} }
} }
chdir '..'; chdir '..';
} }
} }
chdir $BASEDIR; chdir $BASEDIR;
chdir 'examples'; chdir 'examples';
print "Creating makefiles in examples\n"; print "Creating makefiles in examples\n";
foreach $DIR (glob("*")) { foreach $DIR (glob("*")) {
if ( -d $DIR ) { if ( -d $DIR ) {
chdir $DIR; chdir $DIR;
if ( -f 'Makefile') { if ( -f 'Makefile') {
rename 'Makefile', 'makefile'; rename 'Makefile', 'makefile';
} }
if ( -f 'makefile' ) { if ( -f 'makefile' ) {
open MAKEFILE, "makefile"; open MAKEFILE, "makefile";
open NEW_MAKEFILE, ">makefile.new"; open NEW_MAKEFILE, ">makefile.new";
while (<MAKEFILE>) { while (<MAKEFILE>) {
s/\.o\b/\$(OBJ_EXT)/g; s/\.o\b/\$(OBJ_EXT)/g;
s/-g\b/\$(DEBUG_OPT)/g; s/-g\b/\$(DEBUG_OPT)/g;
print NEW_MAKEFILE $_; print NEW_MAKEFILE $_;
} }
close NEW_MAKEFILE; close NEW_MAKEFILE;
close MAKEFILE; close MAKEFILE;
rename("makefile.new","makefile"); rename("makefile.new","makefile");
} else { } else {
my $options = '-d'; my $options = '-d';
if ( -f 'cgal_create_makefile_options') { if ( -f 'cgal_create_makefile_options') {
if (open(OPTIONS, "<cgal_create_makefile_options")) { if (open(OPTIONS, "<cgal_create_makefile_options")) {
$_ = <OPTIONS>; $_ = <OPTIONS>;
chomp; chomp;
if (/^[\w\s-]+$/) { $options = $_; if (/^[\w\s-]+$/) { $options = $_;
} else { } else {
print STDERR "Rejected cgal_create_makefile_options in $DIR\n"; print STDERR "Rejected cgal_create_makefile_options in $DIR\n";
} }
close OPTIONS; close OPTIONS;
} }
} }
system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed"; system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed";
} }
chdir '..'; chdir '..';
} }
} }
chdir $BASEDIR; chdir $BASEDIR;
} }

View File

@ -301,10 +301,10 @@ if [ -n "$DO_PUBLIC" ]; then
public_release_version="${public_release_version}-beta${BETA}" public_release_version="${public_release_version}-beta${BETA}"
fi fi
if [ -r "${NUMBERS_DIR}/public_release_name" ]; then if [ -r "${NUMBERS_DIR}/public_release_name" ]; then
public_release_name=`cat "${NUMBERS_DIR}/public_release_name"` public_release_name=`cat "${NUMBERS_DIR}/public_release_name"`
public_release_version=${public_release_name#CGAL-} public_release_version=${public_release_name#CGAL-}
else else
public_release_name="CGAL-${public_release_version}" public_release_name="CGAL-${public_release_version}"
fi fi
if ! [ -f ${NUMBERS_DIR}/MAJOR_NUMBER ]; then if ! [ -f ${NUMBERS_DIR}/MAJOR_NUMBER ]; then
eval $(cmake -DCGALCONFIGVERSIONFILE=${SOURCES_DIR}/CGALConfigVersion.cmake -P ${SOURCES_DIR}/Scripts/developer_scripts/create_new_release_evaluate_versions.cmake 2>&1) eval $(cmake -DCGALCONFIGVERSIONFILE=${SOURCES_DIR}/CGALConfigVersion.cmake -P ${SOURCES_DIR}/Scripts/developer_scripts/create_new_release_evaluate_versions.cmake 2>&1)

View File

@ -14,7 +14,7 @@ fi
git=git git=git
if hub --version 2> /dev/null > /dev/null; then if hub --version 2> /dev/null > /dev/null; then
case "$(hub --version)" in case "$(hub --version)" in
*hub\ version*) git=hub;; *hub\ version*) git=hub;;
esac esac
fi fi
@ -63,11 +63,11 @@ if [ -d build ] && \
cmake_output=$(cmake build 2>&1) cmake_output=$(cmake build 2>&1)
cmake_exit_code=$? cmake_exit_code=$?
if [ "$cmake_exit_code" -ne 0 ]; then if [ "$cmake_exit_code" -ne 0 ]; then
echo 'CMake error:' echo 'CMake error:'
printf '%s\n' "${cmake_output}" printf '%s\n' "${cmake_output}"
exit 1 exit 1
else else
echo OK echo OK
fi fi
else else
echo '.. Skip the CMake test (please configure a build/ CMake binary directory,' echo '.. Skip the CMake test (please configure a build/ CMake binary directory,'