Francois Gouget : testbot/TestAgent: Change the protocol and API for increased flexibility.

Alexandre Julliard julliard at winehq.org
Wed Dec 5 13:20:22 CST 2012


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Dec  5 05:37:34 2012 +0100

testbot/TestAgent: Change the protocol and API for increased flexibility.

The old protocol relied on being able to close the sending side of the
connection to signal the end of the request, and then iusing the other
side to read the reply. However this is not always feasible,
especially when adding support for tunneling. Also it makes it
impossible to use a single connection for multiple requests.  In the
new protocol each request is composed of an RPC id, an argument count,
and for each argument its type, size and then data. So the other side
always knows exactly how much to read and thus a given connection can
be used for multiple RPCs.  The Perl TestAgent API is now
object-oriented which makes connection reuse simple.  The set of
operations provided by the Perl TestAgent module has also been changed
to be more flexible. In particular, where RunScript() was duplicating
the functionality of SendFile(), we now have Run(), Wait() and Rm()
which each perform a single function.  This change also unburdens the
TestAgent server from the selection of temporary filenames, and
eliminates a hard-coded path.  The internal client and server APIs
have also been tweaked to make sending and receiving the RPCs and
their replies easier.

---

 testbot/lib/WineTestBot/TestAgent.pm      | 1020 ++++++++++++++++++++++++-----
 testbot/lib/WineTestBot/VMs.pm            |   31 +-
 testbot/scripts/TestAgent                 |  194 +++++--
 testbot/src/testagentd/Makefile           |    5 +-
 testbot/src/testagentd/list.h             |  232 +++++++
 testbot/src/testagentd/platform.h         |   54 ++-
 testbot/src/testagentd/platform_unix.c    |  157 +++--
 testbot/src/testagentd/platform_windows.c |  214 +++++--
 testbot/src/testagentd/testagentd.c       | 1028 ++++++++++++++++++++++-------
 9 files changed, 2345 insertions(+), 590 deletions(-)

Diff:   http://source.winehq.org/git/tools.git/?a=commitdiff;h=d7ff1920278971503d70cface1f9b9bc387101a4



More information about the wine-cvs mailing list