[PATCH xserver 06/10] tests: Move test/xi2/Makefile.am to test/

Mihail Konev k.mvc at ya.ru
Fri Dec 30 08:30:57 UTC 2016


Signed-off-by: Mihail Konev <k.mvc at ya.ru>
---
 configure.ac                             |  1 -
 test/Makefile.am                         | 70 +++++++++++++++++++++++++++++++-
 test/xi2/Makefile.am                     | 69 -------------------------------
 test/xi2/common.sh                       |  3 --
 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/xi2.sh                          |  1 +
 15 files changed, 79 insertions(+), 75 deletions(-)
 delete mode 100644 test/xi2/Makefile.am
 delete mode 100644 test/xi2/common.sh

diff --git a/configure.ac b/configure.ac
index 765c39678277..d265528ea124 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2679,7 +2679,6 @@ hw/kdrive/linux/Makefile
 hw/kdrive/src/Makefile
 hw/xwayland/Makefile
 test/Makefile
-test/xi2/Makefile
 xserver.ent
 xorg-server.pc
 ])
diff --git a/test/Makefile.am b/test/Makefile.am
index 02cff057e75f..ce1e6e6ce1a3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,7 @@
 CLEANFILES =
 
 if ENABLE_UNIT_TESTS
-SUBDIRS= .
+
 check_LTLIBRARIES = libxservertest.la
 noinst_PROGRAMS = simple-xinit tests
 
@@ -10,7 +10,6 @@ tests_SOURCES = list.c string.c tests.c
 if XORG
 # Tests that require at least some DDX functions in order to fully link
 # For now, requires xf86 ddx, could be adjusted to use another
-SUBDIRS += xi2
 tests_SOURCES += xkb.c input.c xtest.c misc.c fixes.c xfree86.c signal-logging.c touch.c
 if RES
 tests_SOURCES += hashtabletest.c
@@ -215,3 +214,70 @@ xi1-tests:
 
 endif !HAVE_LD_WRAP
 endif ENABLE_UNIT_TESTS
