[PATCH] testbot: Show which VM is blocking the revert in _DumpHostVMs().

Francois Gouget fgouget at codeweavers.com
Thu Feb 22 21:39:46 CST 2018


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/Jobs.pm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm
index ae1e4ecde..3eba27bc2 100644
--- a/testbot/lib/WineTestBot/Jobs.pm
+++ b/testbot/lib/WineTestBot/Jobs.pm
@@ -1069,7 +1069,22 @@ sub _DumpHostVMs($$$$)
     $VM = $Sched->{VMs}->GetItem($VMKey);
     next if ($VM->GetHost() ne $HostKey);
 
-    push @VMInfo, join(":", "$VMKey(". $VM->Status .")", $NeededVMs->{$VMKey}->[0], $NeededVMs->{$VMKey}->[1], $NeededVMs->{$VMKey}->[2]);
+    my $NeededVM = $NeededVMs->{$VMKey};
+    my $Dep = "";
+    if ($NeededVM->[3])
+    {
+      foreach my $DepVM (@{$NeededVM->[3]})
+      {
+        if ($DepVM->Status !~ /^(?:reverting|sleeping|running)$/)
+        {
+          $Dep = ":". $DepVM->Name;
+          last;
+        }
+      }
+      $Dep .= "/". scalar(@{$NeededVM->[3]});
+    }
+    push @VMInfo, join(":", "$VMKey(". $VM->Status ."$Dep)",
+                       $NeededVM->[0], $NeededVM->[1], $NeededVM->[2]);
   }
   my $PrettyHost = ($PrettyHostNames ? $PrettyHostNames->{$HostKey} : "") ||
                    $HostKey;
-- 
2.16.1



More information about the wine-devel mailing list