This is to take advantage of 'make -j', as currently, when rebuilding, make has to sequentially link ./xi1/tests, then ./xi2/tests, then ./tests.
Signed-off-by: Mihail Konev <[email protected]> --- configure.ac | 1 - test/Makefile.am | 51 +++++++++++++++++++++++++++++-- test/common.sh | 2 +- test/xi1/Makefile.am | 43 -------------------------- test/xi1/common.sh | 3 -- test/xi1/protocol_xchangedevicecontrol.sh | 1 + 6 files changed, 51 insertions(+), 50 deletions(-) delete mode 100644 test/xi1/Makefile.am delete mode 100644 test/xi1/common.sh diff --git a/configure.ac b/configure.ac index 93c81a644052..765c39678277 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/xi1/Makefile test/xi2/Makefile xserver.ent xorg-server.pc diff --git a/test/Makefile.am b/test/Makefile.am index 811f5928fb5a..02cff057e75f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,3 +1,5 @@ +CLEANFILES = + if ENABLE_UNIT_TESTS SUBDIRS= . check_LTLIBRARIES = libxservertest.la @@ -8,7 +10,7 @@ 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 += xi1 xi2 +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 @@ -45,6 +47,7 @@ TESTS_ENVIRONMENT = \ XSERVER_BUILDDIR=$(abs_top_builddir) \ $(XORG_MALLOC_DEBUG_ENV) \ srcdir=$(srcdir) \ + test_subdir= \ $(NULL) AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ @@ -81,7 +84,7 @@ libxservertest_la_LIBADD += \ @XORG_LIBS@ 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 @@ -168,3 +171,47 @@ EXTRA_DIST = \ ddxstubs.c \ $(NULL) +# ------------------------------------------------------------------ +# -- xi1/Makefile.am + +if ENABLE_UNIT_TESTS +if HAVE_LD_WRAP + +noinst_PROGRAMS += xi1/tests + +TESTS += \ + xi1/protocol_xchangedevicecontrol.sh \ + $() + +xi1_tests_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ +xi1_tests_CPPFLAGS = @XORG_INCS@ -I$(srcdir)/xi2 +xi1_tests_LDFLAGS = \ + -Wl,-wrap,dixLookupWindow \ + -Wl,-wrap,dixLookupClient \ + -Wl,-wrap,WriteToClient \ + $() + +xi1_tests_LDADD = libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) + +xi1_tests_SOURCES = \ + xi2/protocol-common.c \ + xi1/protocol-xchangedevicecontrol.c \ + xi1/tests.c + +if SPECIAL_DTRACE_OBJECTS +xi1_tests_LDADD += $(OS_LIB) $(DIX_LIB) +endif + +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 $@ + +endif !HAVE_LD_WRAP +endif ENABLE_UNIT_TESTS diff --git a/test/common.sh b/test/common.sh index 892028d9a585..831f847f3a76 100644 --- a/test/common.sh +++ b/test/common.sh @@ -1,3 +1,3 @@ testname=${0%.sh} testname=${testname##*/} -exec ./tests "$testname" +exec ./"$test_subdir"/tests "$testname" diff --git a/test/xi1/Makefile.am b/test/xi1/Makefile.am deleted file mode 100644 index a53b3f7b0230..000000000000 --- a/test/xi1/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -if ENABLE_UNIT_TESTS -if HAVE_LD_WRAP -noinst_PROGRAMS = tests - -TESTS = \ - protocol_xchangedevicecontrol.sh \ - $() - -TESTS_ENVIRONMENT = \ - $(XORG_MALLOC_DEBUG_ENV) \ - srcdir=$(srcdir) \ - $() - -tests_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ -tests_CPPFLAGS = @XORG_INCS@ -I$(srcdir)/../xi2 -tests_LDFLAGS = \ - -Wl,-wrap,dixLookupWindow \ - -Wl,-wrap,dixLookupClient \ - -Wl,-wrap,WriteToClient \ - $() - -tests_LDADD =../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) - -tests_SOURCES = \ - $(srcdir)/../xi2/protocol-common.c \ - protocol-xchangedevicecontrol.c \ - tests.c - -if SPECIAL_DTRACE_OBJECTS -tests_LDADD += $(OS_LIB) $(DIX_LIB) -endif - -else -# Print that xi1-tests were skipped (exit code 77 for automake test harness) -TESTS = xi1-tests -CLEANFILES = $(TESTS) - -xi1-tests: - @echo 'echo "ld -wrap support required for xi1 unit tests, skipping"' > $@ - @echo 'exit 77' >> $@ - $(AM_V_GEN)chmod +x $@ -endif -endif diff --git a/test/xi1/common.sh b/test/xi1/common.sh deleted file mode 100644 index 892028d9a585..000000000000 --- a/test/xi1/common.sh +++ /dev/null @@ -1,3 +0,0 @@ -testname=${0%.sh} -testname=${testname##*/} -exec ./tests "$testname" diff --git a/test/xi1/protocol_xchangedevicecontrol.sh b/test/xi1/protocol_xchangedevicecontrol.sh index dd9106615e6a..3dc42a4dbce5 100755 --- a/test/xi1/protocol_xchangedevicecontrol.sh +++ b/test/xi1/protocol_xchangedevicecontrol.sh @@ -1,2 +1,3 @@ #!/bin/sh +test_subdir=xi1 . $srcdir/common.sh -- 2.9.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
