testbot/Engine: --kill-vms should also shut down idle VMs.

Francois Gouget fgouget at codeweavers.com
Thu Apr 18 12:24:58 CDT 2013


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

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 670945a..2438298 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -180,11 +180,15 @@ sub Cleanup(;$$)
 
     if ($VM->IsPoweredOn())
     {
-      next if ($VM->Status eq "idle");
       if ($KillVMs)
       {
         kill("TERM", $VM->ChildPid) if (defined $VM->ChildPid);
       }
+      elsif ($VM->Status eq "idle")
+      {
+        # Assume these are still ready for use
+        next;
+      }
       elsif (($VM->Status eq "reverting" or $VM->Status eq "sleeping") and
              defined $VM->ChildPid and kill(0, $VM->ChildPid))
       {
-- 
1.7.10.4



More information about the wine-patches mailing list