mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 03:55:43 +00:00
[Tests] Fix Xvfb for GTKUI tests running on TravisCI
This commit is contained in:
parent
a39ebae0cd
commit
379ba33bb9
12
.travis.yml
12
.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
|
||||
|
5
tox.ini
5
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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user