From cba98e1bc06c067f98f6c1830ea2463a1ed06f0d Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 31 Oct 2010 08:03:51 +0100 Subject: [PATCH] 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. --- app/tests/Makefile.am | 6 ++++++ configure.ac | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am index c981c4ffb9..2c5ab7ee85 100644 --- a/app/tests/Makefile.am +++ b/app/tests/Makefile.am @@ -10,6 +10,12 @@ TESTS_ENVIRONMENT = \ GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@ \ 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 = \ test-core \ test-session-management \ diff --git a/configure.ac b/configure.ac index 080b0e45e9..b7b807df7d 100644 --- a/configure.ac +++ b/configure.ac @@ -1818,6 +1818,14 @@ AC_PATH_PROG(XSLTPROC, xsltproc, no) 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 ######################################