diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 11ade3231f1..6e6104b6f0c 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -361,13 +361,17 @@ include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) cgal_setup_module_path() if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) - message(STATUS "Operating system:") - execute_process( - COMMAND uname -a - TIMEOUT 5 - OUTPUT_VARIABLE uname_a - ERROR_VARIABLE uname_a) - message(STATUS "${uname_a}") + find_program(LSB_RELEASE_EXEC lsb_release) + if(LSB_RELEASE_EXEC) + execute_process( + COMMAND ${LSB_RELEASE_EXEC} -ds + OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + 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() endif() diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index a1805aa9ec9..f26fd7c30de 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -125,8 +125,8 @@ sub list_platforms() { my ($filename, @result); foreach $_ (glob("results_*.txt")) { - ($filename) = m/results_(.*?)\.txt\s*/; - push(@result, $filename) if $filename; + ($filename) = m/results_(.*?)\.txt\s*/; + push(@result, $filename) if $filename; } return @result; } @@ -140,9 +140,9 @@ sub list_packages($) my $test_result="results_${platform}.txt"; open(TESTRESULT, $test_result) or return 0; while () { - if (/^\s*(.*?)\s+(\w)\s*$/) { - $test_directories{$1} = ''; - } + if (/^\s*(.*?)\s+(\w)\s*$/) { + $test_directories{$1} = ''; + } } close TESTRESULT or return 0; return 1; @@ -158,31 +158,31 @@ sub collect_results_of_platform($) my $resulttext; open(TESTRESULT, $test_result) or return $platform_results; while () { - if (/^\s*(.*?)\s+(\w)\s*$/) { - #($package,$succes) = ($1,$2); - if ($2 eq 'y' or $2 eq 'Y') { - $resulttext = 'y'; - ++$yeahs; - } 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; - } elsif ($2 eq 'o' or $2 eq 'O') { - $resulttext = 'o'; - ++$timeout; + if (/^\s*(.*?)\s+(\w)\s*$/) { + #($package,$succes) = ($1,$2); + if ($2 eq 'y' or $2 eq 'Y') { + $resulttext = 'y'; + ++$yeahs; + } 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; + } elsif ($2 eq 'o' or $2 eq 'O') { + $resulttext = 'o'; + ++$timeout; } elsif ($2 eq 'r') { - $resulttext = 'r'; - ++$reqs; - } else { - $resulttext = ' '; - } - $platform_results->{$1} = $resulttext; - } + $resulttext = 'r'; + ++$reqs; + } else { + $resulttext = ' '; + } + $platform_results->{$1} = $resulttext; + } } close TESTRESULT; $platform_results->{"y"} = $yeahs; @@ -198,10 +198,10 @@ sub collect_results() { my $platform; foreach $platform (@platforms_to_do) { - list_packages($platform); + list_packages($platform); } 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_num = 0; foreach $test_directory (sort keys %test_directories) { - if ($PLATFORMS_REF_BETWEEN_RESULTS) { - $test_num++; - if ($test_num == 15) { - $test_num = 0; - print OUTPUT "\n \n"; - print OUTPUT "Platform Description"; - print OUTPUT "\n"; - print_platforms_numbers(); - print OUTPUT "\n\n"; - } - } - # my $version; - # if ( -r "$test_directory/version" ) { - # open(VERSION, "$test_directory/version"); - # while() { - # ($version) = /^\s*([^\s]*)\s/; - # last if $version; - # } - # close VERSION; - # } - print OUTPUT "\n\n"; + if ($PLATFORMS_REF_BETWEEN_RESULTS) { + $test_num++; + if ($test_num == 15) { + $test_num = 0; + print OUTPUT "\n \n"; + print OUTPUT "Platform Description"; + print OUTPUT "\n"; + print_platforms_numbers(); + print OUTPUT "\n\n"; + } + } + # my $version; + # if ( -r "$test_directory/version" ) { + # open(VERSION, "$test_directory/version"); + # while() { + # ($version) = /^\s*([^\s]*)\s/; + # last if $version; + # } + # close VERSION; + # } + print OUTPUT "\n\n"; print OUTPUT "$test_directory\n"; - # if ( $version ) { - # print OUTPUT "$version\n"; - # } else { - # print OUTPUT "?.?\n"; - # } - my ($platform_num,$platform)=(0,""); - $platform_num=0; - foreach $platform (@platforms_to_do) { - my ($result,$resulttext); - $resulttext = $testresults[$platform_num]->{$test_directory}; - if (! defined($resulttext)) { - $resulttext = ' '; - } - print OUTPUT '$version\n"; + # } else { + # print OUTPUT "?.?\n"; + # } + my ($platform_num,$platform)=(0,""); + $platform_num=0; + foreach $platform (@platforms_to_do) { + my ($result,$resulttext); + $resulttext = $testresults[$platform_num]->{$test_directory}; + if (! defined($resulttext)) { + $resulttext = ' '; + } + print OUTPUT ' ', "$resulttext\n"; - ++$platform_num; - - } - print OUTPUT "\n"; + print OUTPUT ' class="timeout"'; + } elsif ($resulttext eq 'n') { + print OUTPUT ' class="error"'; + } elsif ($resulttext eq 'r') { + print OUTPUT ' class="requirements"'; + } + else { + print OUTPUT ' class="na"'; + } + print OUTPUT '> ', "$resulttext\n"; + ++$platform_num; + + } + print OUTPUT "\n"; } print OUTPUT "\n"; } @@ -297,7 +297,7 @@ sub print_resultpage() print OUTPUT '

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.

', "\n"; if ($PLATFORMS_BESIDE_RESULTS) { - print OUTPUT <<"EOF"; + print OUTPUT <<"EOF";
@@ -307,17 +307,17 @@ EOF print_result_table(); if ($PLATFORMS_BESIDE_RESULTS) { - print OUTPUT "\n\n"; - if ($platform_count > 0) { - my $repeat_count = (1 + 1.1/16.5)*scalar(keys %test_directories)/($platform_count+0.25); - while ($repeat_count >= 1) { - $repeat_count--; - print OUTPUT "\n
\n"; + print OUTPUT "\n\n"; + if ($platform_count > 0) { + my $repeat_count = (1 + 1.1/16.5)*scalar(keys %test_directories)/($platform_count+0.25); + while ($repeat_count >= 1) { + $repeat_count--; + print OUTPUT "\n"; - } - } - print OUTPUT "
\n"; print_platforms(); print OUTPUT "
\n
\n"; + } + } + print OUTPUT "
\n\n\n"; } } @@ -390,7 +390,7 @@ sub parse_platform_2($) # splice(@list,0,@list-3); # } while (@list < 3) { - push(@list,'?'); + push(@list,'?'); } return @list; } @@ -400,19 +400,19 @@ sub short_pfname($) my @pflist = parse_platform_2($_[0]); my $shortpf; if(@pflist < 4) { - $shortpf = join('_', $pflist[1], $pflist[2]); + $shortpf = join('_', $pflist[1], $pflist[2]); } elsif($pflist[2] !~ /Linux/i) { - $shortpf = join('_', $pflist[3], $pflist[2]); - if(@pflist >= 5) { - $shortpf = join('_', $shortpf, $pflist[4]); - } + $shortpf = join('_', $pflist[3], $pflist[2]); + if(@pflist >= 5) { + $shortpf = join('_', $shortpf, $pflist[4]); + } } else { - $shortpf = $pflist[3]; - if(@pflist >= 5) { - $shortpf = join('_', $shortpf, $pflist[4]); - } + $shortpf = $pflist[3]; + if(@pflist >= 5) { + $shortpf = join('_', $shortpf, $pflist[4]); + } } return $shortpf; } @@ -425,22 +425,22 @@ sub choose_platforms() my $index = 0; # Put all known platforms in a hash table. for ($index=0; $index < @known_platforms; $index += 1) { - $pf = $known_platforms[$index]; - $platform_index{$pf} = 1; + $pf = $known_platforms[$index]; + $platform_index{$pf} = 1; } # 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. foreach (@available_platforms) { - $pf = $_; - my $shortpf = short_pfname($pf); - $pf =~ s/^[^_]*_//; - $pf =~ s/_LEDA$//; - if (!exists $platform_index{$shortpf}) { - # print STDERR "Warning: Platform $_ is unknown!\n"; - $platform_index{$shortpf} = 1; - push(@known_platforms,$shortpf); # ??? - $platform_short_names{$shortpf} = $shortpf; - } + $pf = $_; + my $shortpf = short_pfname($pf); + $pf =~ s/^[^_]*_//; + $pf =~ s/_LEDA$//; + if (!exists $platform_index{$shortpf}) { + # print STDERR "Warning: Platform $_ is unknown!\n"; + $platform_index{$shortpf} = 1; + push(@known_platforms,$shortpf); # ??? + $platform_short_names{$shortpf} = $shortpf; + } } # 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 = (); @known_platforms = sort sort_pf @known_platforms; for ($index=0; $index < @known_platforms; $index += 1) { - $pf = $known_platforms[$index]; - my $ind2 = 0; - foreach (@available_platforms) { - my $apf = short_pfname($_); - if ($apf eq $pf) { - push(@platforms_to_do, $_); - } - } + $pf = $known_platforms[$index]; + my $ind2 = 0; + foreach (@available_platforms) { + my $apf = short_pfname($_); + if ($apf eq $pf) { + push(@platforms_to_do, $_); + } + } } } @@ -466,96 +466,103 @@ sub print_platform_descriptions()

Platform Description and Summary

- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + EOF my ($platform_num)=(0); foreach $pf (@platforms_to_do) { - my $pf_num_plus_one = $platform_num + 1; - print OUTPUT "\n\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - print OUTPUT "\n"; - $index = 8; - while ($index) { - $index--; - $_ = $tmp[$index]; + $_ = ; # OPERATING_SYSTEM + chomp; + my $operating_system = $_; + $_ = ; # TESTER_NAME + chomp; + my $tester_name = $_; + $_ = ; # TESTER_ADDRESS + chomp; + my $tester_address = $_; + + my $county = $testresults[$platform_num]->{"y"}; + my $countt = $testresults[$platform_num]->{"t"}; + my $countw = $testresults[$platform_num]->{"w"}; + my $counto = $testresults[$platform_num]->{"o"}; + my $countn = $testresults[$platform_num]->{"n"}; + my $countr = $testresults[$platform_num]->{"r"}; + + my $index = 8; + my @tmp; + while ($index) { + $index--; + $_ = ; + chomp; + $tmp[$index] = $_; + } + ($platform_is_optimized{$pf}) = ($tmp[1] =~ m|([-/]x?O[1-9])|); + $_ = ; + chomp; + my $build_type = $platform_is_optimized{$pf} ? " - " : "YES"; + print OUTPUT "\n"; + print OUTPUT "\n"; # Compiler + print OUTPUT "\n"; # Operating System + print OUTPUT "\n"; + print OUTPUT "\n"; + print OUTPUT "\n"; + print OUTPUT "\n"; + print OUTPUT "\n"; + print OUTPUT "\n"; + print OUTPUT "\n"; + print OUTPUT "\n"; + $index = 8; + while ($index) { + $index--; + $_ = $tmp[$index]; if($index > 2) { print OUTPUT "\n"; } else { print OUTPUT "\n"; } - } - } else { + } + } else { print OUTPUT ">$pf_short"; - my $index = 12; - while ($index) { + my $index = 12; + while ($index) { $index--; - print OUTPUT "\n"; - } - } - ++$platform_num; + print OUTPUT "\n"; + } + } + ++$platform_num; } print OUTPUT "
OS and compilerTesterytwonrDEBUG?CMakeBOOSTMPFRGMPQTLEDACXXFLAGSLDFLAGSPlatform NameCompilerOperating SystemTesterytwonrDEBUG?CMakeBOOSTMPFRGMPQTLEDACXXFLAGSLDFLAGS
$pf_no\n"; - $pf_no++; - # my $pf_short = join('_',parse_platform_2($pf)); - (my $pf_short) = ($pf =~ m/_(.*)/); - print OUTPUT "\n$pf_no\n"; + $pf_no++; + # my $pf_short = join('_',parse_platform_2($pf)); + (my $pf_short) = ($pf =~ m/_(.*)/); + print OUTPUT "; # CGAL_VERSION - $_ = ; # COMPILER + $_ = ; # CGAL_VERSION + $_ = ; # COMPILER chomp; my $compiler = $_; print OUTPUT " title=\"$compiler\">$pf_short"; - $_ = ; # TESTER_NAME - chomp; - my $tester_name = $_; - $_ = ; # TESTER_ADDRESS - chomp; - my $tester_address = $_; - - my $county = $testresults[$platform_num]->{"y"}; - my $countt = $testresults[$platform_num]->{"t"}; - my $countw = $testresults[$platform_num]->{"w"}; - my $counto = $testresults[$platform_num]->{"o"}; - my $countn = $testresults[$platform_num]->{"n"}; - my $countr = $testresults[$platform_num]->{"r"}; - - my $index = 8; - my @tmp; - while ($index) { - $index--; - $_ = ; - chomp; - $tmp[$index] = $_; - } - ($platform_is_optimized{$pf}) = ($tmp[1] =~ m|([-/]x?O[1-9])|); - $_ = ; - chomp; - my $build_type = $platform_is_optimized{$pf} ? " - " : "YES"; - print OUTPUT "$tester_name$county$countt$countw$counto$countn$countr$build_type$compiler$operating_system$tester_name$county$countt$countw$counto$countn$countr$build_type$_$_??
\n

\n"; } @@ -565,15 +572,15 @@ sub print_platforms_numbers() my ($platform_num,$platform)=(0,""); my $release_version = substr($release_name, 5); foreach $platform (@platforms_to_do) { - ++$platform_num; - my $pf_short = short_pfname($platform); - my $class = ""; - my $tag = ""; + ++$platform_num; + my $pf_short = short_pfname($platform); + my $class = ""; + my $tag = ""; my $platformlink = $platform; - if($platform_is_optimized{$platform} || $platform_is_64bits{$platform}) - { - $class = " class=\""; - $tag = " ( "; + if($platform_is_optimized{$platform} || $platform_is_64bits{$platform}) + { + $class = " class=\""; + $tag = " ( "; if($platform_is_64bits{$platform}) { $class = "$class os64bits"; $tag = $tag . "64 bits "; @@ -584,8 +591,8 @@ sub print_platforms_numbers() } $class = $class . "\""; $tag = $tag . " )"; - } - print OUTPUT "$platform_num\n"; + } + print OUTPUT "$platform_num\n"; } } @@ -594,11 +601,11 @@ sub print_platforms() my ($pf_no,$pf) = (1,""); print OUTPUT '',"\n"; foreach $pf (@platforms_to_do) { - print OUTPUT "\n\n"; + print OUTPUT "\n\n"; } print OUTPUT "
$pf_no\n"; - $pf_no++; - my $pf_short = short_pfname($pf); - print OUTPUT "$platform_short_names{$pf_short}"; - print OUTPUT "\n
$pf_no\n"; + $pf_no++; + my $pf_short = short_pfname($pf); + print OUTPUT "$platform_short_names{$pf_short}"; + print OUTPUT "\n
\n"; } @@ -651,8 +658,8 @@ EOF sub main() { if (scalar(@ARGV) != 1 ) { - print STDERR "usage: $0 directory\n"; - exit 1; + print STDERR "usage: $0 directory\n"; + exit 1; } $release_name =shift(@ARGV); @@ -661,8 +668,8 @@ sub main() $release_name =~ s<(/)$><>; chdir $testresult_dir or die; if ( ! -d $release_name ) { - print STDERR "$release_name is not a valid directory\n"; - exit 1; + print STDERR "$release_name is not a valid directory\n"; + exit 1; } # init_known_platforms(); @@ -721,9 +728,9 @@ sub init_known_platforms() @known_platforms = (); while() { ($short_name, $full_name) =split; - $full_name = short_pfname($full_name); - push(@known_platforms,$full_name); - $platform_short_names{$full_name} = $full_name; + $full_name = short_pfname($full_name); + push(@known_platforms,$full_name); + $platform_short_names{$full_name} = $full_name; } close(PLATFORMS); } diff --git a/Maintenance/test_handling/to_zipped_format b/Maintenance/test_handling/to_zipped_format index 60c98ce2432..f09af68afeb 100755 --- a/Maintenance/test_handling/to_zipped_format +++ b/Maintenance/test_handling/to_zipped_format @@ -32,8 +32,8 @@ sub make_tempdir() my $dirno = 1; $TMPDIR = "TMP$dirno"; while ( -f $TMPDIR or -d $TMPDIR ) { - ++$dirno; - $TMPDIR = "TMP$dirno"; + ++$dirno; + $TMPDIR = "TMP$dirno"; } mkdir($TMPDIR,0770) or die "Cannot create temporary directory $TMPDIR\n"; } @@ -51,63 +51,66 @@ sub reformat_results($) $_ = $line; open (PLATFORM_INFO,">${platform}.info") 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) = ("", ""); while (! /^------/) { if(/^\s*$/) { goto NEXT; } - if(/^-- USING CMake version: ([\w\.-]+)/) { - $CMAKE = $1; - } - if (/^CGAL_VERSION\s+([\w\.-]+)/) { - $CGAL_VERSION = $1; - } - if (/LEDA_VERSION = '([^']+)'/) { - $LEDA_VERSION="$1"; - } - if (/LEDAWIN_VERSION = '([^']+)'/) { - $LEDA_VERSION="$LEDA_VERSION+win"; - } - if (/COMPILER_VERSION = '([^']+)'/) { - $COMPILER = $1; - } - if (/^TESTER_NAME\s+(.*)$/) { - $TESTER_NAME = $1; - } - if (/^TESTER_ADDRESS\s+(.*)$/) { - $TESTER_ADDRESS = $1; - } - if (/MPFR_VERSION = '([^']+)'/) { - $MPFR="$1"; - } - if (/ZLIB_VERSION = '([^']+)'/) { - $ZLIB="$1"; - } - if (/OPENGL_VERSION = '([^']+)'/) { - $OPENGL="$1"; - } - if (/GMP_VERSION = '([^']+)'/) { - $GMP="$1"; - } - if (/GMPXX_VERSION = '([^']+)'/) { - $GMP="$GMP+gmpxx"; - } - if (/QT_VERSION = '([^']+)'/) { - $QT="$1"; - } - if (/QT4_VERSION = '([^']+)'/) { - $QT="$1"; - } - if (/Qt5_VERSION = '([^']+)'/) { - $QT="$1"; - } - if (/Qt6_VERSION = '([^']+)'/) { - $QT="$1"; - } - if (/BOOST_VERSION = '([^']+)'/) { - $BOOST="$1"; - } + if(/^-- USING CMake version: ([\w\.-]+)/) { + $CMAKE = $1; + } + if (/^CGAL_VERSION\s+([\w\.-]+)/) { + $CGAL_VERSION = $1; + } + if (/LEDA_VERSION = '([^']+)'/) { + $LEDA_VERSION="$1"; + } + if (/LEDAWIN_VERSION = '([^']+)'/) { + $LEDA_VERSION="$LEDA_VERSION+win"; + } + if (/COMPILER_VERSION = '([^']+)'/) { + $COMPILER = $1; + } + if (/-- Operating system: (.*)/) { + $OS = $1; + } + if (/^TESTER_NAME\s+(.*)$/) { + $TESTER_NAME = $1; + } + if (/^TESTER_ADDRESS\s+(.*)$/) { + $TESTER_ADDRESS = $1; + } + if (/MPFR_VERSION = '([^']+)'/) { + $MPFR="$1"; + } + if (/ZLIB_VERSION = '([^']+)'/) { + $ZLIB="$1"; + } + if (/OPENGL_VERSION = '([^']+)'/) { + $OPENGL="$1"; + } + if (/GMP_VERSION = '([^']+)'/) { + $GMP="$1"; + } + if (/GMPXX_VERSION = '([^']+)'/) { + $GMP="$GMP+gmpxx"; + } + if (/QT_VERSION = '([^']+)'/) { + $QT="$1"; + } + if (/QT4_VERSION = '([^']+)'/) { + $QT="$1"; + } + if (/Qt5_VERSION = '([^']+)'/) { + $QT="$1"; + } + if (/Qt6_VERSION = '([^']+)'/) { + $QT="$1"; + } + if (/BOOST_VERSION = '([^']+)'/) { + $BOOST="$1"; + } # if (/BOOST_THREAD_VERSION = '([^']+)'/) { # $BOOST="$BOOST+thread"; # } @@ -117,12 +120,12 @@ sub reformat_results($) # if (/BOOST_BIMAP_VERSION = '([^']+)'/) { # $BOOST="$BOOST+bimap"; # } - if (/USING +CXXFLAGS = '([^']*)'/ && !$CXXFLAGS) { - $CXXFLAGS="$CXXFLAGS $1"; - } - if (/USING +LDFLAGS = '([^']*)'/) { - $LDFLAGS="$LDFLAGS $1"; - } + if (/USING +CXXFLAGS = '([^']*)'/ && !$CXXFLAGS) { + $CXXFLAGS="$CXXFLAGS $1"; + } + if (/USING +LDFLAGS = '([^']*)'/) { + $LDFLAGS="$LDFLAGS $1"; + } # if(/^CGAL_TEST_PLATFORM /) { # # should be the last one of the header # last; @@ -141,12 +144,13 @@ NEXT: if(! ($_= )) { } } while () { - print PLATFORM_NEW_RESULTS $_; + print PLATFORM_NEW_RESULTS $_; } rename("${platform}.new_results","${platform}.txt") or die "cannot rename!"; print PLATFORM_INFO <<"EOF"; $CGAL_VERSION $COMPILER +$OS $TESTER_NAME $TESTER_ADDRESS $CMAKE @@ -166,7 +170,7 @@ EOF if ($version && $version ne "CGAL-$CGAL_VERSION" && ($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; if (! -f $archive) { - print STDERR "$archive is not a valid filename\n"; - return 0; + print STDERR "$archive is not a valid filename\n"; + return 0; } if ( $archive =~ m/\.gz$/ ) { - system("gunzip", "$archive") == 0 or return 0; - $archive =~ s/\.gz$//; + system("gunzip", "$archive") == 0 or return 0; + $archive =~ s/\.gz$//; } if ( $archive =~ m/.*\.tgz$/ ) { - system("gunzip", "$archive") == 0 or return 0; - $archive =~ s/\.tgz$/.tar/; + system("gunzip", "$archive") == 0 or return 0; + $archive =~ s/\.tgz$/.tar/; } if ( $archive !~ /\.tar$/) { - print STDERR "$0: $archive not a tar file\n"; - return 0; + print STDERR "$0: $archive not a tar file\n"; + return 0; } make_tempdir(); rename("$archive","$TMPDIR/$archive") or die "cannot rename(\"$archive\",\"$TMPDIR/$archive\")"; @@ -207,13 +211,13 @@ sub one_archive($) sub all_archives() { my $archive; foreach $archive (@ARGV) { - if (one_archive($archive)) { + if (one_archive($archive)) { my $date=`date`; chop $date; - print_log("$final_version : $archive successfully reformatted. [ $date ]\n"); - } else { - print_log_err("$final_version : Could not reformat $archive\n"); - } + print_log("$final_version : $archive successfully reformatted. [ $date ]\n"); + } else { + print_log_err("$final_version : Could not reformat $archive\n"); + } } } diff --git a/Scripts/developer_scripts/create_internal_release b/Scripts/developer_scripts/create_internal_release index 2db9f7f9ef8..2e9d5cf9b29 100755 --- a/Scripts/developer_scripts/create_internal_release +++ b/Scripts/developer_scripts/create_internal_release @@ -30,7 +30,7 @@ usage: $0 (-h|-r) [-n version number] [-d releasedir] [-a allpackagesdir] - [-c candidatesdir] + [-c candidatesdir] [-l lockfile] Exactly one of the options -h or -r must be present. @@ -96,11 +96,11 @@ sub termination_signal_handler { sub lock() { if (system("$LOCKCMD", "-r", '10', "$LOCKFILE") != 0) { - print STDERR <<"TOTHIER"; + print STDERR <<"TOTHIER"; The script could not proceed because it could not acquire the needed lock on file $LOCKFILE. TOTHIER - exit 1; + exit 1; } $SIG{QUIT} = \&termination_signal_handler; $SIG{HUP} = \&termination_signal_handler; @@ -153,12 +153,12 @@ sub install_packages() { # option instead of --exclude=.svn # -- Laurent Rineau, 2009/12/04 (idea by Sylvain Pion) 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, "-C", "$package_name", "."); foreach( @command ) { - print "$_ "; + print "$_ "; } print "\n"; system(@command); @@ -186,15 +186,15 @@ sub install_packages() { my $filename = $_->name(); if( ! $_->is_dir() ) { - if(exists($files{$_->name()})) + if(exists($files{$_->name()})) { - print LOG_CONFLICTS "File ", $_->name(), " from package ", $package_name; - print LOG_CONFLICTS " conflicts with one from package ", $files{$_->name()}. "\n"; - } - else - { - $files{$_->name()} = $package_name; - } + print LOG_CONFLICTS "File ", $_->name(), " from package ", $package_name; + print LOG_CONFLICTS " conflicts with one from package ", $files{$_->name()}. "\n"; + } + else + { + $files{$_->name()} = $package_name; + } } else { # is_dir() returned true next if ($filename !~ /^\.\/?$/) and ($filename =~ /^\.\.?\/?$/); @@ -323,10 +323,10 @@ sub CreateExampleTestDirs() chdir 'examples' or return; print "Creating $VERSION/test/example directories ...\n"; foreach $DIR (glob("*")) { - if ( -d $DIR ) { - print "Creating test/${DIR}_Examples ...\n"; - dircopy("$DIR", "../test/${DIR}_Examples"); - } + if ( -d $DIR ) { + print "Creating test/${DIR}_Examples ...\n"; + dircopy("$DIR", "../test/${DIR}_Examples"); + } } chdir '..'; } @@ -343,16 +343,16 @@ sub CreateDemoTestDirs() chdir 'demo' or return; print "Creating $VERSION/test/demo directories ...\n"; foreach $DIR (glob("*")) { - if ( -d $DIR) { - if( ("$DIR" ne "icons") && ("$DIR" ne "resources") ) { - print "Creating test/${DIR}_Demo ...\n"; - dircopy("$DIR", "../test/${DIR}_Demo"); - } - else { - print "Creating test/${DIR}...\n"; - dircopy("$DIR", "../test/${DIR}"); - } - } + if ( -d $DIR) { + if( ("$DIR" ne "icons") && ("$DIR" ne "resources") ) { + print "Creating test/${DIR}_Demo ...\n"; + dircopy("$DIR", "../test/${DIR}_Demo"); + } + else { + print "Creating test/${DIR}...\n"; + dircopy("$DIR", "../test/${DIR}"); + } + } } chdir '..'; } @@ -371,38 +371,38 @@ sub make_testscripts() chdir 'test'; foreach $DIR (glob("*")) { - if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") ) { - chdir $DIR; - if ( -f 'Makefile') { - rename 'Makefile', 'makefile'; - } - if ( -f 'makefile' ) { + if ( (-d $DIR) && ("$DIR" ne "icons") && ("$DIR" ne "resources") ) { + chdir $DIR; + if ( -f 'Makefile') { + rename 'Makefile', 'makefile'; + } + if ( -f 'makefile' ) { open MAKEFILE, "makefile"; open NEW_MAKEFILE, ">makefile.new"; - while () { - s/\.o\b/\$(OBJ_EXT)/g; - s/-g\b/\$(DEBUG_OPT)/g; - print NEW_MAKEFILE $_; - } - close NEW_MAKEFILE; - close MAKEFILE; - rename("makefile.new","makefile"); - } else { + while () { + s/\.o\b/\$(OBJ_EXT)/g; + s/-g\b/\$(DEBUG_OPT)/g; + print NEW_MAKEFILE $_; + } + close NEW_MAKEFILE; + close MAKEFILE; + rename("makefile.new","makefile"); + } else { my $options = '-t'; - if ( -f 'cgal_create_makefile_options') { - if (open(OPTIONS, "; - chomp; - if (/^[\w\s-]+$/) { $options = $_; - } else { - print STDERR "Rejected cgal_create_makefile_options in $DIR\n"; - } - close OPTIONS; - } - } - system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed"; - } - if ( ! -f 'cgal_test' ) { + if ( -f 'cgal_create_makefile_options') { + if (open(OPTIONS, "; + chomp; + if (/^[\w\s-]+$/) { $options = $_; + } else { + print STDERR "Rejected cgal_create_makefile_options in $DIR\n"; + } + close OPTIONS; + } + } + system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed"; + } + if ( ! -f 'cgal_test' ) { $_ = $DIR; # chomp; if (/_Demo$/) { @@ -410,48 +410,48 @@ sub make_testscripts() } else { system("$DEVELSCRIPTSDIR/create_cgal_test") == 0 or die "Execution of $DEVELSCRIPTSDIR/create_cgal_test failed"; } - } - chdir '..'; - } + } + chdir '..'; + } } chdir $BASEDIR; chdir 'examples'; print "Creating makefiles in examples\n"; foreach $DIR (glob("*")) { - if ( -d $DIR ) { - chdir $DIR; - if ( -f 'Makefile') { - rename 'Makefile', 'makefile'; - } - if ( -f 'makefile' ) { + if ( -d $DIR ) { + chdir $DIR; + if ( -f 'Makefile') { + rename 'Makefile', 'makefile'; + } + if ( -f 'makefile' ) { open MAKEFILE, "makefile"; open NEW_MAKEFILE, ">makefile.new"; - while () { - s/\.o\b/\$(OBJ_EXT)/g; - s/-g\b/\$(DEBUG_OPT)/g; - print NEW_MAKEFILE $_; - } - close NEW_MAKEFILE; - close MAKEFILE; - rename("makefile.new","makefile"); - } else { + while () { + s/\.o\b/\$(OBJ_EXT)/g; + s/-g\b/\$(DEBUG_OPT)/g; + print NEW_MAKEFILE $_; + } + close NEW_MAKEFILE; + close MAKEFILE; + rename("makefile.new","makefile"); + } else { my $options = '-d'; - if ( -f 'cgal_create_makefile_options') { - if (open(OPTIONS, "; - chomp; - if (/^[\w\s-]+$/) { $options = $_; - } else { - print STDERR "Rejected cgal_create_makefile_options in $DIR\n"; - } - close OPTIONS; - } - } - system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed"; - } - chdir '..'; - } + if ( -f 'cgal_create_makefile_options') { + if (open(OPTIONS, "; + chomp; + if (/^[\w\s-]+$/) { $options = $_; + } else { + print STDERR "Rejected cgal_create_makefile_options in $DIR\n"; + } + close OPTIONS; + } + } + system("$SCRIPTSDIR/cgal_create_makefile", $options) == 0 or die "Execution of $SCRIPTSDIR/cgal_create_makefile failed"; + } + chdir '..'; + } } chdir $BASEDIR; } diff --git a/Scripts/developer_scripts/create_new_release b/Scripts/developer_scripts/create_new_release index bb88cc894ed..e5f91c48877 100755 --- a/Scripts/developer_scripts/create_new_release +++ b/Scripts/developer_scripts/create_new_release @@ -301,10 +301,10 @@ if [ -n "$DO_PUBLIC" ]; then public_release_version="${public_release_version}-beta${BETA}" fi 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-} else - public_release_name="CGAL-${public_release_version}" + public_release_name="CGAL-${public_release_version}" fi 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) diff --git a/Scripts/developer_scripts/test_merge_of_branch b/Scripts/developer_scripts/test_merge_of_branch index 2b3d91ecd0b..64739b8cac6 100755 --- a/Scripts/developer_scripts/test_merge_of_branch +++ b/Scripts/developer_scripts/test_merge_of_branch @@ -14,7 +14,7 @@ fi git=git if hub --version 2> /dev/null > /dev/null; then case "$(hub --version)" in - *hub\ version*) git=hub;; + *hub\ version*) git=hub;; esac fi @@ -63,11 +63,11 @@ if [ -d build ] && \ cmake_output=$(cmake build 2>&1) cmake_exit_code=$? if [ "$cmake_exit_code" -ne 0 ]; then - echo 'CMake error:' - printf '%s\n' "${cmake_output}" - exit 1 + echo 'CMake error:' + printf '%s\n' "${cmake_output}" + exit 1 else - echo OK + echo OK fi else echo '.. Skip the CMake test (please configure a build/ CMake binary directory,'