1eed8fd786
Using tox for requirements management requires in-repo requirements files for all our repositories. Rather than do that, we make use of the tests repo to capture our common requirements and use this to install them. This reduces our review requirement rate and simplifies maintenance for us for the tox config. It also makes it usable with 'Depends-On', which is marvellous! The tox requirements definitions for docs/releasenotes builds are left in-place as those are standard entries across the community. If that changes at some point, we can re-assess those entries too. Depends-On: https://review.openstack.org/579208 Change-Id: Ie58bf2e8211f57657b66db9d38fee3d1d00e7098
143 lines
3.1 KiB
INI
143 lines
3.1 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
skipsdist = True
|
|
envlist = docs,linters,functional
|
|
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command =
|
|
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
commands =
|
|
/usr/bin/find . -type f -name "*.pyc" -delete
|
|
passenv =
|
|
HOME
|
|
USER
|
|
http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
whitelist_externals =
|
|
bash
|
|
setenv =
|
|
PYTHONUNBUFFERED=1
|
|
ROLE_NAME=lxc_container_create
|
|
TEST_IDEMPOTENCE=false
|
|
VIRTUAL_ENV={envdir}
|
|
WORKING_DIR={toxinidir}
|
|
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands=
|
|
bash -c "rm -rf doc/build"
|
|
doc8 doc
|
|
sphinx-build -b html doc/source doc/build/html
|
|
|
|
|
|
[doc8]
|
|
# Settings for doc8:
|
|
extensions = .rst
|
|
|
|
|
|
[testenv:releasenotes]
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
# environment used by the -infra templated docs job
|
|
[testenv:venv]
|
|
commands =
|
|
{posargs}
|
|
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-pep8.sh"
|
|
|
|
|
|
[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
|
|
ignore=F403
|
|
|
|
|
|
[testenv:bashate]
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-bashate.sh"
|
|
|
|
|
|
[testenv:ansible-syntax]
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
|
|
|
|
|
|
[testenv:ansible-lint]
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
|
|
|
|
|
|
# Functional testing for BTRFS backed containers
|
|
[testenv:btrfs]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
ANSIBLE_OVERRIDES={toxinidir}/tests/overrides-btrfs.yml
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
|
|
|
|
|
# Functional testing for Directory backed containers
|
|
[testenv:dir]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
ANSIBLE_OVERRIDES={toxinidir}/tests/overrides-dir.yml
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
|
|
|
|
|
# Functional testing for machinectl backed containers
|
|
[testenv:mnctl]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
ANSIBLE_OVERRIDES={toxinidir}/tests/overrides-machinectl.yml
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
|
|
|
|
|
# Functional testing for OverlayFS backed containers
|
|
[testenv:ofs]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
ANSIBLE_OVERRIDES={toxinidir}/tests/overrides-overlayfs.yml
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
|
|
|
|
|
# Functional testing for ZFS backed containers
|
|
[testenv:zfs]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
ANSIBLE_OVERRIDES={toxinidir}/tests/overrides-zfs.yml
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
|
|
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
{[testenv:dir]setenv}
|
|
commands =
|
|
{[testenv:dir]commands}
|
|
|
|
|
|
[testenv:linters]
|
|
commands =
|
|
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
|
|
{[testenv:pep8]commands}
|
|
{[testenv:bashate]commands}
|
|
{[testenv:ansible-lint]commands}
|
|
{[testenv:ansible-syntax]commands}
|