The VM type does not indicate if the Step will update and rebuild Wine or run WineTest. Using the Step type instead is more accurate. Using the Step type also simplifies GetTaskMissionDescription() a bit.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Missions.pm | 38 ++++++++++++++--------------- testbot/web/JobDetails.pl | 2 +- 2 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/testbot/lib/WineTestBot/Missions.pm b/testbot/lib/WineTestBot/Missions.pm index 93cd7872..65d8d82d 100644 --- a/testbot/lib/WineTestBot/Missions.pm +++ b/testbot/lib/WineTestBot/Missions.pm @@ -104,7 +104,7 @@ sub GetMissionBaseName($)
sub GetTaskMissionDescription($$) { - my ($TaskMission, $VMType) = @_; + my ($TaskMission, $StepType) = @_;
my $Builds = $TaskMission->{Builds}; my $Description = @@ -117,29 +117,27 @@ sub GetTaskMissionDescription($$) $Builds->{wow32} ? "32 bit WoW" : "64 bit WoW";
- if ($Builds->{exe32} or $Builds->{exe64}) + my $Lang; + foreach my $Mission (@{$TaskMission->{Missions}}) { - $Description .= ($VMType eq "build") ? " build" : " executable"; - } - else - { - my $Lang; - foreach my $Mission (@{$TaskMission->{Missions}}) + if (!defined $Lang) { - if (!defined $Lang) - { - $Lang = $Mission->{lang} || ""; - } - elsif ($Lang ne ($Mission->{lang} || "")) - { - $Description .= " + Locales"; - $Lang = undef; - last; - } + $Lang = $Mission->{lang} || ""; + } + elsif ($Lang ne ($Mission->{lang} || "")) + { + $Description .= " + Locales"; + $Lang = undef; + last; } - $Description .= " ". LocaleName($Lang) if ($Lang); - $Description .= " tests"; } + $Description .= " ". LocaleName($Lang) if ($Lang); + + $Description .= + ($StepType eq "reconfig") ? " update" : + ($StepType eq "build") ? " build" : + ($StepType eq "suite") ? " WineTest" : + " tests";
return $Description; } diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 3e4f94d0..8d878805 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -607,7 +607,7 @@ sub GenerateDataCell($$$$$) } else { - $Args .= "<span class='Mission'>". $self->escapeHTML(GetTaskMissionDescription($Missions->[0], $StepTask->VM->Type)) ."</span>"; + $Args .= "<span class='Mission'>". $self->escapeHTML(GetTaskMissionDescription($Missions->[0], $StepTask->Type)) ."</span>"; } } print "<td>$Args</td>\n";