# HG changeset patch # User Dario Sestito # Date 1265299623 0 # Node ID e88616591730a09113db9969a48bd51246aa76ac # Parent 3a6ebfddb7fee41542658cfa7f27234d1db7160c Make index.html report on all packages, including the ones built successfully. Make the list of packages be alphabetically sorted diff -r 3a6ebfddb7fe -r e88616591730 common/tools/raptor/RaptorRecipe.pm --- a/common/tools/raptor/RaptorRecipe.pm Thu Feb 04 14:09:19 2010 +0000 +++ b/common/tools/raptor/RaptorRecipe.pm Thu Feb 04 16:07:03 2010 +0000 @@ -205,6 +205,8 @@ sub on_end_buildlog_recipe { + $::allbldinfs->{$recipe_info->{bldinf}} = 1; + if ($recipe_info->{exit} =~ /failed/) { # normalize bldinf path diff -r 3a6ebfddb7fe -r e88616591730 common/tools/raptor/uh.pl --- a/common/tools/raptor/uh.pl Thu Feb 04 14:09:19 2010 +0000 +++ b/common/tools/raptor/uh.pl Thu Feb 04 16:07:03 2010 +0000 @@ -72,6 +72,8 @@ $saxhandler->add_observer('RaptorUnreciped', $RaptorUnreciped::reset_status); $saxhandler->add_observer('RaptorRecipe', $RaptorRecipe::reset_status); +our $allbldinfs = {}; + my $parser = XML::SAX::ParserFactory->parser(Handler=>$saxhandler); for (@logfiles) { @@ -80,6 +82,8 @@ $parser->parse_uri($_); } +my @allpackages = distinct_packages($allbldinfs); + print "Generating HTML...\n"; system("rd /S /Q $outputdir") if (-d $outputdir); @@ -223,27 +227,37 @@ print AGGREGATED "\n"; print AGGREGATED "
\n"; -print AGGREGATED "
PACKGE-SPECIFIC FAILURES
\n"; +print AGGREGATED "
PACKAGE-SPECIFIC FAILURES
\n"; print AGGREGATED "\n"; $tableheader = ""; for (@severities) { $tableheader .= ""; } $tableheader .= ""; print AGGREGATED "$tableheader\n"; -for my $package (keys %{$recipe_failures_num_by_severity}) +for my $package (@allpackages) { - print_package_specific_summary($package, $recipe_failures_by_package_severity->{$package}); - my $packagesummaryhtml = $package; - $packagesummaryhtml =~ s,/,_,; - $packagesummaryhtml .= ".html"; - my $packageline = ""; - for (@severities) + if (defined $recipe_failures_num_by_severity->{$package}) { - my $failuresbyseverity = 0; - $failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_}); - $packageline .= ""; + print_package_specific_summary($package, $recipe_failures_by_package_severity->{$package}); + my $packagesummaryhtml = $package; + $packagesummaryhtml =~ s,/,_,; + $packagesummaryhtml .= ".html"; + my $packageline = ""; + for (@severities) + { + my $failuresbyseverity = 0; + $failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_}); + $packageline .= ""; + } + $packageline .= ""; + print AGGREGATED "$packageline\n"; } - $packageline .= ""; - print AGGREGATED "$packageline\n"; + else + { + my $packageline = ""; + for (@severities) { $packageline .= ""; } + $packageline .= ""; + print AGGREGATED "$packageline\n"; + } } print AGGREGATED "
package$_
$package$failuresbyseverity
$package$failuresbyseverity
$package0
\n"; close(AGGREGATED); @@ -357,4 +371,33 @@ print FILE $filecontent; close(FILE); } +} + +sub distinct_packages +{ + my ($allbldinfs) = @_; + + my $allpackages = {}; + + for my $bldinf (keys %{$allbldinfs}) + { + # normalize bldinf path + $bldinf = lc($bldinf); + $bldinf =~ s,^[A-Za-z]:,,; + $bldinf =~ s,[\\],/,g; + + my $package = ''; + if ($bldinf =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),) + { + $package = $1; + } + else + { + print "WARNING: can't understand bldinf attribute of recipe: $bldinf. Won't dump to failed recipes file.\n"; + } + + $allpackages->{$package} = 1; + } + + return sort {$a cmp $b} keys %{$allpackages}; } \ No newline at end of file