>From b8efcae21013251c16e5626ba36bf35ae51d13fc Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Mon, 30 Aug 2010 21:37:50 +0200 Subject: [PATCH 1/2] Turn mode into first-class, host-dependent criterion. * autobuild: In overall summary, also key off of mode for each build type. In all other summaries, also print the mode. --- autobuild | 134 +++++++++++++++++++++++++++++++++++------------------------- 1 files changed, 78 insertions(+), 56 deletions(-) diff --git a/autobuild b/autobuild index 7e71b4e..fc4f8f1 100755 --- a/autobuild +++ b/autobuild @@ -117,6 +117,8 @@ my (%Projects); my (%Revisions); my (%Hosttypes); my (%Hostnames); +my (%Hostmodes); +my (%Modes); foreach $arg (@ARGV) { my (@files); @@ -266,6 +268,8 @@ foreach $arg (@ARGV) { $Projects{$project} = 0; ${$Revisions{$project}}{$revision} = 0; ${$Hosttypes{$project}}{$hosttype} = 0; + ${$Hostmodes{$project}{$hosttype}}{$mode} = 0; + ${$Modes{$project}}{$mode} = 0; ${$Hostnames{$project}}{$hostname} = 0; } } @@ -274,7 +278,7 @@ exit 0 if $DryRun; delete $Projects{"unknown"} if $SkipUnknown; -my ($project, $revision, $hosttype, $hostname); +my ($project, $revision, $hosttype, $mode, $hostmode, $hostname); if (!$InlineHTML) { print "\n"; @@ -294,6 +298,7 @@ if (!$InlineHTML) { print "\n"; print "Project\n"; print "Build type\n"; + print "Mode\n"; print "Revision\n"; print "System\n"; print "Build date\n"; @@ -313,67 +318,78 @@ if (!$InlineHTML) { print "$project\n"; foreach $hosttype (sort keys %{$Hosttypes{$project}}) { - my %DoneType; + my $firstmode = 1; - if ($first) { - print "$hosttype"; - } else { - if ($bit) { - print "\n"; - } else { - print "\n"; - } - print "\n"; - print "$hosttype"; - $bit = !$bit; - } - $first = 0; - - foreach $file (reverse sort @Files) { - next unless $Project{$file} eq $project; - next unless $Hosttype{$file} eq $hosttype; - next unless !$DoneType{$hosttype}; - $DoneType{$hosttype} = 1; - - my ($Project); - my ($Revision); - my ($Mode); - my ($Hosttype); - my ($Buildtype); - my ($Hostname); - my ($Timestamp); - my ($Status); - - $Revision = $Revision{$file}; - $Mode = $Mode{$file}; - $Hostname = $Hostname{$file}; - $Buildtype = $Buildtype{$file}; - $Timestamp = $Timestamp{$file}; - $Status = $Status{$file}; - - if ($hosttype eq $Buildtype) { - print "\n"; + foreach $hostmode (sort keys %{$Hostmodes{$project}{$hosttype}}) { + my %DoneType; + + if ($first) { + print "$hosttype"; } else { - print " from $Buildtype\n"; + if ($bit) { + print "\n"; + } else { + print "\n"; + } + print "\n"; + if ($firstmode) { + print "$hosttype"; + } else { + print ""; + } + $bit = !$bit; } - print "$Revision\n"; - print "$Hostname\n"; - print "$Timestamp\n"; - print "\n"; - if ($Status eq "ok") { - print "Success\n"; - } elsif ($Status eq "almost") { - print "Almost\n"; - } elsif ($Status eq "built") { - print "Built\n"; - } else { - print "Failure\n"; + $first = 0; + $firstmode = 0; + + foreach $file (reverse sort @Files) { + next unless $Project{$file} eq $project; + next unless $Hosttype{$file} eq $hosttype; + next unless $Mode{$file} eq $hostmode; + next unless !$DoneType{$hosttype}{$hostmode}; + $DoneType{$hosttype}{$hostmode} = 1; + + my ($Project); + my ($Revision); + my ($Mode); + my ($Hosttype); + my ($Buildtype); + my ($Hostname); + my ($Timestamp); + my ($Status); + + $Revision = $Revision{$file}; + $Mode = $Mode{$file}; + $Hostname = $Hostname{$file}; + $Buildtype = $Buildtype{$file}; + $Timestamp = $Timestamp{$file}; + $Status = $Status{$file}; + + if ($hosttype eq $Buildtype) { + print "\n"; + } else { + print " from $Buildtype\n"; + } + print "$Mode\n"; + print "$Revision\n"; + print "$Hostname\n"; + print "$Timestamp\n"; + print "\n"; + if ($Status eq "ok") { + print "Success\n"; + } elsif ($Status eq "almost") { + print "Almost\n"; + } elsif ($Status eq "built") { + print "Built\n"; + } else { + print "Failure\n"; + } + print "\n"; + print ""; + print "\n"; } - print "\n"; - print ""; print "\n"; } - print "\n"; } } print "\n"; @@ -409,6 +425,7 @@ foreach $project (sort keys %Projects) { print "\n"; print "\n"; print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; @@ -447,6 +464,7 @@ foreach $project (sort keys %Projects) { } else { print " from $Buildtype\n"; } + print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; @@ -518,6 +537,7 @@ foreach $project (sort keys %Projects) { } else { print "$hosttype from $Buildtype\n"; } + print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; @@ -588,6 +609,7 @@ foreach $project (sort keys %Projects) { } else { print " from $Buildtype\n"; } + print "\n"; print "\n"; print "
SystemModeBuild hostBuild dateResults$Mode$Hostname$Timestamp\n"; @@ -479,6 +497,7 @@ foreach $project (sort keys %Projects) { print "
RevisionCross?ModeBuild hostBuild dateResults$Mode$Hostname$Timestamp\n"; @@ -550,6 +570,7 @@ foreach $project (sort keys %Projects) { print "
VersionSystemModeBuild dateResults
$Mode$Timestamp\n"; if ($Status eq "ok") { -- 1.7.2.1.222.g9988