Module: tools Branch: master Commit: 6be509ccd0a8a723591a9bded6d0c20424219ad1 URL: https://source.winehq.org/git/tools.git/?a=commit;h=6be509ccd0a8a723591a9bde...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Oct 24 00:11:22 2019 +0200
testbot/WineRunTask: Capture the cmd errors.
This can help diagnose why the test executable fails to run, such as when there is a side-by-side assembly issue.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/WineRunTask.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 1ee1c12..6744952 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -442,7 +442,7 @@ if (!$TA->SendFile($Step->GetFullFileName(), $FileName, 0))
my $Keepalive; my $Timeout = $Task->Timeout; -my $Script = "@echo off\r\nset WINETEST_DEBUG=" . $Step->DebugLevel . +my $Script = "set WINETEST_DEBUG=" . $Step->DebugLevel . "\r\n"; if ($Step->ReportSuccessfulTests) { @@ -508,7 +508,7 @@ if (!$TA->SendFileFromString($Script, "script.bat", $TestAgent::SENDFILE_EXE)) #
Debug(Elapsed($Start), " Starting the script\n"); -my $Pid = $TA->Run(["./script.bat"], 0); +my $Pid = $TA->Run(["./script.bat"], 0, undef, "Task.log", "Task.log"); if (!$Pid) { FatalTAError($TA, "Failed to start the test"); @@ -539,6 +539,12 @@ if (!defined $TA->Wait($Pid, $Timeout, $Keepalive)) } }
+Debug(Elapsed($Start), " Retrieving 'Task.log'\n"); +if (!$TA->GetFile("Task.log", "$TaskDir/log") and !defined $TAError) +{ + $TAError = "An error occurred while retrieving the task log: ". $TA->GetLastError(); +} + Debug(Elapsed($Start), " Retrieving the report file to '$RptFileName'\n"); if ($TA->GetFile($RptFileName, "$TaskDir/$RptFileName")) {