[PATCH 4/4] testbot/web: Allow sumitting jobs to verify patches compile on Wine.

Francois Gouget fgouget at codeweavers.com
Thu Jun 21 08:02:41 CDT 2018


For now the Wine VMs are unchecked by default since all they do is a
compilation check which is mostly redundant with the regular build step.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/web/Submit.pl | 43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index afebc722b..9fa252a11 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -244,10 +244,14 @@ sub GenerateFields($)
       {
           $VMs->AddFilter("Type", ["win64"]);
       }
-      else
+      elsif ($self->{FileType} eq "exe32")
       {
           $VMs->AddFilter("Type", ["win32", "win64"]);
       }
+      else
+      {
+          $VMs->AddFilter("Type", ["win32", "win64", "wine"]);
+      }
       if ($self->{ShowAll})
       {
         # All but the retired and deleted ones
@@ -272,6 +276,10 @@ sub GenerateFields($)
           $Status = " [". $VM->Status ."]";
           $Checked = undef;
         }
+        elsif ($VM->Type eq "wine")
+        {
+          $Checked = undef;
+        }
         if ($Checked and
             ($self->GetParam("Page") == 1 || $self->GetParam($FieldName)))
         {
@@ -844,6 +852,39 @@ sub OnSubmit($)
     }
   }
 
+  if ($FileType eq "patchdlls")
+  {
+    my $Tasks;
+    my $VMs = CreateVMs();
+    $VMs->AddFilter("Type", ["wine"]);
+    my $SortedKeys = $VMs->SortKeysBySortOrder($VMs->GetKeys());
+    foreach my $VMKey (@$SortedKeys)
+    {
+      my $VM = $VMs->GetItem($VMKey);
+      my $FieldName = "vm_" . $self->CGI->escapeHTML($VMKey);
+      next if (!$self->GetParam($FieldName)); # skip unselected VMs
+
+      if (!$Tasks)
+      {
+        # First create the Wine test step
+        my $WineStep = $Steps->Add();
+        $WineStep->FileName($BaseName);
+        $WineStep->FileType($FileType);
+        $WineStep->InStaging(!1);
+        $WineStep->Type("build");
+        $WineStep->DebugLevel($self->GetParam("DebugLevel"));
+        $WineStep->ReportSuccessfulTests(defined($self->GetParam("ReportSuccessfulTests")));
+        $Tasks = $WineStep->Tasks;
+      }
+
+      # Then add a task for this VM
+      my $Task = $Tasks->Add();
+      $Task->VM($VM);
+      $Task->CmdLineArg("win32");
+      $Task->Timeout($WineReconfigTimeout);
+    }
+  }
+
   # Now save it all (or whatever's left to save)
   my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
   if (defined($ErrMessage))
-- 
2.17.1



More information about the wine-devel mailing list