2016-03-01 17:40:04 +00:00
|
|
|
[tox]
|
2021-07-03 13:11:35 +00:00
|
|
|
minversion = 3.18.0
|
2016-03-01 17:40:04 +00:00
|
|
|
skipsdist = True
|
|
|
|
envlist = docs,linters,functional
|
2020-03-02 00:51:58 +00:00
|
|
|
ignore_basepython_conflict = True
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[testenv]
|
2020-03-02 00:51:58 +00:00
|
|
|
basepython = python3
|
2022-04-04 09:42:21 +00:00
|
|
|
usedevelop = False
|
2016-07-08 12:36:09 +00:00
|
|
|
install_command =
|
2020-11-10 05:11:42 +00:00
|
|
|
pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
2016-07-08 12:36:09 +00:00
|
|
|
commands =
|
|
|
|
/usr/bin/find . -type f -name "*.pyc" -delete
|
2016-03-01 17:40:04 +00:00
|
|
|
passenv =
|
2018-08-16 17:23:44 +00:00
|
|
|
COMMON_TESTS_PATH
|
2016-03-01 17:40:04 +00:00
|
|
|
HOME
|
2016-07-08 12:36:09 +00:00
|
|
|
http_proxy
|
|
|
|
HTTP_PROXY
|
|
|
|
https_proxy
|
|
|
|
HTTPS_PROXY
|
|
|
|
no_proxy
|
|
|
|
NO_PROXY
|
2018-08-16 17:23:44 +00:00
|
|
|
TESTING_BRANCH
|
|
|
|
TESTING_HOME
|
|
|
|
USER
|
2021-07-03 13:11:35 +00:00
|
|
|
allowlist_externals =
|
2016-03-01 17:40:04 +00:00
|
|
|
bash
|
|
|
|
setenv =
|
2016-09-09 09:44:51 +00:00
|
|
|
PYTHONUNBUFFERED=1
|
2016-09-28 09:27:39 +00:00
|
|
|
ROLE_NAME=os_nova
|
2016-10-05 11:16:04 +00:00
|
|
|
TEST_IDEMPOTENCE=false
|
2016-09-28 09:27:39 +00:00
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
WORKING_DIR={toxinidir}
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
2018-03-09 02:46:41 +00:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2019-10-18 14:18:44 +00:00
|
|
|
commands =
|
2016-07-08 12:36:09 +00:00
|
|
|
bash -c "rm -rf doc/build"
|
2016-10-05 11:16:04 +00:00
|
|
|
doc8 doc
|
2020-04-14 05:20:30 +00:00
|
|
|
sphinx-build -W --keep-going -b html doc/source doc/build/html
|
2016-03-01 17:40:04 +00:00
|
|
|
|
2019-10-18 14:18:44 +00:00
|
|
|
[testenv:pdf-docs]
|
|
|
|
deps = {[testenv:docs]deps}
|
2021-07-03 13:11:35 +00:00
|
|
|
allowlist_externals =
|
2019-10-18 14:18:44 +00:00
|
|
|
make
|
|
|
|
commands =
|
2019-10-23 17:23:19 +00:00
|
|
|
sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
|
2019-10-18 14:18:44 +00:00
|
|
|
make -C doc/build/pdf
|
|
|
|
|
2016-10-05 11:16:04 +00:00
|
|
|
[doc8]
|
|
|
|
# Settings for doc8:
|
|
|
|
extensions = .rst
|
|
|
|
|
2016-07-08 12:36:09 +00:00
|
|
|
[testenv:releasenotes]
|
2018-03-09 02:46:41 +00:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
2016-07-08 12:36:09 +00:00
|
|
|
commands =
|
2019-10-23 17:23:19 +00:00
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
2016-07-08 12:36:09 +00:00
|
|
|
|
2016-03-01 17:40:04 +00:00
|
|
|
# environment used by the -infra templated docs job
|
|
|
|
[testenv:venv]
|
2016-07-08 12:36:09 +00:00
|
|
|
commands =
|
|
|
|
{posargs}
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
commands =
|
2016-09-28 09:27:39 +00:00
|
|
|
bash -c "{toxinidir}/tests/common/test-pep8.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
# Ignores the following rules due to how ansible modules work in general
|
|
|
|
# F403 'from ansible.module_utils.basic import *' used;
|
|
|
|
# unable to detect undefined names
|
2016-12-06 01:38:23 +00:00
|
|
|
ignore=F403
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[testenv:bashate]
|
|
|
|
commands =
|
2016-09-28 09:27:39 +00:00
|
|
|
bash -c "{toxinidir}/tests/common/test-bashate.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
|
2016-07-08 12:36:09 +00:00
|
|
|
[testenv:ansible-syntax]
|
|
|
|
commands =
|
2016-10-05 11:16:04 +00:00
|
|
|
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[testenv:ansible-lint]
|
|
|
|
commands =
|
2016-10-05 11:16:04 +00:00
|
|
|
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
|
2016-08-02 18:47:41 +00:00
|
|
|
[testenv:functional]
|
2016-03-01 17:40:04 +00:00
|
|
|
commands =
|
2016-10-05 11:16:04 +00:00
|
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
|
2018-05-09 14:31:57 +00:00
|
|
|
[testenv:distro_install]
|
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
ANSIBLE_PARAMETERS=-e @{toxinidir}/tests/common/test-distro_install-vars.yml
|
|
|
|
commands =
|
|
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
|
|
|
|
[testenv:linters]
|
|
|
|
commands =
|
2018-07-01 16:07:10 +00:00
|
|
|
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
|
2016-03-01 17:40:04 +00:00
|
|
|
{[testenv:pep8]commands}
|
|
|
|
{[testenv:bashate]commands}
|
|
|
|
{[testenv:ansible-lint]commands}
|
|
|
|
{[testenv:ansible-syntax]commands}
|