[1/2] testbot/bin: Always retrieve the task log file before taking a screenshot.
Francois Gouget
fgouget at codeweavers.com
Fri Oct 19 05:13:55 CDT 2012
This is in fact a workaround for a libvirt bug that causes the screen capture to fail randomly. We can do without a screenshot but not without the result log.
This also reduces code duplication a little bit.
---
testbot/bin/WineRunTask.pl | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 00e0c35..430c842 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -318,21 +318,18 @@ elsif ($Step->Type eq "suite")
$Script .= "cls\r\n";
$ErrMessage = $VM->RunScriptInGuestTimeout($Script, $Task->Timeout + 15);
+my $LogErrMessage = RetrieveLogFile $Job, $Step, $Task,
+ "C:\\winetest\\$RptFileName",
+ $FullLogFileName;
+TakeScreenshot $VM, $FullScreenshotFileName;
if (defined($ErrMessage))
{
- RetrieveLogFile $Job, $Step, $Task, "C:\\winetest\\$RptFileName",
- $FullLogFileName;
- TakeScreenshot $VM, $FullScreenshotFileName;
FatalError "Failure running script in VM: $ErrMessage\n",
$FullErrFileName, $Job, $Step, $Task;
}
-TakeScreenshot $VM, $FullScreenshotFileName;
-
-$ErrMessage = RetrieveLogFile $Job, $Step, $Task, "C:\\winetest\\$RptFileName",
- $FullLogFileName;
-if (defined($ErrMessage))
+if (defined($LogErrMessage))
{
- FatalError "Can't copy log from VM: $ErrMessage\n", $FullErrFileName,
+ FatalError "Can't copy log from VM: $LogErrMessage\n", $FullErrFileName,
$Job, $Step, $Task;
}
--
1.7.10.4
More information about the wine-patches
mailing list