[Tools] testbot: Let the WineRunTask script take screenshots.

Francois Gouget fgouget at free.fr
Sun Mar 20 01:35:22 CDT 2016


Taking a screenshot is a blocking operation that takes time. So it must not be done from the Engine. But taking screenshots from the task scripts is fine.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 testbot/bin/Engine.pl          | 5 ++++-
 testbot/lib/WineTestBot/VMs.pm | 3 ---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 75a8851..956f180 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -523,7 +523,10 @@ sub HandleGetScreenshot($)
     return "0Unknown VM $VMName";
   }
 
-  my ($ErrMessage, $ImageSize, $ImageBytes) = $VM->CaptureScreenImage();
+  # FIXME: Taking a screenshot leaks libvirt connections, takes a long time and
+  # blocks the Engine during the whole operation. So live screenshots are
+  # disabled for now.
+  my ($ErrMessage, $ImageSize, $ImageBytes) = ("Screenshotting has been disabled for the time being", undef, undef); #$VM->CaptureScreenImage();
   if (defined($ErrMessage))
   {
     LogMsg "Failed to take screenshot of $VMName: $ErrMessage\n";
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index 2400efc..c41b77a 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -432,9 +432,6 @@ sub CaptureScreenImage($)
 {
   my ($self) = @_;
 
-  # FIXME: Disable screenshots for now
-  return ("Screenshotting has been disabled for the time being", undef, undef);
-
   my ($ErrMessage, $Domain) = $self->_GetDomain();
   return ($ErrMessage, undef, undef) if (defined $ErrMessage);
 
-- 
2.7.0



More information about the wine-patches mailing list