[PATCH] 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(a)codeweavers.com> --- 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 b0cb1480d..d709e48f7 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()); -- 2.20.1
participants (1)
-
Francois Gouget