2014-10-03 09:26:36 +00:00
|
|
|
[tox]
|
2019-04-22 15:37:29 +05:30
|
|
|
minversion = 2.5.0
|
2015-03-28 10:08:33 -07:00
|
|
|
skipsdist = True
|
2019-07-05 11:38:37 -04:00
|
|
|
envlist = pep8,py27,py37,pypy
|
2014-10-03 09:26:36 +00:00
|
|
|
|
|
|
|
[testenv]
|
2015-12-30 18:49:56 +08:00
|
|
|
usedevelop=True
|
2016-01-08 19:18:56 +08:00
|
|
|
whitelist_externals = find
|
2016-03-22 17:11:28 -07:00
|
|
|
rm
|
2018-04-04 17:20:57 +09:00
|
|
|
install_command = pip install {opts} {packages}
|
2019-06-12 09:52:31 +08:00
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-04 17:20:57 +09:00
|
|
|
-r{toxinidir}/requirements.txt
|
2015-07-10 14:13:47 -07:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-12-11 09:17:42 +09:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2016-01-14 15:31:41 +08:00
|
|
|
OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_TEST_TIMEOUT
|
|
|
|
PYTHON OS_TEST_PATH LISTOPT IDOPTION
|
2016-01-08 19:18:56 +08:00
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2016-09-20 12:09:30 +05:30
|
|
|
find . -type d -name "__pycache__" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
stestr run {posargs}
|
|
|
|
stestr slowest
|
2014-10-03 09:26:36 +00:00
|
|
|
|
2016-09-20 17:48:05 +05:30
|
|
|
[testenv:debug]
|
2017-03-10 21:55:47 +05:30
|
|
|
commands = oslo_debug_helper -t kolla/tests {posargs}
|
2016-09-20 17:48:05 +05:30
|
|
|
|
2016-12-15 18:47:24 +05:30
|
|
|
[testenv:cover]
|
2018-09-26 18:55:18 -04:00
|
|
|
basepython = python3
|
2016-12-15 18:47:24 +05:30
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
NOSE_WITH_COVERAGE=1
|
|
|
|
NOSE_COVER_BRANCHES=1
|
|
|
|
NOSE_COVER_HTML=1
|
|
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
2018-07-10 18:21:28 +07:00
|
|
|
PYTHON=coverage run --source kolla --parallel-mode
|
|
|
|
commands =
|
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
coverage report --show-missing
|
2016-12-15 18:47:24 +05:30
|
|
|
|
2016-02-10 21:39:04 +01:00
|
|
|
[testenv:pep8]
|
2018-09-26 18:55:18 -04:00
|
|
|
basepython = python3
|
2018-02-25 12:12:45 +01:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
yamllint
|
2016-01-13 16:44:11 +00:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/run-bashate.sh
|
|
|
|
flake8 {posargs}
|
2016-05-17 15:39:25 +05:30
|
|
|
{toxinidir}/tools/validate-all-dockerfiles.sh
|
2016-10-20 02:21:35 +08:00
|
|
|
python {toxinidir}/tools/validate-all-file.py
|
2018-08-17 14:46:39 +02:00
|
|
|
bandit --skip B303 -r docker kolla tests tools
|
2018-06-24 16:17:55 +08:00
|
|
|
yamllint -s .
|
2016-01-13 16:44:11 +00:00
|
|
|
|
2016-03-08 11:50:37 -05:00
|
|
|
[testenv:bandit]
|
2018-08-17 14:46:39 +02:00
|
|
|
# B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function.
|
|
|
|
commands = bandit --skip B303 -r docker kolla tests tools
|
2016-03-08 11:50:37 -05:00
|
|
|
|
2015-09-03 00:15:54 +00:00
|
|
|
[testenv:venv]
|
2018-09-26 18:55:18 -04:00
|
|
|
basepython = python3
|
2018-12-13 13:58:12 +00:00
|
|
|
deps =
|
2019-06-12 09:52:31 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-12-13 13:58:12 +00:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2015-09-03 00:15:54 +00:00
|
|
|
commands = {posargs}
|
|
|
|
|
2015-08-28 01:38:42 +00:00
|
|
|
[testenv:docs]
|
2018-09-26 18:55:18 -04:00
|
|
|
basepython = python3
|
2018-04-04 17:20:57 +09:00
|
|
|
deps =
|
2019-06-12 09:52:31 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2018-04-04 17:20:57 +09:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
2016-08-04 15:09:10 +02:00
|
|
|
commands =
|
2017-07-13 16:25:51 +01:00
|
|
|
rm -rf doc/build
|
2016-08-04 15:09:10 +02:00
|
|
|
doc8 doc
|
2018-03-16 01:20:54 +09:00
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
2015-08-28 01:38:42 +00:00
|
|
|
|
2015-11-11 15:44:56 +00:00
|
|
|
[testenv:build-centos-binary]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
2016-01-08 19:18:56 +08:00
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
2015-11-11 15:44:56 +00:00
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestCentosBinary
|
2015-11-11 15:44:56 +00:00
|
|
|
|
|
|
|
[testenv:build-centos-source]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
2016-01-08 19:18:56 +08:00
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
2015-11-11 15:44:56 +00:00
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestCentosSource
|
2015-11-11 15:44:56 +00:00
|
|
|
|
2016-03-15 22:39:30 +08:00
|
|
|
[testenv:build-ubuntu-binary]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestUbuntuBinary
|
2016-03-15 22:39:30 +08:00
|
|
|
|
2015-11-11 15:44:56 +00:00
|
|
|
[testenv:build-ubuntu-source]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
2016-01-08 19:18:56 +08:00
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
2015-11-11 15:44:56 +00:00
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestUbuntuSource
|
2017-02-24 10:30:36 +08:00
|
|
|
|
|
|
|
[testenv:build-debian-binary]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestDebianBinary
|
2017-02-24 10:30:36 +08:00
|
|
|
|
|
|
|
[testenv:build-debian-source]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestDebianSource
|
2015-11-11 15:44:56 +00:00
|
|
|
|
2016-03-01 15:33:46 +00:00
|
|
|
[testenv:build-oraclelinux-binary]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestOracleLinuxBinary
|
2016-03-01 15:33:46 +00:00
|
|
|
|
|
|
|
[testenv:build-oraclelinux-source]
|
|
|
|
whitelist_externals = find
|
|
|
|
bash
|
|
|
|
setenv =
|
|
|
|
DOCKER_BUILD_TEST=1
|
|
|
|
commands =
|
2019-02-12 11:31:56 +01:00
|
|
|
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
|
2018-07-10 18:21:28 +07:00
|
|
|
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
|
|
|
|
stestr run test_build.BuildTestOracleLinuxSource
|
2016-03-01 15:33:46 +00:00
|
|
|
|
2015-12-30 18:49:56 +08:00
|
|
|
[testenv:genconfig]
|
|
|
|
whitelist_externals = which
|
|
|
|
commands=
|
|
|
|
oslo-config-generator --config-file etc/oslo-config-generator/kolla-build.conf
|
|
|
|
|
2016-03-22 17:11:28 -07:00
|
|
|
[testenv:releasenotes]
|
2018-09-26 18:55:18 -04:00
|
|
|
basepython = python3
|
2018-03-16 01:20:54 +09:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-03-22 17:11:28 -07:00
|
|
|
commands =
|
|
|
|
rm -rf releasenotes/build
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
2016-11-12 22:30:10 +08:00
|
|
|
[testenv:bindep]
|
2018-09-26 18:55:18 -04:00
|
|
|
basepython = python3
|
2016-11-12 22:30:10 +08:00
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|
|
|
|
|
2015-07-10 14:13:47 -07:00
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2017-06-21 15:32:29 +08:00
|
|
|
enable-extensions = H203,H106
|
2015-12-21 17:04:09 +00:00
|
|
|
exclude=.eggs,.git,.tox,doc
|
2016-01-19 10:53:32 +08:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
local-check-factory = kolla.hacking.checks.factory
|
2018-03-22 14:21:55 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|