Francois Gouget : testbot/WineRunTask: Always take a screenshot.
Alexandre Julliard
julliard at winehq.org
Wed Jun 28 11:34:22 CDT 2017
Module: tools
Branch: master
Commit: 36e720d046620ec65da53adf8ee1593b7bb3906a
URL: http://source.winehq.org/git/tools.git/?a=commit;h=36e720d046620ec65da53adf8ee1593b7bb3906a
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Wed Jun 28 09:49:04 2017 +0200
testbot/WineRunTask: Always take a screenshot.
Even if we were not able to send the test file. Maybe the screenshot
will show a helpful Windows error message like "network connection
lost".
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/bin/WineRunTask.pl | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 615d898..1663c10 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -64,7 +64,7 @@ sub TakeScreenshot($$)
my ($VM, $FullScreenshotFileName) = @_;
my ($ErrMessage, $ImageSize, $ImageBytes) = $VM->CaptureScreenImage();
- if (! defined($ErrMessage))
+ if (!defined $ErrMessage)
{
my $OldUMask = umask(002);
if (open(my $Screenshot, ">", $FullScreenshotFileName))
@@ -78,9 +78,9 @@ sub TakeScreenshot($$)
}
umask($OldUMask);
}
- else
+ elsif ($VM->IsPoweredOn())
{
- Error "Can't capture screenshot: $ErrMessage\n";
+ Error "Could not capture a screenshot: $ErrMessage\n";
}
}
@@ -222,6 +222,9 @@ sub WrapUpAndExit($;$$)
my ($Status, $TestFailures, $Retry) = @_;
my $NewVMStatus = $Status eq 'queued' ? 'offline' : 'dirty';
+ Debug(Elapsed($Start), " Taking a screenshot\n");
+ TakeScreenshot($VM, $FullScreenshotFileName);
+
my $Tries = $Task->TestFailures || 0;
if ($Retry)
{
@@ -755,10 +758,6 @@ elsif (!defined $TAError)
}
$TA->Disconnect();
-
-Debug(Elapsed($Start), " Taking a screenshot\n");
-TakeScreenshot($VM, $FullScreenshotFileName);
-
FatalTAError(undef, $TAError, $PossibleCrash) if (defined $TAError);
More information about the wine-cvs
mailing list