Francois Gouget : testbot/web: Show the mission in the arguments column for Wine VMs.

Alexandre Julliard julliard at winehq.org
Mon Dec 10 12:54:06 CST 2018


Module: tools
Branch: master
Commit: a4ac0056c300d74993071af9f7af1e3958f4bb3c
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=a4ac0056c300d74993071af9f7af1e3958f4bb3c

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Dec 10 16:48:25 2018 +0100

testbot/web: Show the mission in the arguments column for Wine VMs.

When handling a patch Wine VMs don't take arguments except for the
mission which specifies what they should do. Also a Wine VM may run
multiple tasks only differing in their mission. So this helps
identify what each task does.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/web/JobDetails.pl   | 25 ++++++++++++++++++++++++-
 testbot/web/WineTestBot.css | 12 ++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 84b9e37..3e4f94d 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -32,6 +32,7 @@ use URI::Escape;
 use WineTestBot::Config;
 use WineTestBot::Jobs;
 use WineTestBot::LogUtils;
+use WineTestBot::Missions;
 use WineTestBot::StepsTasks;
 use WineTestBot::Utils;
 use WineTestBot::Engine::Notify;
@@ -92,7 +93,11 @@ sub GenerateHeaderCell($$$)
   my ($self, $CollectionBlock, $PropertyDescriptor) = @_;
 
   my $PropertyName = $PropertyDescriptor->GetName();
-  if ($PropertyName eq "Ended")
+  if ($PropertyName eq "CmdLineArg")
+  {
+    print "<th>Arguments / <span class='MissionHeader'>Missions</span></th>\n";
+  }
+  elsif ($PropertyName eq "Ended")
   {
     print "<th><a class='title' title='Execution ended'>Time</a></th>\n";
   }
@@ -589,6 +594,24 @@ sub GenerateDataCell($$$$$)
       $self->SUPER::GenerateDataCell($CollectionBlock, $StepTask, $PropertyDescriptor, $DetailsPage);
     }
   }
+  elsif ($PropertyName eq "CmdLineArg")
+  {
+    my $Args = $self->escapeHTML($StepTask->CmdLineArg);
+    if ($Args eq "" or $StepTask->VM->Type eq "wine")
+    {
+      $Args .= "<br>" if ($Args ne "");
+      my ($ErrMessage, $Missions) = ParseMissionStatement($StepTask->Missions);
+      if (defined $ErrMessage)
+      {
+        $Args .= "<span class='Mission'>$ErrMessage</span>";
+      }
+      else
+      {
+        $Args .= "<span class='Mission'>". $self->escapeHTML(GetTaskMissionDescription($Missions->[0], $StepTask->VM->Type)) ."</span>";
+      }
+    }
+    print "<td>$Args</td>\n";
+  }
   elsif ($PropertyName eq "Ended")
   {
     if (defined $StepTask->Ended)
diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css
index df683f8..1456036 100644
--- a/testbot/web/WineTestBot.css
+++ b/testbot/web/WineTestBot.css
@@ -290,6 +290,18 @@ h2
   font-style: italic;
 }
 
+.MissionHeader
+{
+  font-size: small;
+  font-style: italic;
+}
+
+.Mission
+{
+  font-size: small;
+  font-style: italic;
+  color: navy;
+}
 
 .Screenshot
 {




More information about the wine-cvs mailing list