diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-07-27 07:57:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-07-27 07:57:27 +0000 |
commit | d4a0bed4b91da9de86c311c7fef9a8aa9a6f500c (patch) | |
tree | a1b439049dee87bc951e190db93f5bbe8b43b0b5 /xserver/test/Makefile.am | |
parent | b6bc775539a31f663f9e22ce3ccaf0aa96adf3b6 (diff) |
Update to xserver 1.20.5. Tested by jsg@
Diffstat (limited to 'xserver/test/Makefile.am')
-rw-r--r-- | xserver/test/Makefile.am | 223 |
1 files changed, 120 insertions, 103 deletions
diff --git a/xserver/test/Makefile.am b/xserver/test/Makefile.am index dc60057f5..12ac327a3 100644 --- a/xserver/test/Makefile.am +++ b/xserver/test/Makefile.am @@ -1,21 +1,20 @@ if ENABLE_UNIT_TESTS SUBDIRS= . -TEST_PROGS = list string -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 += xi1 xi2 -TEST_PROGS += xkb input xtest misc fixes xfree86 signal-logging touch -if RES -TEST_PROGS += hashtabletest -endif -endif -check_LTLIBRARIES = libxservertest.la +AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ +AM_CPPFLAGS = $(XORG_INCS) -noinst_PROGRAMS = \ - simple-xinit \ - $(TEST_PROGS) \ - $(NULL) +tests_CPPFLAGS= +CLEANFILES= + +tests_SOURCES = \ + tests-common.c \ + tests-common.h \ + list.c \ + string.c \ + tests.c \ + tests.h + +noinst_PROGRAMS = simple-xinit tests if XVFB XVFB_TESTS = scripts/xvfb-piglit.sh @@ -31,8 +30,7 @@ SCRIPT_TESTS = \ $(XEPHYR_GLAMOR_TESTS) \ $(NULL) -TESTS = \ - $(TEST_PROGS) \ +TESTS = tests \ $(SCRIPT_TESTS) \ $(NULL) @@ -42,39 +40,104 @@ TESTS_ENVIRONMENT = \ $(XORG_MALLOC_DEBUG_ENV) \ $(NULL) -AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -AM_CPPFLAGS = $(XORG_INCS) +tests_LDADD = + if XORG -AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/parser \ + +# 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 \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/parser \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \ -I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \ -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3 -endif -TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) +tests_CPPFLAGS += $(AM_CPPFLAGS) + +tests_SOURCES += \ + fixes.c \ + input.c \ + misc.c \ + signal-logging.c \ + touch.c \ + xfree86.c \ + test_xkb.c \ + xtest.c +tests_CPPFLAGS += -DXORG_TESTS -if SPECIAL_DTRACE_OBJECTS -TEST_LDADD += $(OS_LIB) $(DIX_LIB) +if RES +tests_SOURCES += hashtabletest.c +tests_CPPFLAGS += -DRES_TESTS endif -xkb_LDADD=$(TEST_LDADD) -input_LDADD=$(TEST_LDADD) -xtest_LDADD=$(TEST_LDADD) -misc_LDADD=$(TEST_LDADD) -fixes_LDADD=$(TEST_LDADD) -xfree86_LDADD=$(TEST_LDADD) -touch_LDADD=$(TEST_LDADD) -signal_logging_LDADD=$(TEST_LDADD) -hashtabletest_LDADD=$(TEST_LDADD) - -libxservertest_la_LIBADD = $(XSERVER_LIBS) +endif XORG + +if HAVE_LD_WRAP + +tests_CPPFLAGS += -DLDWRAP_TESTS + +if XORG +tests_SOURCES += \ + xi1/protocol-xchangedevicecontrol.c \ + xi2/protocol-common.c \ + 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.h + +tests_LDFLAGS = \ + -Wl,-wrap,dixLookupWindow \ + -Wl,-wrap,dixLookupClient \ + -Wl,-wrap,WriteToClient \ + -Wl,-wrap,dixLookupWindow \ + -Wl,-wrap,XISetEventMask \ + -Wl,-wrap,AddResource \ + -Wl,-wrap,GrabButton \ + $() +endif XORG + +else !HAVE_LD_WRAP + +# Print that xi1-tests were skipped (exit code 77 for automake test harness) +TESTS += xi1-tests +CLEANFILES += xi1-tests + +xi1-tests: + @echo 'echo "ld -wrap support required for xi1 unit tests, skipping"' > $@ + @echo 'exit 77' >> $@ + $(AM_V_GEN)chmod +x $@ + +# Print that xi2-tests were skipped (exit code 77 for automake test harness) +TESTS += xi2-tests +CLEANFILES += xi2-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 + if XORG -nodist_libxservertest_la_SOURCES = sdksyms.c -libxservertest_la_LIBADD += \ +nodist_tests_SOURCES = sdksyms.c + +tests_LDADD += \ $(top_builddir)/hw/xfree86/loader/libloader.la \ - $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ $(top_builddir)/hw/xfree86/common/libcommon.la \ + $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ $(top_builddir)/hw/xfree86/parser/libxf86config.la \ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ @@ -83,93 +146,47 @@ libxservertest_la_LIBADD += \ $(top_builddir)/hw/xfree86/i2c/libi2c.la \ $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ $(top_builddir)/Xext/libXvidmode.la \ - @XORG_LIBS@ + $(XSERVER_LIBS) \ + $(XORG_LIBS) + +if !SPECIAL_DTRACE_OBJECTS +tests_LDADD += $(top_builddir)/os/libos.la +endif + +if GLX +tests_LDADD += $(top_builddir)/glx/libglxvnd.la +endif BUILT_SOURCES = sdksyms.c -CLEANFILES = sdksyms.c +CLEANFILES += sdksyms.c sdksyms.c: $(top_builddir)/hw/xfree86/sdksyms.c $(AM_V_GEN)$(LN_S) $(top_builddir)/hw/xfree86/sdksyms.c if DRI -libxservertest_la_LIBADD += $(top_builddir)/hw/xfree86/dri/libdri.la +tests_LDADD += $(top_builddir)/hw/xfree86/dri/libdri.la endif if DRI2 -libxservertest_la_LIBADD += $(top_builddir)/hw/xfree86/dri2/libdri2.la +tests_LDADD += $(top_builddir)/hw/xfree86/dri2/libdri2.la endif if DRI3 -libxservertest_la_LIBADD += $(top_builddir)/dri3/libdri3.la +tests_LDADD += $(top_builddir)/dri3/libdri3.la endif -else -nodist_libxservertest_la_SOURCES = \ - ddxstubs.c \ - $(top_srcdir)/mi/miinitext.c - -libxservertest_la_LIBADD += \ - $(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 -libxservertest_la_LIBADD += \ - $(top_builddir)/composite/libcomposite.la -endif +endif XORG -if DBE -libxservertest_la_LIBADD += \ - $(top_builddir)/dbe/libdbe.la -endif +# 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 +tests_LDADD += $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) -if GLX -libxservertest_la_LIBADD += \ - $(top_builddir)/glx/libglx.la -endif - -if RECORD -libxservertest_la_LIBADD += \ - $(top_builddir)/record/librecord.la -endif - -if DRI3 -libxservertest_la_LIBADD += \ - $(top_builddir)/dri3/libdri3.la -endif - -if XQUARTZ -libxservertest_la_LIBADD += \ - $(top_builddir)/miext/rootless/librootless.la -TEST_LDADD += -lXplugin -endif - -if XWIN_MULTIWINDOWEXTWM -libxservertest_la_LIBADD += \ - $(top_builddir)/miext/rootless/librootless.la -endif -endif - -libxservertest_la_DEPENDENCIES = $(libxservertest_la_LIBADD) -endif +endif ENABLE_UNIT_TESTS EXTRA_DIST = \ scripts/xvfb-piglit.sh \ scripts/xephyr-glamor-piglit.sh \ scripts/xinit-piglit-session.sh \ scripts/run-piglit.sh \ - ddxstubs.c \ $(NULL) |