poppy/tox.ini

95 lines
2.6 KiB
INI

[tox]
minversion = 1.6
envlist = py34,py27,functional,functional-py34,pypy,pep8
skipsdist = True
[testenv]
usedevelop = True
# Customize pip command, add -U to force updates.
setenv = VIRTUAL_ENV={envdir}
LC_ALL = en_US.UTF-8
install_command = pip install -U {opts} {packages}
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/tests/test-requirements.txt
commands = pip install git+https://github.com/stackforge/opencafe.git#egg=cafe
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:common]
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
setenv = OS_TEST_TIMEOUT=180
[testenv:functional]
basepython = python2.7
setenv = {[testenv]setenv}
{[testenv:common]setenv}
OS_TEST_PATH=./tests/functional
OS_LOG_PATH={env:OS_LOG_PATH:{homedir}/.poppy/logs}
deps =
{[testenv]deps}
[testenv:functional-py34]
basepython = python3.4
setenv = {[testenv:functional]setenv}
deps =
{[testenv:functional]deps}
[testenv:pep8]
commands = flake8
[testenv:lint2]
basepython = python2
deps = {[testenv]deps}
pylint
commands = pylint ./poppy
pylint ./tests
[testenv:lint3]
basepython = python3
deps = {[testenv]deps}
pylint
commands = pylint ./poppy
pylint ./tests
[testenv:docs]
deps = -r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/tests/test-requirements.txt
commands =
python setup.py build_sphinx -E -a
python setup.py build_sphinx -E -a -b doctest
python setup.py build_sphinx -E -a -b coverage
[testenv:cover]
install_command = pip install -U {opts} {packages}
basepython = python2.7
commands =
python setup.py test --coverage --coverage-package-name='poppy' --testr-args='{posargs}'
coverage xml
[testenv:venv]
commands = {posargs}
[flake8]
builtins = __CDN_SETUP__
exclude = build,.venv*,venv*,.git,.tox,dist,doc,*lib/python*,*.egg,.update-venv
[hacking]
import_exceptions = poppy.common._i18n._
[testenv:api]
deps = -r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/tests/test-requirements.txt
setenv = CAFE_CONFIG_FILE_PATH={homedir}/.poppy/tests.conf
CAFE_ENGINE_CONFIG_FILE_PATH={homedir}/.poppy/tests.conf
CAFE_ROOT_LOG_PATH={homedir}/.poppy/logs
CAFE_TEST_LOG_PATH={homedir}/.poppy/logs
OS_TEST_PATH=./tests/api
OS_LOG_PATH={env:OS_LOG_PATH:{homedir}/.poppy/logs}
commands =
pip install git+https://github.com/openstack/opencafe.git#egg=cafe
#./run_poppy.sh -d
{toxinidir}/tools/ostestr_compat_shim.sh