diff --git a/.travis.yml b/.travis.yml index 876b8e65f..63cade1f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,6 @@ language: python python: - "2.7" -# Cache packages download with apt -cache: - directories: - - $HOME/.pip-cache/ - before_install: - lsb_release -a - sudo add-apt-repository ppa:deluge-team/ppa -y @@ -17,13 +12,14 @@ before_install: install: - bash -c "echo $APTPACKAGES" - sudo apt-get install $APTPACKAGES - - pip install "tox>=1.8" --download-cache $HOME/.pip-cache + - pip install "tox>=1.8" env: global: - PIP_DOWNLOAD_CACHE=$HOME/.pip-cache/ - APTPACKAGES="python-libtorrent" - APTPACKAGES_GTKUI="python-gobject python-glade2" + - DISPLAY=:99.0 matrix: - TOX_ENV=pydef - TOX_ENV=flake8 @@ -43,8 +39,8 @@ virtualenv: before_script: - export PYTHONPATH=$PYTHONPATH:$PWD - python -c "import libtorrent as lt; print lt.version" - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start + - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" script: + - bash -c "echo $DISPLAY" - tox -e $TOX_ENV diff --git a/tox.ini b/tox.ini index dd60edaae..331a6ebd9 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,7 @@ envlist = py27, flake8, isort, docs minversion=1.8 [testenv] +passenv = DISPLAY setenv = PYTHONPATH = {env:PWD}: sitepackages = True deps = @@ -81,7 +82,9 @@ deps = whitelist_externals = {[testenv]whitelist_externals} isort -commands = python -c "import subprocess, sys; output = subprocess.check_output('isort --stdout --diff --recursive deluge docs win32 *.py', shell=True); print output; sys.exit(len(output) != 0)" +commands = + isort --version + python -c "import subprocess, sys; output = subprocess.check_output('isort --diff --recursive deluge docs win32 *.py', shell=True); print output; sys.exit(len(output) != 0)" [testenv:flake8] setenv = {[testenv]setenv}