+
+# ------------------------------------------------------------------
+# -- xi2/Makefile.am
+
+if ENABLE_UNIT_TESTS
+if HAVE_LD_WRAP
+noinst_PROGRAMS += xi2/tests
+
+TESTS += \
+	xi2/protocol_xiqueryversion.sh \
+	xi2/protocol_xiquerydevice.sh \
+	xi2/protocol_xiselectevents.sh \
+	xi2/protocol_xigetselectedevents.sh \
+	xi2/protocol_xisetclientpointer.sh \
+	xi2/protocol_xigetclientpointer.sh \
+	xi2/protocol_xipassivegrabdevice.sh \
+	xi2/protocol_xiquerypointer.sh \
+	xi2/protocol_xiwarppointer.sh \
+	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)
+
+if SPECIAL_DTRACE_OBJECTS
+xi2_tests_LDADD += $(OS_LIB) $(DIX_LIB)
+endif
+
+xi2_tests_LDFLAGS = \
+        -Wl,-wrap,WriteToClient \
+        -Wl,-wrap,dixLookupWindow \
+        -Wl,-wrap,XISetEventMask \
+        -Wl,-wrap,AddResource \
+        -Wl,-wrap,GrabButton \
+        -Wl,-wrap,dixLookupClient \
+        $()
+
+xi2_tests_SOURCES = \
+	xi2/protocol-xiqueryversion.c \
+	xi2/protocol-xiquerydevice.c \
+	xi2/protocol-xiselectevents.c \
+	xi2/protocol-xigetselectedevents.c \
+	xi2/protocol-xisetclientpointer.c \
+	xi2/protocol-xigetclientpointer.c \
+	xi2/protocol-xiquerypointer.c \
+	xi2/protocol-xipassivegrabdevice.c \
+	xi2/protocol-xiwarppointer.c \
+	xi2/protocol-eventconvert.c \
+	xi2/xi2.c \
+	xi2/protocol-common.c \
+	xi2/tests.c
+
+else !HAVE_LD_WRAP
+
+# Print that xi2-tests were skipped (exit code 77 for automake test harness)
+TESTS += xi2-tests
+CLEANFILES += $(TESTS)
+
+xi2-tests:
+	@echo 'echo "ld -wrap support required for xi2 unit tests, skipping"' > $@
+	@echo 'exit 77' >> $@
+	$(AM_V_GEN)chmod +x $@
+
+endif !HAVE_LD_WRAP
+endif ENABLE_UNIT_TESTS
+
diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am
deleted file mode 100644
index 1b81eca0ad5e..000000000000
--- a/test/xi2/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-if ENABLE_UNIT_TESTS
-if HAVE_LD_WRAP
-noinst_PROGRAMS = tests
-
-TESTS = \
-	protocol_xiqueryversion.sh \
-	protocol_xiquerydevice.sh \
-	protocol_xiselectevents.sh \
-	protocol_xigetselectedevents.sh \
-	protocol_xisetclientpointer.sh \
-	protocol_xigetclientpointer.sh \
-	protocol_xipassivegrabdevice.sh \
-	protocol_xiquerypointer.sh \
-	protocol_xiwarppointer.sh \
-	protocol_eventconvert.sh \
-	xi2.sh
-
-TESTS_ENVIRONMENT = \
-	$(XORG_MALLOC_DEBUG_ENV) \
-	srcdir=$(srcdir) \
-	$()
-
-AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
-AM_CPPFLAGS = @XORG_INCS@
-TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
-COMMON_SOURCES=protocol-common.h protocol-common.c
-COMMON_LDFLAGS= -Wl,-wrap,dixLookupWindow -Wl,-wrap,dixLookupClient
-
-if SPECIAL_DTRACE_OBJECTS
-TEST_LDADD += $(OS_LIB) $(DIX_LIB)
-endif
-
-tests_LDADD = $(TEST_LDADD)
-
-tests_LDFLAGS = \
-        -Wl,-wrap,WriteToClient \
-        -Wl,-wrap,dixLookupWindow \
-        -Wl,-wrap,XISetEventMask \
-        -Wl,-wrap,AddResource \
-        -Wl,-wrap,GrabButton \
-        -Wl,-wrap,dixLookupClient \
-        $()
-
-tests_SOURCES = \
-	protocol-xiqueryversion.c \
-	protocol-xiquerydevice.c \
-	protocol-xiselectevents.c \
-	protocol-xigetselectedevents.c \
-	protocol-xisetclientpointer.c \
-	protocol-xigetclientpointer.c \
-	protocol-xiquerypointer.c \
-	protocol-xipassivegrabdevice.c \
-	protocol-xiwarppointer.c \
-	protocol-eventconvert.c \
-	xi2.c \
-	protocol-common.c \
-	tests.c
-
-else
-# Print that xi2-tests were skipped (exit code 77 for automake test harness)
-TESTS = xi2-tests
-CLEANFILES = $(TESTS)
-
-xi2-tests:
-	@echo 'echo "ld -wrap support required for xi2 unit tests, skipping"' > $@
-	@echo 'exit 77' >> $@
-	$(AM_V_GEN)chmod +x $@
-endif
-endif
diff --git a/test/xi2/common.sh b/test/xi2/common.sh
deleted file mode 100644
index 892028d9a585..000000000000
--- a/test/xi2/common.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-testname=${0%.sh}
-testname=${testname##*/}
-exec ./tests "$testname"
diff --git a/test/xi2/protocol_eventconvert.sh b/test/xi2/protocol_eventconvert.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_eventconvert.sh
+++ b/test/xi2/protocol_eventconvert.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xigetclientpointer.sh b/test/xi2/protocol_xigetclientpointer.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xigetclientpointer.sh
+++ b/test/xi2/protocol_xigetclientpointer.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xigetselectedevents.sh b/test/xi2/protocol_xigetselectedevents.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xigetselectedevents.sh
+++ b/test/xi2/protocol_xigetselectedevents.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xipassivegrabdevice.sh b/test/xi2/protocol_xipassivegrabdevice.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xipassivegrabdevice.sh
+++ b/test/xi2/protocol_xipassivegrabdevice.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xiquerydevice.sh b/test/xi2/protocol_xiquerydevice.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xiquerydevice.sh
+++ b/test/xi2/protocol_xiquerydevice.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xiquerypointer.sh b/test/xi2/protocol_xiquerypointer.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xiquerypointer.sh
+++ b/test/xi2/protocol_xiquerypointer.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xiqueryversion.sh b/test/xi2/protocol_xiqueryversion.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xiqueryversion.sh
+++ b/test/xi2/protocol_xiqueryversion.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xiselectevents.sh b/test/xi2/protocol_xiselectevents.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xiselectevents.sh
+++ b/test/xi2/protocol_xiselectevents.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xisetclientpointer.sh b/test/xi2/protocol_xisetclientpointer.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xisetclientpointer.sh
+++ b/test/xi2/protocol_xisetclientpointer.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/protocol_xiwarppointer.sh b/test/xi2/protocol_xiwarppointer.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/protocol_xiwarppointer.sh
+++ b/test/xi2/protocol_xiwarppointer.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
diff --git a/test/xi2/xi2.sh b/test/xi2/xi2.sh
index dd9106615e6a..0ae8e960f75c 100755
--- a/test/xi2/xi2.sh
+++ b/test/xi2/xi2.sh
@@ -1,2 +1,3 @@
 #!/bin/sh
+test_subdir=xi2
 . $srcdir/common.sh
-- 
2.9.2



More information about the xorg-devel mailing list