Add --enable-installed-tests, use it for reftests

See https://live.gnome.org/GnomeGoals/InstalledTests

https://bugzilla.gnome.org/show_bug.cgi?id=699601
This commit is contained in:
Colin Walters 2013-05-09 18:38:08 +02:00 committed by Benjamin Otte
parent 2c1d7cf074
commit a8da29b8db
3 changed files with 30 additions and 1 deletions

View File

@ -255,6 +255,11 @@ AC_ARG_ENABLE(rebuilds,
[AS_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
AC_ARG_ENABLE(installed_tests,
AS_HELP_STRING([--enable-installed-tests],
[Install test programs (default: no)]),,
[enable_installed_tests=no])
AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes)
AC_ARG_ENABLE(gtk2-dependency,
[AS_HELP_STRING([--enable-gtk2-dependency],

View File

@ -30,7 +30,7 @@ EXTRA_DIST += \
border-image-repeat.sh \
$(NULL)
EXTRA_DIST += \
testdata = \
background-area.css \
background-area.ref.ui \
background-area.ui \
@ -279,4 +279,25 @@ EXTRA_DIST += \
window-default-size.ui \
$(NULL)
if BUILDOPT_INSTALL_TESTS
insttestdir=$(pkglibexecdir)/installed-tests
insttest_PROGRAMS = gtk-reftest
reftestdir = $(insttestdir)/reftests
reftest_DATA = $(testdata)
substitutions = \
-e s,@pkglibexecdir\@,$(pkglibexecdir),g \
$(NULL)
reftests.test: reftests.test.in Makefile
$(AM_V_GEN) sed $(substitutions) $< > $@.tmp && mv $@.tmp $@
EXTRA_DIST += \
reftests.test.in
testmetadir = $(datadir)/installed-tests/$(PACKAGE)
testmeta_DATA = reftests.test
endif
-include $(top_srcdir)/git.mk

View File

@ -0,0 +1,3 @@
[Test]
Exec=/bin/sh -c "@pkglibexecdir@/installed-tests/gtk-reftest -k --verbose --output $(pwd) --directory @pkglibexecdir@/installed-tests/reftests"
Type=session