68 lines
1.8 KiB
INI
68 lines
1.8 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py{35,27},pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
EVENTLET_NO_GREENDNS=yes
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.utf-8
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-egit+https://github.com/openstack/nova.git#egg=nova
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
rm
|
|
env
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -Rf .testrepository/times.dbm
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
|
|
|
|
[testenv:py27]
|
|
commands =
|
|
{[testenv]commands}
|
|
/bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py27/src/nova/nova/virt/
|
|
ostestr '{posargs}'
|
|
|
|
[testenv:py35]
|
|
commands =
|
|
{[testenv]commands}
|
|
/bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py35/src/nova/nova/virt/
|
|
ostestr '{posargs}'
|
|
|
|
[testenv:pep8]
|
|
basepython = python2.7
|
|
deps = {[testenv]deps}
|
|
commands = flake8 {toxinidir}/nova
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
# tests conflict with coverage.
|
|
commands =
|
|
coverage erase
|
|
find . -type f -name "*.pyc" -delete
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[flake8]
|
|
# H803 skipped on purpose per list discussion.
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
show-source = True
|
|
ignore = E123,E125,H803,H904,H405,H404,H305,H306,H307
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools/colorizer.py
|