summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2018-07-19 21:50:52 -0500
committerGitHub <noreply@github.com>2018-07-19 21:50:52 -0500
commitcede1e19bdfb8ddc3d9c0ab536643073f20e53f0 (patch)
treea400d683a08a1adea2d6349bfbef93e08e321df7 /.travis.yml
parent339e0c1296c61c9dbc1f8f880c5c668bf4007e5e (diff)
downloadcpython-git-cede1e19bdfb8ddc3d9c0ab536643073f20e53f0.tar.gz
[3.7] Enable GUI testing on Travis Linux builds via Xvfb (GH-7887)
(cherry picked from commit b12112b5ba608cdd7a0962a6b18cad4fe58b46e6)
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml12
1 files changed, 10 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 3a5d203f8c..8b12196366 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,6 +40,10 @@ matrix:
# compiler here and the other to run the coverage build. Clang is preferred
# in this instance for its better error messages.
env: TESTING=cpython
+ addons:
+ apt:
+ packages:
+ - xvfb
- os: linux
language: python
# Build the docs against a stable version of Python so code bugs don't hold up doc-related PRs.
@@ -56,6 +60,10 @@ matrix:
language: c
compiler: gcc
env: OPTIONAL=true
+ addons:
+ apt:
+ packages:
+ - xvfb
before_script:
- ./configure
- make -s -j4
@@ -65,7 +73,7 @@ matrix:
- ./venv/bin/python -m test.pythoninfo
script:
# Skip tests that re-run the entire test suite.
- - ./venv/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures
+ - xvfb-run ./venv/bin/python -m coverage run --pylib -m test --fail-env-changed -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn -x test_concurrent_futures
after_script: # Probably should be after_success once test suite updated to run under coverage.py.
# Make the `coverage` command available to Codecov w/ a version of Python that can parse all source files.
- source ./venv/bin/activate
@@ -135,7 +143,7 @@ script:
# Check that all symbols exported by libpython start with "Py" or "_Py"
- make smelly
# `-r -w` implicitly provided through `make buildbottest`.
- - make buildbottest TESTOPTS="-j4 -uall,-cpu"
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then XVFB_RUN=xvfb-run; fi; $XVFB_RUN make buildbottest TESTOPTS="-j4 -uall,-cpu"
notifications:
email: false