Francois Gouget : testbot/TestAgent: Return the server command line in the properties.

Alexandre Julliard julliard at winehq.org
Wed Sep 18 15:41:28 CDT 2019


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Sep 18 10:08:14 2019 +0200

testbot/TestAgent: Return the server command line in the properties.

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

---

 testbot/lib/WineTestBot/TestAgent.pm |  2 +-
 testbot/src/testagentd/testagentd.c  | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index d3d7137..d31fea3 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -1261,7 +1261,7 @@ sub GetProperties($;$)
       my $Property = $self->_RecvRawString("Prop$i.s", $Size);
       return undef if (!defined $Property);
       debug("  RecvProperty() -> '$Property'\n");
-      if ($Property =~ s/^([a-zA-Z0-9.]+)=//)
+      if ($Property =~ s/^([a-zA-Z0-9.]+(?:\[[0-9]+\])?)=//)
       {
         $Properties->{$1} = $Property;
       }
diff --git a/testbot/src/testagentd/testagentd.c b/testbot/src/testagentd/testagentd.c
index fbc26ab..5fd1367 100644
--- a/testbot/src/testagentd/testagentd.c
+++ b/testbot/src/testagentd/testagentd.c
@@ -44,6 +44,7 @@
 
 #define BLOCK_SIZE       65536
 
+static int server_argc;
 static char** server_argv;
 static const char *name0;
 static int opt_debug = 0;
@@ -1006,18 +1007,26 @@ static void do_getproperties(SOCKET client)
 {
     const char* arch;
     char* buf = NULL;
-    int size = 0;
+    int i, size = 0;
 
     if (!expect_list_size(client, 0))
     {
         send_error(client);
         return;
     }
-    send_list_size(client, 3);
+    send_list_size(client, server_argc + 4);
 
     format_msg(&buf, &size, "protocol.version=%s", PROTOCOL_VERSION);
     send_string(client, buf);
 
+    format_msg(&buf, &size, "server.argc=%d", server_argc);
+    send_string(client, buf);
+    for (i = 0; i < server_argc; i++)
+    {
+        format_msg(&buf, &size, "server.argv[%d]=%s", i, server_argv[i]);
+        send_string(client, buf);
+    }
+
 #ifdef WIN32
     arch = "win32";
 #else
@@ -1342,6 +1351,7 @@ int main(int argc, char** argv)
     SOCKET master;
     int on = 1;
 
+    server_argc = argc;
     server_argv = argv;
     name0 = p = argv[0];
     while (*p != '\0')




More information about the wine-cvs mailing list