2014-09-09 17:34:53 +05:30
|
|
|
[tox]
|
|
|
|
minversion = 1.6
|
2017-02-08 10:03:14 +07:00
|
|
|
envlist = py35,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 =
|
2016-03-31 15:59:11 +00:00
|
|
|
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
|
2015-11-03 17:28:04 +08:00
|
|
|
whitelist_externals = bash
|
|
|
|
find
|
2016-03-29 15:05:57 +08:00
|
|
|
rm
|
2014-09-09 17:34:53 +05:30
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
2016-10-26 13:17:13 +05:30
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2014-09-09 17:34:53 +05:30
|
|
|
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 =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2017-04-03 09:51:46 +00:00
|
|
|
rm -f .testrepository/times.dbm
|
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]
|
2017-03-09 22:40:27 +07:00
|
|
|
commands = oslo_debug_helper -t magnum/tests/unit {posargs}
|
2016-01-10 00:42:39 +08:00
|
|
|
|
|
|
|
[testenv:debug-py27]
|
|
|
|
basepython = python2.7
|
2017-03-09 22:40:27 +07:00
|
|
|
commands = oslo_debug_helper -t magnum/tests/unit {posargs}
|
2016-01-10 00:42:39 +08:00
|
|
|
|
2017-02-08 10:03:14 +07:00
|
|
|
[testenv:debug-py35]
|
|
|
|
basepython = python3.5
|
2017-03-09 22:40:27 +07:00
|
|
|
commands = oslo_debug_helper -t magnum/tests/unit {posargs}
|
2017-01-19 18:49:43 +08:00
|
|
|
|
2015-11-04 15:22:14 +08:00
|
|
|
[testenv:functional-api]
|
2015-04-06 20:59:25 -04:00
|
|
|
sitepackages = True
|
2016-08-27 19:52:02 +05:30
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
OS_TEST_PATH=./magnum/tests/functional/api
|
2015-11-04 15:22:14 +08:00
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2015-11-04 15:22:14 +08:00
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
|
|
|
[testenv:functional-k8s]
|
|
|
|
sitepackages = True
|
2016-08-27 19:52:02 +05:30
|
|
|
setenv = {[testenv]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 =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2015-11-03 17:28:04 +08:00
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
2015-04-05 21:12:56 -04:00
|
|
|
|
2016-07-14 21:25:36 +02:00
|
|
|
[testenv:functional-k8s-ironic]
|
|
|
|
sitepackages = True
|
2016-08-27 19:52:02 +05:30
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
OS_TEST_PATH=./magnum/tests/functional/k8s_ironic
|
2016-07-14 21:25:36 +02:00
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2016-07-14 21:25:36 +02:00
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
2016-02-28 18:21:08 -05:00
|
|
|
[testenv:functional-k8s-coreos]
|
|
|
|
sitepackages = True
|
2016-08-27 19:52:02 +05:30
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
OS_TEST_PATH=./magnum/tests/functional/k8s_coreos
|
2016-02-28 18:21:08 -05:00
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2016-02-28 18:21:08 -05:00
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
2015-11-12 09:45:49 +08:00
|
|
|
[testenv:functional-swarm]
|
|
|
|
sitepackages = True
|
2016-08-27 19:52:02 +05:30
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
OS_TEST_PATH=./magnum/tests/functional/swarm
|
2015-11-12 09:45:49 +08:00
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2015-11-12 09:45:49 +08:00
|
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
|
2015-12-28 13:16:14 +08:00
|
|
|
[testenv:functional-mesos]
|
|
|
|
sitepackages = True
|
2016-08-27 19:52:02 +05:30
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
OS_TEST_PATH=./magnum/tests/functional/mesos
|
2015-12-28 13:16:14 +08:00
|
|
|
OS_TEST_TIMEOUT=7200
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
commands =
|
2016-09-16 09:25:15 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2015-12-28 13:16:14 +08:00
|
|
|
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
|
2016-10-25 22:46:14 +02:00
|
|
|
bash -c "find {toxinidir} \
|
|
|
|
-not \( -type d -name .?\* -prune \) \
|
|
|
|
-not \( -type d -name doc -prune \) \
|
|
|
|
-not \( -type d -name contrib -prune \) \
|
|
|
|
-type f \
|
|
|
|
-name \*.sh \
|
|
|
|
-print0 | xargs -0 bashate -v -iE006,E010,E042 -eE005"
|
2014-09-09 17:34:53 +05:30
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
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
|
|
|
|
2014-09-09 17:34:53 +05:30
|
|
|
[testenv:cover]
|
2017-03-20 19:52:08 +08:00
|
|
|
commands = {toxinidir}/tools/cover.sh {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
|
|
|
|
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]
|
2017-01-17 09:23:40 +07:00
|
|
|
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools,releasenotes
|
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
|
2016-03-29 15:05:57 +08:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2016-06-14 14:09:56 +02:00
|
|
|
|
|
|
|
[testenv:install-guide]
|
|
|
|
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|
2016-08-18 23:23:03 +07:00
|
|
|
|
|
|
|
[testenv:api-ref]
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
2017-03-04 12:12:17 +01:00
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|