[gjs: 1/9] build: Remove xvfb-tests option



commit f0e7ca00db65c3f5695ae9ee416c686305b7ced3
Author: Philip Chimento <philip endlessm com>
Date:   Mon Aug 19 18:55:23 2019 -0700

    build: Remove xvfb-tests option
    
    This option is mainly used on headless systems such as CI. It makes more
    sense for those wanting to run the tests in a headless configuration, to
    supply their own xvfb server with the desired options, instead of
    relying on GJS to get the options right.
    
    This commit removes the option from configure.ac and Makefile-test.am,
    and amends the CI scripts to run "make check" under xvfb-run.

 Makefile-test.am             | 20 --------------------
 configure.ac                 | 13 +------------
 test/extra/do_environment.sh |  2 +-
 test/test-ci.sh              |  6 +++---
 4 files changed, 5 insertions(+), 36 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index a87e1b51..be955493 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -3,25 +3,6 @@ EXTRA_DIST +=                  \
        test/run-test           \
        $(NULL)
 
-if XVFB_TESTS
-XVFB_INVOCATION = $(XVFB) -ac -noreset -screen 0 1024x768x16
-XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \
-   491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 \
-   991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 \
-  1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 \
-  9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 \
-  9995 9996 9997 9998 9999
-XVFB_START = \
-${XVFB_INVOCATION} -help 2>/dev/null 1>&2 \
-       && XID=`for id in $(XIDS) ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \
-       && { ${XVFB} :$$XID -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \
-               trap "kill -15 $$! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } \
-       || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
-       && export DISPLAY=:$$XID;
-else
-XVFB_START =
-endif
-
 ### TEST RESOURCES #####################################################
 
 mock_js_resources_files := $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies 
$(srcdir)/test/mock-js-resources.gresource.xml)
@@ -305,7 +286,6 @@ AM_TESTS_ENVIRONMENT =                                      \
        export GSETTINGS_SCHEMA_DIR="$(builddir)";      \
        $(COVERAGE_TESTS_ENVIRONMENT)                   \
        $(GTK_TESTS_ENVIRONMENT)                        \
-       $(XVFB_START)                                   \
        $(DBUS_SESSION_COMMAND)                         \
        $(NULL)
 
diff --git a/configure.ac b/configure.ac
index d7223d2d..d1f44d15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,16 +332,6 @@ AS_IF([test "x$enable_cpp_rtti" != "xyes"],
   [AX_APPEND_COMPILE_FLAGS([-fno-rtti])],
   [AX_APPEND_COMPILE_FLAGS([-GR-])])
 
-AC_ARG_WITH([xvfb-tests],
-  [AS_HELP_STRING([--with-xvfb-tests],
-    [Run all tests under an XVFB server @<:@default=no@:>@])])
-AS_IF([test "x$with_xvfb_tests" = "xyes"], [
-  AC_PATH_PROG([XVFB], [Xvfb])
-  AS_IF([test -z "$XVFB"],
-    [AC_MSG_ERROR([Xvfb is required for --with-xvfb-tests])])
-])
-AM_CONDITIONAL([XVFB_TESTS], [test "x$with_xvfb_tests" = "xyes"])
-
 AC_ARG_WITH([dbus-tests],
   [AS_HELP_STRING([--without-dbus-tests],
     [Don't try to use DBus during make check @<:@default=use@:>@])])
@@ -390,8 +380,7 @@ some tests will fail.])
 ])
 
 TEST_MSG=
-AM_COND_IF([XVFB_TESTS], [TEST_MSG="xvfb "])
-AM_COND_IF([DBUS_TESTS], [TEST_MSG="${TEST_MSG}dbus"])
+AM_COND_IF([DBUS_TESTS], [TEST_MSG="dbus-run-session"])
 AS_IF([test -z "$TEST_MSG"], [TEST_MSG="nothing special"])
 
 AC_MSG_RESULT([
diff --git a/test/extra/do_environment.sh b/test/extra/do_environment.sh
index fc1d0c14..957b6ff3 100755
--- a/test/extra/do_environment.sh
+++ b/test/extra/do_environment.sh
@@ -33,7 +33,7 @@ function do_Configure_MainBuild(){
     do_Print_Labels 'Set Main JHBuild Configuration'
 
     mkdir -p ~/.config
-    autogenargs="--enable-compile-warnings=yes --with-xvfb-tests"
+    autogenargs="--enable-compile-warnings=yes"
 
     if [[ -n "${BUILD_OPTS}" ]]; then
         autogenargs="$autogenargs $BUILD_OPTS"
diff --git a/test/test-ci.sh b/test/test-ci.sh
index 49618938..bbc2921e 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -165,7 +165,7 @@ if [[ $1 == "GJS" ]]; then
 
         jhbuild make --check
     else
-        export AM_DISTCHECK_CONFIGURE_FLAGS="--enable-compile-warnings=yes --with-xvfb-tests"
+        export AM_DISTCHECK_CONFIGURE_FLAGS="--enable-compile-warnings=yes"
 
         # Regular (autotools only) build
         echo "Autogen options: $ci_autogenargs"
@@ -174,9 +174,9 @@ if [[ $1 == "GJS" ]]; then
         make -sj 2>&1 | tee compilation.log
 
         if [[ $TEST == "distcheck" ]]; then
-            make -s distcheck
+            xvfb-run -a make -s distcheck
         elif [[ $TEST == "check" ]]; then
-            make -s check
+            xvfb-run -a make -s check
         fi
         make -sj install
     fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]