From 5406658af287fe86fcbd4f2949f24219ad37530c Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 11 Jul 2017 20:02:48 -0300 Subject: [PATCH 1/2] Use system python directly, bypassing Travis virtual envs Since upgrading to the latest trusty image, the previous approach no longer works. Using system python directly was how I managed to make this work again. --- .travis.yml | 46 +++++++++++++++++++--------------------------- tox.ini | 2 +- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 526ddcc5..c35c3612 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,16 @@ -language: python +language: generic sudo: required dist: trusty -python: - - "2.7" - - "3.4" - -virtualenv: - system_site_packages: true - -matrix: - exclude: - - env: PYTEST_QT_API=pyqt5 - python: "2.7" - env: - - PYTEST_QT_API=pyqt4 - - PYTEST_QT_API=pyqt4v2 - - PYTEST_QT_API=pyside - - PYTEST_QT_API=pyqt5 + - PYTEST_QT_API=pyqt4 PYTHON=python2.7 + - PYTEST_QT_API=pyqt4v2 PYTHON=python2.7 + - PYTEST_QT_API=pyside PYTHON=python2.7 + + - PYTEST_QT_API=pyqt4 PYTHON=python3.4 + - PYTEST_QT_API=pyqt4v2 PYTHON=python3.4 + - PYTEST_QT_API=pyside PYTHON=python3.4 + - PYTEST_QT_API=pyqt5 PYTHON=python3.4 install: - sudo apt-get update @@ -27,16 +19,17 @@ install: - sudo apt-get install -y xvfb herbstluftwm # Qt - - python scripts/install-qt.py + - $PYTHON scripts/install-qt.py - # PyTest - - pip install -U pytest + # Pip (3.4 does not have it by default) + - wget https://bootstrap.pypa.io/get-pip.py + - sudo $PYTHON get-pip.py - # Tox - - pip install -U tox + # Dependencies + - sudo $PYTHON -m pip install -U pytest tox coveralls - # others - - pip install coveralls --use-wheel + # pytest-qt + - sudo $PYTHON setup.py develop before_script: - "export DISPLAY=:99.0" @@ -46,9 +39,8 @@ before_script: - sleep 1 script: - - python setup.py develop - - catchsegv coverage run --source=pytestqt setup.py test - - tox -e lint + - sudo catchsegv coverage run --source=pytestqt setup.py test + - sudo tox -e lint after_success: - coveralls diff --git a/tox.ini b/tox.ini index 9f73858a..8b19c9bf 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ setenv= passenv=DISPLAY XAUTHORITY USER USERNAME [testenv:lint] -basepython=python3.5 +basepython=python3.4 deps= pytest sphinx From a90fd3e9ec53a47eecb11af215c47708a6e1f513 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 11 Jul 2017 20:10:44 -0300 Subject: [PATCH 2/2] Start xvfb manually /etc/init.d/xvfb doesn't exist in the new image --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c35c3612..4f99e9d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ install: before_script: - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" + - start-stop-daemon --start --background --exec /usr/bin/Xvfb -- $DISPLAY -screen 0 1024x768x24 - sleep 3 # give xvfb some time to start - "herbstluftwm &" - sleep 1