[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    [PATCH v6 xserver] tests: fixes for non-enable-xorg build
From:       Mihail Konev <k.mvc () ya ! ru>
Date:       2017-01-31 14:57:49
Message-ID: 20170131145749.GA11579 () localhost
[Download RAW message or body]

v6: Fix commit descriptions - explain failures, and do not
duplicate 'git log -L'.

I could reorder libxservertest.la libraries if it's better to do so,
it just looks time-consuming.

["b.patch" (text/x-diff)]

From 0490a7874b9385f6e076596e0834167357b3e229 Mon Sep 17 00:00:00 2001
From: Mihail Konev <k.mvc@ya.ru>
Date: Mon, 16 Jan 2017 23:55:36 +0500
Subject: [PATCH v6 xserver 1/3] tests: Fix guards for ld -wrap

Fixes XQuartz build.

Signed-off-by: Mihail Konev <k.mvc@ya.ru>
---
 test/Makefile.am | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index e7fe587bb858..1c1f1da0e31f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -54,16 +54,6 @@ AM_CPPFLAGS += \
 tests_CPPFLAGS += $(AM_CPPFLAGS)
 endif
 
-tests_LDFLAGS = \
-	-Wl,-wrap,dixLookupWindow \
-	-Wl,-wrap,dixLookupClient \
-	-Wl,-wrap,WriteToClient \
-	-Wl,-wrap,dixLookupWindow \
-	-Wl,-wrap,XISetEventMask \
-	-Wl,-wrap,AddResource \
-	-Wl,-wrap,GrabButton \
-	$()
-
 tests_LDADD =
 
 tests_SOURCES = \
@@ -100,6 +90,16 @@ tests_SOURCES += \
 	xi2/protocol-eventconvert.c \
 	xi2/xi2.c
 
+tests_LDFLAGS = \
+	-Wl,-wrap,dixLookupWindow \
+	-Wl,-wrap,dixLookupClient \
+	-Wl,-wrap,WriteToClient \
+	-Wl,-wrap,dixLookupWindow \
+	-Wl,-wrap,XISetEventMask \
+	-Wl,-wrap,AddResource \
+	-Wl,-wrap,GrabButton \
+	$()
+
 else !HAVE_LD_WRAP
 
 # Print that xi1-tests were skipped (exit code 77 for automake test harness)
-- 
2.9.2


From 0a0310cc0052cf0acdcfaf7cc0292cba07bf8979 Mon Sep 17 00:00:00 2001
From: Mihail Konev <k.mvc@ya.ru>
Date: Tue, 17 Jan 2017 00:11:03 +0500
Subject: [PATCH v6 xserver 2/3] tests: Fix guards for xfree86 tests

Fixes xfree86 includes being pulled in by tests with --disable-xorg
or --enable-xwin.

Signed-off-by: Mihail Konev <k.mvc@ya.ru>
---
 test/Makefile.am | 41 +++++++++++++++++++++++------------------
 test/tests.c     | 17 ++++++++++-------
 2 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index 1c1f1da0e31f..e72bfe19bede 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -6,14 +6,11 @@ AM_CPPFLAGS = $(XORG_INCS)
 tests_CPPFLAGS=
 CLEANFILES=
 
-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
-if RES
-RES_SRCS = hashtabletest.c
-AM_CPPFLAGS += -DRES_TESTS
-endif
-endif
+tests_SOURCES = \
+        tests-common.c \
+        list.c \
+        string.c \
+        tests.c
 
 noinst_PROGRAMS = simple-xinit tests
 
@@ -41,7 +38,13 @@ TESTS_ENVIRONMENT = \
 	$(XORG_MALLOC_DEBUG_ENV) \
 	$(NULL)
 
+tests_LDADD =
+
 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
+
 AM_CPPFLAGS += \
 	-I$(srcdir)/xi1 \
 	-I$(srcdir)/xi2 \
@@ -52,29 +55,30 @@ AM_CPPFLAGS += \
 	-I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \
 	-I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3
 tests_CPPFLAGS += $(AM_CPPFLAGS)
-endif
-
-tests_LDADD =
 
-tests_SOURCES = \
-        tests-common.c \
+tests_SOURCES += \
         fixes.c \
         input.c \
-        list.c \
         misc.c \
         signal-logging.c \
-        string.c \
         touch.c \
         xfree86.c \
         test_xkb.c \
-        xtest.c \
-        $(RES_SRCS) \
-        tests.c
+        xtest.c
+tests_CPPFLAGS += -DXORG_TESTS
+
+if RES
+tests_SOURCES += hashtabletest.c
+tests_CPPFLAGS += -DRES_TESTS
+endif
+
+endif XORG
 
 if HAVE_LD_WRAP
 
 tests_CPPFLAGS += -DLDWRAP_TESTS
 
+if XORG
 tests_SOURCES += \
 	xi1/protocol-xchangedevicecontrol.c \
 	xi2/protocol-common.c \
@@ -99,6 +103,7 @@ tests_LDFLAGS = \
 	-Wl,-wrap,AddResource \
 	-Wl,-wrap,GrabButton \
 	$()
+endif XORG
 
 else !HAVE_LD_WRAP
 
diff --git a/test/tests.c b/test/tests.c
index add51bd4834d..97603822abaf 100644
--- a/test/tests.c
+++ b/test/tests.c
@@ -5,22 +5,23 @@
 int
 main(int argc, char **argv)
 {
-    run_test(fixes_test);
-
-#ifdef RES_TESTS
-    run_test(hashtabletest_test);
-#endif
+    run_test(list_test);
+    run_test(string_test);
 
+#ifdef XORG_TESTS
+    run_test(fixes_test);
     run_test(input_test);
-    run_test(list_test);
     run_test(misc_test);
     run_test(signal_logging_test);
-    run_test(string_test);
     run_test(touch_test);
     run_test(xfree86_test);
     run_test(xkb_test);
     run_test(xtest_test);
 
+#ifdef RES_TESTS
+    run_test(hashtabletest_test);
+#endif
+
 #ifdef LDWRAP_TESTS
     run_test(protocol_xchangedevicecontrol_test);
 
@@ -37,5 +38,7 @@ main(int argc, char **argv)
     run_test(xi2_test);
 #endif
 
+#endif /* XORG_TESTS */
+
     return 0;
 }
-- 
2.9.2


From d8f7f71191016ae564a2da501596759109841e5f Mon Sep 17 00:00:00 2001
From: Mihail Konev <k.mvc@ya.ru>
Date: Tue, 17 Jan 2017 00:36:49 +0500
Subject: [PATCH v6 xserver 3/3] tests: Link additional libs only for xfree86

The libxservertest.la encapsulated libraries that could have been
needed by tests.

However, it was only needed for tests specific to xfree86 DDX.
For others, the components differed, but were not required.

Now when there is no libxservertest.a library anymore, the order
of components matters, causing linking errors in the second case.

Remove the components, together with the XSERVER_LIBS prerequisite.

Signed-off-by: Mihail Konev <k.mvc@ya.ru>
---
 test/Makefile.am | 66 +++-----------------------------------------------------
 1 file changed, 3 insertions(+), 63 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index e72bfe19bede..cb37cc9fec96 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -127,8 +127,6 @@ xi2-tests:
 
 endif !HAVE_LD_WRAP
 
-tests_LDADD += $(XSERVER_LIBS)
-
 if XORG
 
 nodist_tests_SOURCES = sdksyms.c
@@ -145,7 +143,8 @@ tests_LDADD += \
             $(top_builddir)/hw/xfree86/i2c/libi2c.la \
             $(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
             $(top_builddir)/Xext/libXvidmode.la \
-            @XORG_LIBS@
+            $(XSERVER_LIBS) \
+            $(XORG_LIBS)
 
 if !SPECIAL_DTRACE_OBJECTS
 tests_LDADD += $(top_builddir)/os/libos.la
@@ -169,66 +168,7 @@ if DRI3
 tests_LDADD += $(top_builddir)/dri3/libdri3.la
 endif
 
-else !XORG
-
-nodist_tests_SOURCES = \
-            ddxstubs.c \
-            $(top_srcdir)/mi/miinitext.c
-
-tests_LDADD += \
-            $(top_builddir)/damageext/libdamageext.la \
-            $(top_builddir)/fb/libfb.la \
-            $(top_builddir)/fb/libwfb.la \
-            $(top_builddir)/miext/damage/libdamage.la \
-            $(top_builddir)/miext/sync/libsync.la \
-            $(top_builddir)/randr/librandr.la \
-            $(top_builddir)/render/librender.la \
-            $(top_builddir)/Xext/libXext.la \
-            $(top_builddir)/Xext/libXextdpmsstubs.la \
-            $(top_builddir)/Xext/libXvidmode.la \
-            $(top_builddir)/Xi/libXi.la \
-            $(top_builddir)/Xi/libXistubs.la \
-            $(top_builddir)/xfixes/libxfixes.la \
-            $(top_builddir)/xkb/libxkb.la \
-            $(top_builddir)/xkb/libxkbstubs.la
-
-if COMPOSITE
-tests_LDADD += \
-            $(top_builddir)/composite/libcomposite.la
-endif
-
-if DBE
-tests_LDADD += \
-            $(top_builddir)/dbe/libdbe.la
-endif
-
-if GLX
-tests_LDADD += \
-            $(top_builddir)/glx/libglx.la
-endif
-
-if RECORD
-tests_LDADD += \
-            $(top_builddir)/record/librecord.la
-endif
-
-if DRI3
-tests_LDADD += \
-            $(top_builddir)/dri3/libdri3.la
-endif
-
-if XQUARTZ
-tests_LDADD += \
-            $(top_builddir)/miext/rootless/librootless.la
-tests_LDADD += -lXplugin
-endif
-
-if XWIN_MULTIWINDOWEXTWM
-tests_LDADD += \
-            $(top_builddir)/miext/rootless/librootless.la
-endif
-
-endif !XORG
+endif XORG
 
 # GNU LD scans only in one direction, add the following dependencies at the end
 # so as they get picked up by the previously-linked libraries
-- 
2.9.2


[Attachment #4 (text/plain)]

_______________________________________________
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic