testsuite: clean up build machinery a bit
No point in setting LDADD for every single binary, when we can do it just once. Also, generate test.in files.
This commit is contained in:
@ -4,63 +4,42 @@ NULL=
|
||||
|
||||
noinst_PROGRAMS = $(TEST_PROGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GDK_DEP_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
AM_CPPFLAGS = \
|
||||
$(GDK_DEP_CFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(NULL)
|
||||
|
||||
progs_ldadd = \
|
||||
$(GDK_DEP_LIBS) \
|
||||
LDADD = \
|
||||
$(GDK_DEP_LIBS) \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(NULL)
|
||||
|
||||
#TEST_PROGS += check-gdk-cairo
|
||||
#check_gdk_cairo_SOURCES = check-gdk-cairo.c
|
||||
#check_gdk_cairo_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += rgba
|
||||
rgba_SOURCES = rgba.c
|
||||
rgba_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += encoding
|
||||
encoding_SOURCES = encoding.c
|
||||
encoding_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += display
|
||||
display_SOURCES = display.c
|
||||
display_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += keysyms
|
||||
keysyms_SOURCES = keysyms.c
|
||||
keysyms_LDADD = $(progs_ldadd)
|
||||
TEST_PROGS += \
|
||||
rgba \
|
||||
encoding \
|
||||
display \
|
||||
keysyms \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES = \
|
||||
cairosurface.png \
|
||||
gdksurface.png \
|
||||
$(NULL)
|
||||
|
||||
test_in_files = \
|
||||
rgba.test.in \
|
||||
encoding.test.in \
|
||||
display.test.in \
|
||||
keysyms.test.in \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST += $(test_in_files)
|
||||
|
||||
if BUILDOPT_INSTALL_TESTS
|
||||
insttestdir=$(pkglibexecdir)/installed-tests
|
||||
insttest_PROGRAMS = $(TEST_PROGS)
|
||||
|
||||
substitutions = \
|
||||
-e s,@pkglibexecdir\@,$(pkglibexecdir),g \
|
||||
$(NULL)
|
||||
%.test: %$(EXEEXT) Makefile
|
||||
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
|
||||
echo 'Type=session' >> $@.tmp; \
|
||||
echo 'Exec=$(insttestdir)/$<' >> $@.tmp; \
|
||||
mv $@.tmp $@)
|
||||
|
||||
test_files = $(test_in_files:.test.in=.test)
|
||||
|
||||
$(test_files): %.test: %.test.in
|
||||
$(AM_V_GEN) sed $(substitutions) $< > $@.tmp && mv $@.tmp $@
|
||||
test_files = $(TEST_PROGRS:=.test)
|
||||
|
||||
testmetadir = $(datadir)/installed-tests/$(PACKAGE)
|
||||
testmeta_DATA = $(test_files)
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
[Test]
|
||||
Exec=/bin/sh -c "@pkglibexecdir@/installed-tests/display"
|
||||
Type=session
|
||||
@ -1,3 +0,0 @@
|
||||
[Test]
|
||||
Exec=/bin/sh -c "@pkglibexecdir@/installed-tests/encoding"
|
||||
Type=session
|
||||
@ -1,3 +0,0 @@
|
||||
[Test]
|
||||
Exec=/bin/sh -c "@pkglibexecdir@/installed-tests/keysyms"
|
||||
Type=session
|
||||
@ -1,3 +0,0 @@
|
||||
[Test]
|
||||
Exec=/bin/sh -c "@pkglibexecdir@/installed-tests/rgba"
|
||||
Type=session
|
||||
Reference in New Issue
Block a user