Francois Gouget : testbot/SpecialJobs: Tweak GetWindowsTestVMs() to work the same for 32 and 64 bit.

Alexandre Julliard julliard at winehq.org
Thu Sep 26 12:53:44 CDT 2019


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Sep 26 13:34:47 2019 +0200

testbot/SpecialJobs: Tweak GetWindowsTestVMs() to work the same for 32 and 64 bit.

Also make it possible to retrieve all the enabled VMs, regardless of
their role like is possible with the other GetXxxVMs() functions.

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

---

 testbot/lib/WineTestBot/SpecialJobs.pm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/testbot/lib/WineTestBot/SpecialJobs.pm b/testbot/lib/WineTestBot/SpecialJobs.pm
index b0cb148..d709e48 100644
--- a/testbot/lib/WineTestBot/SpecialJobs.pm
+++ b/testbot/lib/WineTestBot/SpecialJobs.pm
@@ -113,21 +113,21 @@ sub GetWindowsTestVMs($$$)
   my ($VMKey, $Build, $BaseJob) = @_;
 
   my $VMs = CreateVMs();
-  $VMs->AddFilter("Name", [$VMKey]) if (defined $VMKey);
-  if ($Build eq "exe64")
+  $VMs->AddFilter("Type", $Build eq "exe32" ? ["win32", "win64"] : ["win64"]);
+  if (defined $VMKey)
   {
-    $VMs->AddFilter("Type", ["win64"]);
-    $VMs->AddFilter("Role", ["base", "winetest"]) if (!defined $VMKey);
+    $VMs->AddFilter("Name", [$VMKey]);
+    $VMs->FilterEnabledRole();
   }
-  elsif ($BaseJob eq "base")
+  elsif ($BaseJob)
   {
-    $VMs->AddFilter("Type", ["win32", "win64"]);
-    $VMs->AddFilter("Role", ["base"]) if (!defined $VMKey);
+    $VMs->AddFilter("Role", $BaseJob eq "base" ? ["base"] :
+                            $BaseJob eq "other" ? ["winetest"] :
+                            ["base", "winetest"]);
   }
   else
   {
-    $VMs->AddFilter("Type", ["win32", "win64"]);
-    $VMs->AddFilter("Role", ["winetest"]) if (!defined $VMKey);
+    $VMs->FilterEnabledRole();
   }
 
   my $SortedKeys = $VMs->SortKeysBySortOrder($VMs->GetKeys());




More information about the wine-cvs mailing list