687a3127d3
* Replace .testr.conf by .stestr.conf for migration and update .gitignore, test-requirements.txt and lower-constraints.txt files accordingly * Use py3 as the default runtime and 3.18.0 as the minversion for tox * Add group_regex to run all tests Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com> Change-Id: I704356082e2c25d21aff3c5433efa077259b0b1d
82 lines
2.0 KiB
INI
82 lines
2.0 KiB
INI
[tox]
|
|
envlist = pep8,pylint,py3
|
|
minversion = 3.18.0
|
|
skipsdist = True
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
basepython = python3
|
|
deps=
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands= stestr run --slowest {posargs}
|
|
passenv=
|
|
DUMP_CONFIG_GRAPH
|
|
|
|
[testenv:bindep]
|
|
deps = bindep
|
|
commands = bindep test
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs}
|
|
dib-lint
|
|
|
|
[testenv:pylint]
|
|
commands = pylint --rcfile pylint.cfg diskimage_builder
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:func]
|
|
envdir = {toxworkdir}/venv
|
|
commands = {toxinidir}/tests/run_functests.sh {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
allowlist_externals = find
|
|
setenv =
|
|
PYTHON=coverage run --source diskimage_builder --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
deps=
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
basepython = python3
|
|
allowlist_externals =
|
|
rm
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html {posargs}
|
|
|
|
[testenv:releasenotes]
|
|
deps = {[testenv:docs]deps}
|
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[flake8]
|
|
ignore = E125,E126,E127,H202,H803,W503,W504
|
|
exclude = .venv,.git,.tox,dist,doc/build,doc/source,*lib/python*,*egg,build,conf.py
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
# Run without upper-constraints on python3.5, as since Victoria that
|
|
# now is python3.6 only
|
|
[testenv:py35]
|
|
basepython = python3.5
|
|
deps = {[testenv:lower-constraints]deps}
|