Avoids one more linking. Signed-off-by: Mihail Konev <k....@ya.ru> --- test/Makefile.am | 19 ++++--------------- test/tests.c | 15 +++++++++++++++ test/xi2/protocol_eventconvert.sh | 1 - test/xi2/protocol_xigetclientpointer.sh | 1 - test/xi2/protocol_xigetselectedevents.sh | 1 - test/xi2/protocol_xipassivegrabdevice.sh | 1 - test/xi2/protocol_xiquerydevice.sh | 1 - test/xi2/protocol_xiquerypointer.sh | 1 - test/xi2/protocol_xiqueryversion.sh | 1 - test/xi2/protocol_xiselectevents.sh | 1 - test/xi2/protocol_xisetclientpointer.sh | 1 - test/xi2/protocol_xiwarppointer.sh | 1 - test/xi2/tests.c | 24 ------------------------ test/xi2/xi2.sh | 1 - 14 files changed, 19 insertions(+), 50 deletions(-) delete mode 100644 test/xi2/tests.c
diff --git a/test/Makefile.am b/test/Makefile.am index 71bfa63adae4..c3850f70ca4a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -220,7 +220,6 @@ endif ENABLE_UNIT_TESTS if ENABLE_UNIT_TESTS if HAVE_LD_WRAP -noinst_PROGRAMS += xi2/tests TESTS += \ xi2/protocol_xiqueryversion.sh \ @@ -235,24 +234,16 @@ TESTS += \ xi2/protocol_eventconvert.sh \ xi2/xi2.sh -xi2_tests_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -xi2_tests_CPPFLAGS = @XORG_INCS@ -xi2_tests_LDADD= libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) +tests_CPPFLAGS += -DENABLE_XI2_TESTS -if SPECIAL_DTRACE_OBJECTS -xi2_tests_LDADD += $(OS_LIB) $(DIX_LIB) -endif - -xi2_tests_LDFLAGS = \ +tests_LDFLAGS += \ -Wl,-wrap,WriteToClient \ - -Wl,-wrap,dixLookupWindow \ -Wl,-wrap,XISetEventMask \ -Wl,-wrap,AddResource \ -Wl,-wrap,GrabButton \ - -Wl,-wrap,dixLookupClient \ $() -xi2_tests_SOURCES = \ +tests_SOURCES += \ xi2/protocol-xiqueryversion.c \ xi2/protocol-xiquerydevice.c \ xi2/protocol-xiselectevents.c \ @@ -263,9 +254,7 @@ xi2_tests_SOURCES = \ xi2/protocol-xipassivegrabdevice.c \ xi2/protocol-xiwarppointer.c \ xi2/protocol-eventconvert.c \ - xi2/xi2.c \ - xi2/protocol-common.c \ - xi2/tests.c + xi2/xi2.c else !HAVE_LD_WRAP diff --git a/test/tests.c b/test/tests.c index 451631c33a8e..6f2b102d72f9 100644 --- a/test/tests.c +++ b/test/tests.c @@ -2,6 +2,7 @@ #include "tests.h" #include "xi1/tests.h" +#include "xi2/protocol-common.h" int main(int argc, char **argv) { if (argc < 2) { return 1; } @@ -25,5 +26,19 @@ int main(int argc, char **argv) { try_command(protocol_xchangedevicecontrol); #endif +#ifdef ENABLE_XI2_TESTS + try_command(protocol_xiqueryversion); + try_command(protocol_xiquerydevice); + try_command(protocol_xiselectevents); + try_command(protocol_xigetselectedevents); + try_command(protocol_xisetclientpointer); + try_command(protocol_xigetclientpointer); + try_command(protocol_xipassivegrabdevice); + try_command(protocol_xiquerypointer); + try_command(protocol_xiwarppointer); + try_command(protocol_eventconvert); + try_command(xi2); +#endif + return 1; } diff --git a/test/xi2/protocol_eventconvert.sh b/test/xi2/protocol_eventconvert.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_eventconvert.sh +++ b/test/xi2/protocol_eventconvert.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xigetclientpointer.sh b/test/xi2/protocol_xigetclientpointer.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xigetclientpointer.sh +++ b/test/xi2/protocol_xigetclientpointer.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xigetselectedevents.sh b/test/xi2/protocol_xigetselectedevents.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xigetselectedevents.sh +++ b/test/xi2/protocol_xigetselectedevents.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xipassivegrabdevice.sh b/test/xi2/protocol_xipassivegrabdevice.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xipassivegrabdevice.sh +++ b/test/xi2/protocol_xipassivegrabdevice.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xiquerydevice.sh b/test/xi2/protocol_xiquerydevice.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xiquerydevice.sh +++ b/test/xi2/protocol_xiquerydevice.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xiquerypointer.sh b/test/xi2/protocol_xiquerypointer.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xiquerypointer.sh +++ b/test/xi2/protocol_xiquerypointer.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xiqueryversion.sh b/test/xi2/protocol_xiqueryversion.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xiqueryversion.sh +++ b/test/xi2/protocol_xiqueryversion.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xiselectevents.sh b/test/xi2/protocol_xiselectevents.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xiselectevents.sh +++ b/test/xi2/protocol_xiselectevents.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xisetclientpointer.sh b/test/xi2/protocol_xisetclientpointer.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xisetclientpointer.sh +++ b/test/xi2/protocol_xisetclientpointer.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/protocol_xiwarppointer.sh b/test/xi2/protocol_xiwarppointer.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/protocol_xiwarppointer.sh +++ b/test/xi2/protocol_xiwarppointer.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh diff --git a/test/xi2/tests.c b/test/xi2/tests.c deleted file mode 100644 index 0c20c1e62187..000000000000 --- a/test/xi2/tests.c +++ /dev/null @@ -1,24 +0,0 @@ -#include <string.h> - -#include "protocol-common.h" - -int main(int argc, char **argv) { - if (argc < 2) { return 1; } - -#define try_command(func) \ - if (strcmp(argv[1], #func) == 0) { return func ## _test (); }; - - try_command(protocol_xiqueryversion); - try_command(protocol_xiquerydevice); - try_command(protocol_xiselectevents); - try_command(protocol_xigetselectedevents); - try_command(protocol_xisetclientpointer); - try_command(protocol_xigetclientpointer); - try_command(protocol_xipassivegrabdevice); - try_command(protocol_xiquerypointer); - try_command(protocol_xiwarppointer); - try_command(protocol_eventconvert); - try_command(xi2); - - return 1; -} diff --git a/test/xi2/xi2.sh b/test/xi2/xi2.sh index 0ae8e960f75c..dd9106615e6a 100755 --- a/test/xi2/xi2.sh +++ b/test/xi2/xi2.sh @@ -1,3 +1,2 @@ #!/bin/sh -test_subdir=xi2 . $srcdir/common.sh -- 2.9.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel