Merge pull request #3585 from hugovk/fix-travis

Fix Travis CI: Only start Xvfb for Qt builds
This commit is contained in:
Hugo 2019-01-15 16:16:23 +02:00 committed by GitHub
commit a478c213a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@ matrix:
dist: trusty dist: trusty
- python: "2.7_with_system_site_packages" # For PyQt4 - python: "2.7_with_system_site_packages" # For PyQt4
name: "2.7_with_system_site_packages Xenial" name: "2.7_with_system_site_packages Xenial"
services: xvfb
- python: "2.7_with_system_site_packages" # For PyQt4 - python: "2.7_with_system_site_packages" # For PyQt4
name: "2.7_with_system_site_packages Trusty" name: "2.7_with_system_site_packages Trusty"
dist: trusty dist: trusty
@ -77,8 +78,11 @@ before_install:
before_script: before_script:
# Qt needs a display for some of the tests, and it's only run on the system site packages install # Qt needs a display for some of the tests, and it's only run on the system site packages install
- "export DISPLAY=:99.0" - |
- "sh -e /etc/init.d/xvfb start" if [ "$TRAVIS_JOB_NAME" == "2.7_with_system_site_packages Trusty" ]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
fi
script: script:
- | - |