Module: tools Branch: master Commit: 206b1f72fa92795c27944715b152e69dc3e3898f URL: http://source.winehq.org/git/tools.git/?a=commit;h=206b1f72fa92795c27944715b...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 18 19:24:58 2013 +0200
testbot/Engine: --kill-vms should also shut down idle VMs.
---
testbot/bin/Engine.pl | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
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)) {