Francois Gouget : testbot/lib: Assume the $MaxXxx configuration settings are always set.
Alexandre Julliard
julliard at winehq.org
Mon Oct 22 13:12:42 CDT 2012
Module: tools
Branch: master
Commit: 4760b1819cf9df6446ea5f20e1af5e19accaaa19
URL: http://source.winehq.org/git/tools.git/?a=commit;h=4760b1819cf9df6446ea5f20e1af5e19accaaa19
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Oct 22 12:10:26 2012 +0200
testbot/lib: Assume the $MaxXxx configuration settings are always set.
There is no reason to leave them undefined when insanely large values like 100 can be used instead.
---
testbot/lib/WineTestBot/Jobs.pm | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm
index 8ec9bb8..07a0685 100644
--- a/testbot/lib/WineTestBot/Jobs.pm
+++ b/testbot/lib/WineTestBot/Jobs.pm
@@ -464,7 +464,7 @@ sub ScheduleOnHost
{
my $VM = $HostVMs->GetItem($Task->VM->GetKey());
if ($VM->Status eq "idle" &&
- (! defined($MaxRunningVMs) || $RunningVMs < $MaxRunningVMs) &&
+ $RunningVMs < $MaxRunningVMs &&
$RevertingVMs == 0)
{
$VM->Status("running");
@@ -507,11 +507,11 @@ sub ScheduleOnHost
foreach $VMKey (@DirtyVMsByIndex)
{
my $VM = $HostVMs->GetItem($VMKey);
- if (! defined($MaxRevertingVMs) || $RevertingVMs < $MaxRevertingVMs)
+ if ($RevertingVMs < $MaxRevertingVMs)
{
if ($VM->Type eq "extra" || $VM->Type eq "retired")
{
- if (! defined($MaxExtraPoweredOnVms) || $PoweredOnExtraVMs < $MaxExtraPoweredOnVms)
+ if ($PoweredOnExtraVMs < $MaxExtraPoweredOnVms)
{
$VM->RunRevert();
$PoweredOnExtraVMs++;
@@ -529,7 +529,7 @@ sub ScheduleOnHost
{
my $VM = $HostVMs->GetItem($VMKey);
if (! defined($DirtyVMsBlockingJobs{$VMKey}) &&
- (! defined($MaxRevertingVMs) || $RevertingVMs < $MaxRevertingVMs) &&
+ $RevertingVMs < $MaxRevertingVMs &&
$VM->Status eq 'dirty' && $VM->Type ne "extra" &&
$VM->Type ne "retired")
{
More information about the wine-cvs
mailing list