From 342494e5f40735d2b9dbc58468d3d989cdbf074c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 17 Jul 2019 12:32:20 +0200 Subject: [PATCH] Only run GUI tests for the selected wxGTK builds The tests are known to fail for the other tested ports, so don't enable them for now. Also, using a special environment variable allows to detect when the test is being run under Xvfb, which behaves differently from the normal X server in some cases. --- .travis.yml | 7 ++++--- build/tools/travis-ci.sh | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8380d561c1..1316f8047c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,17 +9,18 @@ matrix: include: - dist: precise compiler: gcc + env: wxUSE_XVFB=1 - dist: trusty compiler: gcc - dist: trusty compiler: gcc - env: wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic" + env: wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic" wxUSE_XVFB=1 - dist: trusty compiler: gcc - env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" + env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1 - dist: trusty compiler: clang - env: wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview" + env: wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview" wxUSE_XVFB=1 - dist: trusty compiler: gcc env: wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles" diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 2bb2c851c9..36c7122e76 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -66,8 +66,8 @@ case $wxTOOLSET in pushd tests && ./test && popd echo -en 'travis_fold:end:script.testing\\r' - if [ "$(uname -s)" = "Linux" ]; then - echo 'Testing GUI...' && echo -en 'travis_fold:start:script.testing_gui\\r' + if [ "$wxUSE_XVFB" = 1 ]; then + echo 'Testing GUI using Xvfb...' && echo -en 'travis_fold:start:script.testing_gui\\r' pushd tests && xvfb-run -a ./test_gui && popd echo -en 'travis_fold:end:script.testing_gui\\r' fi