34ffe71c9b
Change-Id: I9d026ff0e623063c1412363a269f9d103a004cf4 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
102 lines
2.5 KiB
INI
102 lines
2.5 KiB
INI
[tox]
|
|
minversion = 2.3
|
|
envlist = py27,pep8
|
|
skipsdist = True
|
|
|
|
[dcclient]
|
|
client_base_dir = .
|
|
|
|
[testenv]
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
# DISCOVER_DIRECTORY=dcmanagerclient/tests
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
whitelist_externals =
|
|
rm
|
|
find
|
|
reno
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
stestr --test-path={[dcclient]client_base_dir}/dcmanagerclient/tests run '{posargs}'
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
PYTHON=coverage run --parallel-mode
|
|
PYTHONDONTWRITEBYTECODE=True
|
|
|
|
deps = {[testenv]deps}
|
|
coverage
|
|
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
coverage erase
|
|
stestr --test-path={[dcclient]client_base_dir}/dcmanagerclient/tests run '{posargs}'
|
|
coverage combine
|
|
coverage report
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
show-source = True
|
|
ignore = E123,E125,H102
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*openstack/common*,*egg,build
|
|
|
|
[testenv:linters]
|
|
basepython = python3
|
|
# bashate ignore:
|
|
# E006 - accept long lines
|
|
# E040 - false positive on |& syntax (new in bash 4)
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
\( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs -0 yamllint"
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
|
whitelist_externals = rm
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
whitelist_externals =
|
|
rm
|
|
reno
|
|
|
|
[testenv:newnote]
|
|
basepython = python3
|
|
# Re-use the releasenotes venv
|
|
envdir = {toxworkdir}/releasenotes
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = reno new {posargs}
|