Enhance platform name handling in test result scripts

This commit is contained in:
Nicolas Saillant 2024-12-05 09:28:42 +01:00
parent bd8a26a720
commit 7232ad1e91
2 changed files with 9 additions and 4 deletions

View File

@ -161,7 +161,12 @@ sub collect_results_of_platform($)
if (open(PLATFORM_INFO, "results_${platform}.info")) {
my @info = <PLATFORM_INFO>;
chomp(@info);
$display_name = $info[-1] if ($info[-1] ne "-");
foreach my $line (@info) {
if ($line =~ /Platform_name:\s*(.*)/) {
$display_name = $1;
last;
}
}
close(PLATFORM_INFO);
}
open(TESTRESULT, $test_result) or return $platform_results;

View File

@ -51,7 +51,7 @@ 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,$OS,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE,$TPL,$PLATFORM_NAME) = ("-","-","-","OS:","-","-","-","-","-","-","-","-","no","TPL:","-");
my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$OS,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE,$TPL,$PLATFORM_NAME) = ("-","-","-","OS:","-","-","-","-","-","-","-","-","no","TPL:","Platform_name:");
my ($LDFLAGS,$CXXFLAGS) = ("", "");
while (! /^------/) {
if(/^\s*$/) {
@ -139,10 +139,10 @@ sub reformat_results($)
$TPL = "$TPL $1,";
}
if (/^CGAL_TEST_PLATFORM\s+(.*)$/) {
$PLATFORM_NAME = $1 if ($PLATFORM_NAME eq "-");
$PLATFORM_NAME = "$PLATFORM_NAME $1" if ($PLATFORM_NAME eq "Platform_name:");
}
if (/^CGAL_SUMMARY_NAME\s+(.*)$/) {
$PLATFORM_NAME = $1;
$PLATFORM_NAME = "$PLATFORM_NAME $1";
}
NEXT: if(! ($_= <PLATFORM_RESULTS>)) {
# should never happen!!