2011-03-17 19:26:36 -04:00
|
|
|
if ENABLE_UNIT_TESTS
|
2011-11-28 20:38:58 -08:00
|
|
|
SUBDIRS= .
|
2017-01-12 13:21:10 +05:00
|
|
|
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
|
|
|
|
|
AM_CPPFLAGS = $(XORG_INCS)
|
|
|
|
|
|
2017-01-12 13:21:11 +05:00
|
|
|
tests_CPPFLAGS=
|
|
|
|
|
CLEANFILES=
|
|
|
|
|
|
2011-11-28 20:38:58 -08:00
|
|
|
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
|
2014-09-10 15:41:08 -07:00
|
|
|
if RES
|
2017-01-12 13:21:10 +05:00
|
|
|
RES_SRCS = hashtabletest.c
|
|
|
|
|
AM_CPPFLAGS += -DRES_TESTS
|
2014-09-10 15:41:08 -07:00
|
|
|
endif
|
2011-11-28 20:38:58 -08:00
|
|
|
endif
|
2009-04-15 17:21:08 +10:00
|
|
|
|
2017-01-12 13:21:10 +05:00
|
|
|
noinst_PROGRAMS = simple-xinit tests
|
2016-09-25 13:30:17 -07:00
|
|
|
|
2016-08-31 17:00:00 -07:00
|
|
|
if XVFB
|
|
|
|
|
XVFB_TESTS = scripts/xvfb-piglit.sh
|
2016-09-25 13:30:22 -07:00
|
|
|
if XEPHYR
|
|
|
|
|
if GLAMOR
|
|
|
|
|
XEPHYR_GLAMOR_TESTS = scripts/xephyr-glamor-piglit.sh
|
|
|
|
|
endif
|
|
|
|
|
endif
|
2016-08-31 17:00:00 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
SCRIPT_TESTS = \
|
|
|
|
|
$(XVFB_TESTS) \
|
2016-09-25 13:30:22 -07:00
|
|
|
$(XEPHYR_GLAMOR_TESTS) \
|
2016-08-31 17:00:00 -07:00
|
|
|
$(NULL)
|
|
|
|
|
|
2017-01-12 13:21:10 +05:00
|
|
|
TESTS = tests \
|
2016-08-31 17:00:00 -07:00
|
|
|
$(SCRIPT_TESTS) \
|
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
TESTS_ENVIRONMENT = \
|
2016-09-25 13:30:16 -07:00
|
|
|
XSERVER_DIR=$(abs_top_srcdir) \
|
|
|
|
|
XSERVER_BUILDDIR=$(abs_top_builddir) \
|
2016-08-31 17:00:00 -07:00
|
|
|
$(XORG_MALLOC_DEBUG_ENV) \
|
|
|
|
|
$(NULL)
|
2009-04-15 17:21:08 +10:00
|
|
|
|
2011-11-28 20:38:58 -08:00
|
|
|
if XORG
|
2017-01-12 13:21:11 +05:00
|
|
|
AM_CPPFLAGS += \
|
|
|
|
|
-I$(srcdir)/xi1 \
|
|
|
|
|
-I$(srcdir)/xi2 \
|
|
|
|
|
-I$(top_srcdir)/hw/xfree86/common \
|
|
|
|
|
-I$(top_srcdir)/hw/xfree86/parser \
|
2011-11-28 20:38:58 -08:00
|
|
|
-I$(top_srcdir)/hw/xfree86/ddc \
|
2011-06-14 19:47:02 -07:00
|
|
|
-I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \
|
2012-07-10 02:03:18 +01:00
|
|
|
-I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \
|
2013-04-09 19:59:39 -07:00
|
|
|
-I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3
|
2017-01-12 13:21:11 +05:00
|
|
|
tests_CPPFLAGS += $(AM_CPPFLAGS)
|
2011-11-28 20:38:58 -08:00
|
|
|
endif
|
2017-01-12 13:21:11 +05:00
|
|
|
|
|
|
|
|
tests_LDFLAGS = \
|
|
|
|
|
-Wl,-wrap,dixLookupWindow \
|
|
|
|
|
-Wl,-wrap,dixLookupClient \
|
|
|
|
|
-Wl,-wrap,WriteToClient \
|
|
|
|
|
-Wl,-wrap,dixLookupWindow \
|
|
|
|
|
-Wl,-wrap,XISetEventMask \
|
|
|
|
|
-Wl,-wrap,AddResource \
|
|
|
|
|
-Wl,-wrap,GrabButton \
|
|
|
|
|
$()
|
|
|
|
|
|
2017-01-25 17:29:15 +02:00
|
|
|
tests_LDADD =
|
2017-01-16 14:59:40 -05:00
|
|
|
|
|
|
|
|
tests_SOURCES = \
|
|
|
|
|
tests-common.c \
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
if HAVE_LD_WRAP
|
|
|
|
|
|
2017-01-12 13:21:11 +05:00
|
|
|
tests_CPPFLAGS += -DLDWRAP_TESTS
|
2017-01-16 14:59:40 -05:00
|
|
|
|
2017-01-12 13:21:11 +05:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2017-01-12 13:21:12 +05:00
|
|
|
tests_LDADD += $(XSERVER_LIBS)
|
|
|
|
|
|
2017-01-16 14:59:40 -05:00
|
|
|
if XORG
|
2012-07-10 02:03:15 +01:00
|
|
|
|
2017-01-12 13:21:12 +05:00
|
|
|
nodist_tests_SOURCES = sdksyms.c
|
|
|
|
|
|
|
|
|
|
tests_LDADD += \
|
2009-04-15 17:21:08 +10:00
|
|
|
$(top_builddir)/hw/xfree86/loader/libloader.la \
|
|
|
|
|
$(top_builddir)/hw/xfree86/common/libcommon.la \
|
2017-01-12 13:21:12 +05:00
|
|
|
$(top_builddir)/hw/xfree86/os-support/libxorgos.la \
|
2014-02-07 16:21:48 +01:00
|
|
|
$(top_builddir)/hw/xfree86/parser/libxf86config.la \
|
2009-04-15 17:21:08 +10:00
|
|
|
$(top_builddir)/hw/xfree86/dixmods/libdixmods.la \
|
|
|
|
|
$(top_builddir)/hw/xfree86/modes/libxf86modes.la \
|
|
|
|
|
$(top_builddir)/hw/xfree86/ramdac/libramdac.la \
|
|
|
|
|
$(top_builddir)/hw/xfree86/ddc/libddc.la \
|
|
|
|
|
$(top_builddir)/hw/xfree86/i2c/libi2c.la \
|
2012-01-11 12:17:06 -08:00
|
|
|
$(top_builddir)/hw/xfree86/dixmods/libxorgxkb.la \
|
2016-02-10 09:34:34 +01:00
|
|
|
$(top_builddir)/Xext/libXvidmode.la \
|
2012-01-11 12:17:06 -08:00
|
|
|
@XORG_LIBS@
|
2012-03-05 00:05:48 -08:00
|
|
|
|
2017-01-13 18:44:01 +01:00
|
|
|
if !SPECIAL_DTRACE_OBJECTS
|
|
|
|
|
tests_LDADD += $(top_builddir)/os/libos.la
|
|
|
|
|
endif
|
|
|
|
|
|
2014-04-04 14:59:21 -04:00
|
|
|
BUILT_SOURCES = sdksyms.c
|
2017-01-12 13:21:11 +05:00
|
|
|
CLEANFILES += sdksyms.c
|
2014-04-04 14:59:21 -04:00
|
|
|
|
|
|
|
|
sdksyms.c: $(top_builddir)/hw/xfree86/sdksyms.c
|
|
|
|
|
$(AM_V_GEN)$(LN_S) $(top_builddir)/hw/xfree86/sdksyms.c
|
|
|
|
|
|
2012-07-10 02:03:15 +01:00
|
|
|
if DRI
|
2017-01-12 13:21:12 +05:00
|
|
|
tests_LDADD += $(top_builddir)/hw/xfree86/dri/libdri.la
|
2012-07-10 02:03:15 +01:00
|
|
|
endif
|
|
|
|
|
|
2012-07-10 02:03:18 +01:00
|
|
|
if DRI2
|
2017-01-12 13:21:12 +05:00
|
|
|
tests_LDADD += $(top_builddir)/hw/xfree86/dri2/libdri2.la
|
2012-07-10 02:03:18 +01:00
|
|
|
endif
|
|
|
|
|
|
2017-01-12 13:21:12 +05:00
|
|
|
if DRI3
|
|
|
|
|
tests_LDADD += $(top_builddir)/dri3/libdri3.la
|
|
|
|
|
endif
|
|
|
|
|
|
2017-01-16 14:59:40 -05:00
|
|
|
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
|
2017-01-12 13:21:12 +05:00
|
|
|
|
2017-01-25 17:29:15 +02:00
|
|
|
# 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)
|
|
|
|
|
|
2017-01-12 13:21:12 +05:00
|
|
|
endif ENABLE_UNIT_TESTS
|
2012-04-07 15:26:53 -07:00
|
|
|
|
2016-08-31 17:00:00 -07:00
|
|
|
EXTRA_DIST = \
|
2016-12-07 15:43:06 +02:00
|
|
|
scripts/xvfb-piglit.sh \
|
|
|
|
|
scripts/xephyr-glamor-piglit.sh \
|
2016-08-31 17:00:00 -07:00
|
|
|
scripts/xinit-piglit-session.sh \
|
2016-09-25 13:30:18 -07:00
|
|
|
scripts/run-piglit.sh \
|
2016-08-31 17:00:00 -07:00
|
|
|
ddxstubs.c \
|
|
|
|
|
$(NULL)
|
2012-04-07 15:26:53 -07:00
|
|
|
|