Module: tools Branch: master Commit: 4e611a7ed3c87eb9a243007c5b02d8a7c67a4572 URL: http://source.winehq.org/git/tools.git/?a=commit;h=4e611a7ed3c87eb9a243007c5... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Oct 19 12:13:55 2012 +0200 testbot/bin: Always retrieve the task log file before taking a screenshot. 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 files 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; }