Francois Gouget : testbot/TestAgent: Trace the SendFile() and Run() flags and redirection options.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Apr 4 08:42:36 CDT 2016


Module: tools
Branch: master
Commit: 23eee2e2db7744f7a70df9e7dbb5c5dcb08fc085
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=23eee2e2db7744f7a70df9e7dbb5c5dcb08fc085

Author: Francois Gouget <fgouget at free.fr>
Date:   Mon Apr  4 12:29:21 2016 +0200

testbot/TestAgent: Trace the SendFile() and Run() flags and redirection options.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/TestAgent.pm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index 7f1fc24..55a1431 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -1079,7 +1079,7 @@ sub _SendStringOrFile($$$$$$)
 sub SendFile($$$;$)
 {
   my ($self, $LocalPathName, $ServerPathName, $Flags) = @_;
-  debug("SendFile $LocalPathName -> $self->{agenthost} $ServerPathName\n");
+  debug("SendFile '$LocalPathName' -> $self->{agenthost} '$ServerPathName' Flags=", $Flags || 0, "\n");
 
   if (open(my $fh, "<", $LocalPathName))
   {
@@ -1095,7 +1095,7 @@ sub SendFile($$$;$)
 sub SendFileFromString($$$;$)
 {
   my ($self, $Data, $ServerPathName, $Flags) = @_;
-  debug("SendFile String -> $self->{agenthost} $ServerPathName\n");
+  debug("SendFile String -> $self->{agenthost} '$ServerPathName' Flags=", $Flags || 0, "\n");
   return $self->_SendStringOrFile($Data, undef, undef, $ServerPathName, $Flags);
 }
 
@@ -1115,7 +1115,7 @@ sub _GetStringOrFile($$$)
 sub GetFile($$$)
 {
   my ($self, $ServerPathName, $LocalPathName) = @_;
-  debug("GetFile $self->{agenthost} $ServerPathName -> $LocalPathName\n");
+  debug("GetFile $self->{agenthost} '$ServerPathName' -> '$LocalPathName'\n");
 
   if (open(my $fh, ">", $LocalPathName))
   {
@@ -1131,7 +1131,7 @@ sub GetFile($$$)
 sub GetFileToString($$)
 {
   my ($self, $ServerPathName) = @_;
-  debug("GetFile $self->{agenthost} $ServerPathName -> String\n");
+  debug("GetFile $self->{agenthost} '$ServerPathName' -> String\n");
 
   return $self->_GetStringOrFile($ServerPathName, undef, undef);
 }
@@ -1145,6 +1145,12 @@ sub Run($$$;$$$)
 {
   my ($self, $Argv, $Flags, $ServerInPath, $ServerOutPath, $ServerErrPath) = @_;
   debug("Run $self->{agenthost} '", join("' '", @$Argv), "'\n");
+  if ($Flags or $ServerInPath or $ServerOutPath or $ServerErrPath)
+  {
+    debug("  Flags=", $Flags || 0, " In='", $ServerInPath || "",
+          "' Out='", $ServerOutPath || "", "' Err='", $ServerErrPath || "",
+          "'\n");
+  }
 
   if (!$self->_StartRPC($RPC_RUN) or
       !$self->_SendListSize('ArgC', 4 + @$Argv) or




More information about the wine-cvs mailing list