Francois Gouget : testbot: Don' t check idle and off VMs on the Engine shutdown.

Alexandre Julliard julliard at winehq.org
Fri Nov 24 10:32:03 CST 2017


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Nov 24 09:59:13 2017 +0100

testbot: Don't check idle and off VMs on the Engine shutdown.

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

---

 testbot/bin/Engine.pl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 598d2bd..ad492f6 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -96,9 +96,9 @@ In all other cases the VM is powered off and marked as such.
 =back
 =cut
 
-sub Cleanup(;$$)
+sub Cleanup($;$$)
 {
-  my ($KillTasks, $KillVMs) = @_;
+  my ($Starting, $KillTasks, $KillVMs) = @_;
 
   # Verify that the running tasks are still alive and requeue them if not.
   # Ignore the Job and Step status fields because they may be a bit out of date.
@@ -128,7 +128,7 @@ sub Cleanup(;$$)
         }
         elsif ($KillTasks)
         {
-          # We will kill the Task's process so requeue the Task.
+          # We will kill the child process so requeue the Task.
           $Requeue = 1;
         }
         else
@@ -193,7 +193,7 @@ sub Cleanup(;$$)
       }
       # else let the process finish its work
     }
-    else
+    elsif ($Starting)
     {
       if ($VM->Status eq "idle")
       {
@@ -241,7 +241,7 @@ sub HandleShutdown($$)
     return "0Invalid KillVMs shutdown parameter\n";
   }
 
-  Cleanup($KillTasks, $KillVMs);
+  Cleanup(0, $KillTasks, $KillVMs);
   $RunEngine = 0;
 
   LogMsg "Waiting for the last clients to disconnect...\n";
@@ -715,7 +715,7 @@ sub main()
     LogMsg "Capping MaxRevertsWhileRunningVMs to MaxRevertingVMs ($MaxRevertsWhileRunningVMs)\n";
   }
   $MaxVMsWhenIdle ||= $MaxActiveVMs;
-  Cleanup();
+  Cleanup(1);
 
   # Check for patches that arrived while the server was off.
   HandleWinePatchMLSubmission();




More information about the wine-cvs mailing list