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 ---
There are still 4 VMs that run TestAgentd 1.6 where the stdout / stderr redirection is buggy (wvista, wvistau64, w7u, w8). They are all on the "restore from backup and investigate list" already. Until that's done they will not get the cmd log but that's no worse than it is now.
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 d43c8d153..c862ddd81 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -455,7 +455,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) { @@ -521,7 +521,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"); @@ -552,6 +552,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")) {