Francois Gouget : testbot: Avoid redirections with TestAgentd <= 1.6.

Alexandre Julliard julliard at winehq.org
Mon Oct 28 14:51:13 CDT 2019


Module: tools
Branch: master
Commit: ce95003589d481b4c989dc8ba72e5427d5ea5525
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=ce95003589d481b4c989dc8ba72e5427d5ea5525

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Oct 28 07:13:09 2019 +0100

testbot: Avoid redirections with TestAgentd <= 1.6.

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 6744952..0177e05 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");




More information about the wine-cvs mailing list