app/tests: Run tests on an Xvfb X server if available

Add a configure check for xvfb-run and run tests with that if
available. This makes it possible to easily run UI tests in headless
environments such as a server that does nightly builds; one just needs
to make sure xvfb-run is available.
This commit is contained in:
Martin Nordholts 2010-10-31 08:03:51 +01:00
parent f216e0b039
commit cba98e1bc0
2 changed files with 14 additions and 0 deletions

View File

@ -10,6 +10,12 @@ TESTS_ENVIRONMENT = \
GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@ \ GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@ GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@
# Run tests with xvfb-run if available
if HAVE_XVFB_RUN
TESTS_ENVIRONMENT += $(XVFB_RUN) --server-args="-screen 0 1280x1024x24"
endif
TESTS = \ TESTS = \
test-core \ test-core \
test-session-management \ test-session-management \

View File

@ -1818,6 +1818,14 @@ AC_PATH_PROG(XSLTPROC, xsltproc, no)
AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno") AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
####################
# Check for xvfb-run
####################
AC_PATH_PROG(XVFB_RUN, xvfb-run, no)
AM_CONDITIONAL(HAVE_XVFB_RUN, test "x$XVFB_RUN" != "xno")
###################################### ######################################
# Checks for gtk-doc and docbook-tools # Checks for gtk-doc and docbook-tools
###################################### ######################################