tests: Refactor wraps into protocol-common.c

Part of refactoring the tests into a single binary,
to make partial rebuild slightly faster and less verbose.

Prepares for joining test/xi2/protocol-* into a single binary.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
This commit is contained in:
Mihail Konev
2017-01-12 13:21:07 +05:00
committed by Adam Jackson
parent 45546219e1
commit ff66bca3e8
15 changed files with 70 additions and 136 deletions

View File

@@ -10,6 +10,7 @@ AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
AM_CPPFLAGS = @XORG_INCS@ -I$(srcdir)/../xi2
TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
COMMON_SOURCES=$(srcdir)/../xi2/protocol-common.c
COMMON_LD_FLAGS = -Wl,-wrap,dixLookupWindow -Wl,-wrap,dixLookupClient
if SPECIAL_DTRACE_OBJECTS
TEST_LDADD += $(OS_LIB) $(DIX_LIB)
@@ -17,7 +18,7 @@ endif
protocol_xchangedevicecontrol_LDADD=$(TEST_LDADD)
protocol_xchangedevicecontrol_LDFLAGS=$(AM_LDFLAGS) -Wl,-wrap,WriteToClient
protocol_xchangedevicecontrol_LDFLAGS=$(COMMON_LD_FLAGS) -Wl,-wrap,WriteToClient
protocol_xchangedevicecontrol_SOURCES=$(COMMON_SOURCES) protocol-xchangedevicecontrol.c

View File

@@ -37,6 +37,7 @@
#include "protocol-common.h"
ClientRec client_window;
static ClientRec client_request;
static void