Before 1.7 handling redirections was broken and in fact broke TestAgentd itself. So don't redirect the batch file stdout and stderr for these old versions.
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
I thought TestAgentd <= 1.6 was just not doing the redirections but it also loses the client connections. The telltale sign is this error:
unable to open 'exe32.report' for reading: No such file or directory
This check will avoid the error until all VMs have been upgraded. I also downgraded the role of the impacted VMs (only w7u and vista afaict) to extra so we don't run the wine-patches tasks on them until this patch / workaround is in.
testbot/bin/WineRunTask.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 674495222..0177e05ed 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -508,7 +508,8 @@ if (!$TA->SendFileFromString($Script, "script.bat", $TestAgent::SENDFILE_EXE)) #
Debug(Elapsed($Start), " Starting the script\n"); -my $Pid = $TA->Run(["./script.bat"], 0, undef, "Task.log", "Task.log"); +my $TaskLog = $TA->HasMinVersion(1, 7) ? "Task.log" : undef; +my $Pid = $TA->Run(["./script.bat"], 0, undef, $TaskLog, $TaskLog); if (!$Pid) { FatalTAError($TA, "Failed to start the test"); @@ -539,10 +540,13 @@ if (!defined $TA->Wait($Pid, $Timeout, $Keepalive)) } }
-Debug(Elapsed($Start), " Retrieving 'Task.log'\n"); -if (!$TA->GetFile("Task.log", "$TaskDir/log") and !defined $TAError) +if (defined $TaskLog) { - $TAError = "An error occurred while retrieving the task log: ". $TA->GetLastError(); + Debug(Elapsed($Start), " Retrieving 'Task.log'\n"); + if (!$TA->GetFile($TaskLog, "$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");