diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index 10ae0f9655b..ea3cf1ec266 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -299,38 +299,30 @@ EOF } } - -sub get_platform_operating_system($) { - my ($platform) = @_; - my $long_name = ""; +sub sort_pf { + my $platform_a = $a; + my $platform_b = $b; + my $platform = $platform_a; foreach (@available_platforms) { - if (short_pfname($_) eq $platform) { - $long_name = $_; + if (short_pfname($_) eq $a) { + $platform = $_; last; } } - if (open(PLATFORM_INFO, "results_${long_name}.info")) { - while (my $line = ) { - chomp($line); - if ($line =~ /OS:\s*(.*?)$/) { - my $os = $1; - $os =~ s/"//g; - close(PLATFORM_INFO); - return $os; - } + $platform_a = $platform; + $platform_b = $b; + foreach (@available_platforms) { + if (short_pfname($_) eq $b) { + $platform = $_; + last; } - close(PLATFORM_INFO); } - return ""; -} - -sub sort_pf { - my $os_a = get_platform_operating_system($a); - my $os_b = get_platform_operating_system($b); - if ($os_a ne $os_b) { - return $os_a cmp $os_b; - } - return $a cmp $b; + $platform_b = $platform; + my $os_a = $platforms_info{$platform_a}->{operating_system} // ''; + my $os_b = $platforms_info{$platform_b}->{operating_system} // ''; + $os_a =~ s/"//g; + $os_b =~ s/"//g; + return $os_a cmp $os_b; } sub parse_platform($) @@ -380,7 +372,6 @@ sub choose_platforms() { my (%platform_index, $pf); # List all platforms for which there are results - @available_platforms = list_platforms(); my $index = 0; # Put all known platforms in a hash table. for ($index=0; $index < @known_platforms; $index += 1) { @@ -405,7 +396,7 @@ sub choose_platforms() # Make a list of all the platforms that are to be treated, in the order they # appear in the list of known_platforms. @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) { $pf = $known_platforms[$index]; my $ind2 = 0; @@ -418,37 +409,8 @@ sub choose_platforms() } } -sub print_platform_descriptions() -{ - print OUTPUT <<'EOF'; - -

Platform Description and Summary

- - - - - - - - - - - - - - - - - - - - - - - -EOF - my ($platform_num, $pf)=(0); - foreach $pf (@platforms_to_do) { +sub read_platform_info { + foreach my $pf (@available_platforms) { my $platform_info; if (open (PLATFORM_JSON, "{third_party_libs} = \@tpl_list; $platforms_info{$pf} = $platform_info; } + $platform_is_64bits{$pf} = ! ($pf =~ m/32/); + $platform_is_optimized{$pf} = ($platform_info->{CXXFLAGS} =~ m|([-/]x?O[1-9])|); + } +} + +sub print_platform_descriptions() +{ + print OUTPUT <<'EOF'; + +

Platform Description and Summary

+ +
Platform NameCompilerOperating SystemTesterytwonrDEBUG?CMakeBOOSTMPFRGMPQTLEDACXXFLAGSLDFLAGS
+ + + + + + + + + + + + + + + + + + + + + +EOF + my $platform_num = 0; + foreach my $pf (@platforms_to_do) { + my $platform_info = $platforms_info{$pf}; my $pf_num_plus_one = $platform_num + 1; - # my $pf_short = join('_',parse_platform_2($pf)); - (my $pf_short) = ($pf =~ m/_(.*)/); - ($platform_is_64bits{$pf}) = ! ($pf =~ m/32/); - ($platform_is_optimized{$pf}) = ($platform_info->{CXXFLAGS} =~ m|([-/]x?O[1-9])|); my $county = $testresults[$platform_num]->{"y"}; my $countt = $testresults[$platform_num]->{"t"}; my $countw = $testresults[$platform_num]->{"w"}; @@ -662,6 +657,8 @@ sub main() # init_known_platforms(); chdir $testresult_dir or die; chdir $release_name or die; + @available_platforms = list_platforms(); + read_platform_info(); choose_platforms(); chdir "..";
Platform NameCompilerOperating SystemTesterytwonrDEBUG?CMakeBOOSTMPFRGMPQTLEDACXXFLAGSLDFLAGS