2014-09-09 17:34:53 +05:30
|
|
|
[tox]
|
|
|
|
minversion = 1.6
|
2016-03-01 02:12:52 +08:00
|
|
|
envlist = py34,py27,pep8
|
2014-09-09 17:34:53 +05:30
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
2015-10-30 15:13:06 +09:00
|
|
|
install_command =
|
|
|
|
constraints: {[testenv:common-constraints]install_command}
|
|
|
|
pip install -U {opts} {packages}
|
2015-11-03 17:28:04 +08:00
|
|
|
whitelist_externals = bash
|
|
|
|
find
|
2014-09-09 17:34:53 +05:30
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2016-01-22 13:03:54 -05:00
|
|
|
passenv = TEMPEST_* OS_TEST_*
|
2015-09-06 11:36:16 +08:00
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
2015-11-03 17:28:04 +08:00
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
2014-09-09 17:34:53 +05:30
|
|
|
|
2016-01-10 00:42:39 +08:00
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
|
|
|
[testenv:debug-py27]
|
|
|
|
basepython = python2.7
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2015-10-30 15:13:06 +09:00
|
|
|
[testenv:common-constraints]
|
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
|
|
|
2015-11-04 15:22:14 +08:00
|
|
|
[testenv:functional-api]
|
2015-04-06 20:59:25 -04:00
|
|
|
sitepackages = True
|
2015-11-04 15:22:14 +08:00
|
|
|
setenv = OS_TEST_PATH=./magnum/tests/functional/api
|
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
|
|
|
[testenv:functional-k8s]
|
|
|
|
sitepackages = True
|
|
|
|
setenv = OS_TEST_PATH=./magnum/tests/functional/k8s
|
2015-04-14 17:28:14 -04:00
|
|
|
OS_TEST_TIMEOUT=7200
|
2015-04-05 21:12:56 -04:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
2015-11-03 17:28:04 +08:00
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
2015-04-05 21:12:56 -04:00
|
|
|
|
2015-11-12 09:45:49 +08:00
|
|
|
[testenv:functional-swarm]
|
|
|
|
sitepackages = True
|
|
|
|
setenv = OS_TEST_PATH=./magnum/tests/functional/swarm
|
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
2015-12-28 13:16:14 +08:00
|
|
|
[testenv:functional-mesos]
|
|
|
|
sitepackages = True
|
|
|
|
setenv = OS_TEST_PATH=./magnum/tests/functional/mesos
|
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
2014-09-09 17:34:53 +05:30
|
|
|
[testenv:pep8]
|
2015-06-01 08:55:06 +08:00
|
|
|
commands =
|
2015-10-21 17:02:58 +01:00
|
|
|
doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
|
2015-11-03 17:28:04 +08:00
|
|
|
bash tools/flake8wrap.sh {posargs}
|
2016-03-09 10:15:26 -08:00
|
|
|
bandit -r magnum -x tests -n5 -ll
|
2014-09-09 17:34:53 +05:30
|
|
|
|
2015-10-30 15:13:06 +09:00
|
|
|
[testenv:pep8-constraints]
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
commands =
|
|
|
|
doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
|
|
|
|
bash tools/flake8wrap.sh {posargs}
|
2016-03-09 10:15:26 -08:00
|
|
|
bandit -r magnum -x tests -n5 -ll
|
2015-10-30 15:13:06 +09:00
|
|
|
|
2014-09-09 17:34:53 +05:30
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2015-10-30 15:13:06 +09:00
|
|
|
[testenv:venv-constraints]
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
commands = {posargs}
|
|
|
|
|
2015-04-08 10:18:24 -07:00
|
|
|
[testenv:bandit]
|
2015-11-16 19:04:31 -06:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2016-03-09 10:15:26 -08:00
|
|
|
commands = bandit -r magnum -x tests -n5 -ll
|
2015-04-08 10:18:24 -07:00
|
|
|
|
2015-10-30 15:13:06 +09:00
|
|
|
[testenv:bandit-constraints]
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
deps = {[testenv:bandit]deps}
|
|
|
|
commands = {[testenv:bandit]commands}
|
|
|
|
|
2014-09-09 17:34:53 +05:30
|
|
|
[testenv:cover]
|
|
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
2015-12-15 21:46:02 +00:00
|
|
|
coverage report
|
2014-09-09 17:34:53 +05:30
|
|
|
|
2015-10-30 15:13:06 +09:00
|
|
|
[testenv:cover-constraints]
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
|
2014-09-09 17:34:53 +05:30
|
|
|
[testenv:docs]
|
2015-09-16 16:52:43 +01:00
|
|
|
commands =
|
|
|
|
doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
|
|
|
|
python setup.py build_sphinx
|
2014-09-09 17:34:53 +05:30
|
|
|
|
2015-10-30 15:13:06 +09:00
|
|
|
[testenv:docs-constraints]
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
commands = {[testenv:docs]commands}
|
|
|
|
|
2014-11-24 12:23:11 -08:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
2016-01-27 09:59:15 +08:00
|
|
|
oslo-config-generator --config-file etc/magnum/magnum-config-generator.conf
|
2014-11-24 12:23:11 -08:00
|
|
|
|
2014-09-09 17:34:53 +05:30
|
|
|
[flake8]
|
2015-12-24 04:20:18 -05:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,magnum/common/pythonk8sclient
|
2015-05-15 20:10:49 -04:00
|
|
|
|
2015-06-16 16:34:05 +08:00
|
|
|
[hacking]
|
|
|
|
local-check-factory = magnum.hacking.checks.factory
|
|
|
|
|
2015-05-15 20:10:49 -04:00
|
|
|
[testenv:pip-missing-reqs]
|
|
|
|
# do not install test-requirements as that will pollute the virtualenv for
|
|
|
|
# determining missing packages
|
|
|
|
# this also means that pip-missing-reqs must be installed separately, outside
|
|
|
|
# of the requirements.txt files
|
|
|
|
deps = pip_missing_reqs
|
|
|
|
-rrequirements.txt
|
|
|
|
commands=pip-missing-reqs -d --ignore-file=magnum/tests/* magnum
|