
This is a mechanically generated patch to ensure unit testing is in place for all of the Tested Runtimes for Train. See the Train python3-updates goal document for details: https://governance.openstack.org/tc/goals/train/python3-updates.html Change-Id: I7bc8cdab79bfe2fdf8930ec3d228201effe1bdd6 Story: #2005924 Task: #34253
118 lines
2.8 KiB
INI
118 lines
2.8 KiB
INI
[tox]
|
|
minversion = 3.8
|
|
envlist = linters,py27,py37,molecule
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
ANSIBLE_FORCE_COLOR=1
|
|
ANSIBLE_INVENTORY={toxinidir}/tests/hosts.ini
|
|
ANSIBLE_NOCOWS=1
|
|
ANSIBLE_RETRY_FILES_ENABLED=0
|
|
ANSIBLE_STDOUT_CALLBACK=debug
|
|
PY_COLORS=1
|
|
VIRTUAL_ENV={envdir}
|
|
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
|
|
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
|
|
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
passenv =
|
|
ANSIBLE_*
|
|
DOCKER_*
|
|
MOLECULE_*
|
|
PYTEST*
|
|
SSH_AUTH_SOCK
|
|
TERM
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = stestr run {posargs}
|
|
whitelist_externals =
|
|
bash
|
|
tox
|
|
|
|
[testenv:bindep]
|
|
deps = bindep
|
|
commands = bash -c "{toxinidir}/scripts/bindep-install"
|
|
|
|
# deprecated: covered by linters
|
|
[testenv:pep8]
|
|
skip_install = true
|
|
deps =
|
|
commands =
|
|
tox -e linters -- flake8
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
PYTHON=coverage run --source tripleo_common --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
# deprecated: covered by linters
|
|
[testenv:bashate]
|
|
skip_install = true
|
|
deps =
|
|
commands =
|
|
tox -e linters -- bashate
|
|
[testenv:molecule]
|
|
deps =
|
|
ansi2html
|
|
docker>=3.7
|
|
mock
|
|
molecule>=2.22rc3
|
|
pytest
|
|
pytest-cov
|
|
pytest-html
|
|
pytest-molecule>=1.0rc1
|
|
pytest-xdist
|
|
selinux
|
|
commands =
|
|
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs:roles}
|
|
|
|
[testenv:linters]
|
|
skip_install = true
|
|
deps = pre-commit
|
|
commands =
|
|
python -m pre_commit run -a {posargs:}
|
|
bash -c tools/check_duplicate_jinja_blocks.sh
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = bash -c tools/releasenotes_tox.sh
|
|
|
|
[testenv:requirements]
|
|
basepython = python3
|
|
deps =
|
|
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
|
|
whitelist_externals = sh
|
|
commands =
|
|
sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'
|