
This change will allow this repo to pass zuul now that this has merged: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Tox 4 deprecated whitelist_externals. Replace whitelist_externals with allowlist_externals skipsdist and usedevelop are incompatible in tox 4. Setting tox < 4 in .zuul.yaml rather than trying to figure out why the sysinv component is not properly installing in tox. Partial-Bug: #1997255 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: If8e339d20e57e0830ea4ce27c098bacfef2f2ef8
93 lines
2.5 KiB
INI
93 lines
2.5 KiB
INI
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
[tox]
|
|
envlist = flake8, pylint, py27, py36, py39
|
|
# Tox does not work if the path to the workdir is too long, so move it to /tmp
|
|
toxworkdir = /tmp/{env:USER}_cctox
|
|
stxdir = {toxinidir}/../../..
|
|
|
|
[testenv]
|
|
allowlist_externals = find
|
|
install_command = pip install \
|
|
--no-cache-dir \
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
|
{opts} {packages}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-e{[tox]stxdir}/fault/fm-api/source
|
|
-e{[tox]stxdir}/config/tsconfig/tsconfig
|
|
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
|
|
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
deps = {[testenv]deps}
|
|
passenv = CURL_CA_BUNDLE
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:py36]
|
|
basepython = python3.6
|
|
deps = {[testenv]deps}
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
deps = {[testenv]deps}
|
|
pylint
|
|
|
|
commands = pylint {posargs} controllerconfig --rcfile=./pylint.rc --extension-pkg-whitelist=netifaces
|
|
|
|
[testenv:flake8]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:py39]
|
|
basepython = python3.9
|
|
install_command = pip install \
|
|
--no-cache-dir \
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
|
{opts} {packages}
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[flake8]
|
|
# H series are hacking
|
|
# H101: Use TODO(NAME)
|
|
# H102: Apache 2.0 license header not found
|
|
# H104: File contains nothing but comments
|
|
# H306: imports not in alphabetical order
|
|
# H401: docstring should not start with a space
|
|
# H404: multi line docstring should start without a leading new line
|
|
# H405: multi line docstring summary not separated with an empty line
|
|
ignore = H101,H102,H104,H306,H401,H404,H405
|
|
exclude = build
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
deps = {[testenv]deps}
|
|
|
|
commands =
|
|
coverage erase
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage xml
|
|
coverage report
|
|
|