Update constraints handling

Change-Id: I948c64fb42aad8fe5e956e821f3331a266c80db0
This commit is contained in:
Ilya Shakhat
2019-05-29 16:55:19 +02:00
parent b53ee47466
commit bce5702bec

47
tox.ini
View File

@@ -1,48 +1,33 @@
[tox] [tox]
minversion = 2.6 minversion = 2.6
envlist = pep8-constraints,py27-constraints,py36-constraints,cover envlist = pep8,py27,py36,cover
skipsdist = True skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = True
install_command = deps =
constraints: {[testenv:common-constraints]install_command} -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
pip install -U {opts} {packages} -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install -U {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
whitelist_externals = whitelist_externals =
find find
rm rm
deps =
-r{toxinidir}/test-requirements.txt
commands = commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
py.test -vvvv --html={envlogdir}/pytest_results.html --self-contained-html --durations=10 "os_faults/tests/unit" {posargs} py.test -vvvv --html={envlogdir}/pytest_results.html --self-contained-html --durations=10 "os_faults/tests/unit" {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:common-constraints]
basepython = python3
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
commands = flake8 . doc/ext commands = flake8 . doc/ext
[testenv:pep8-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:pep8]commands}
[testenv:venv] [testenv:venv]
basepython = python3 basepython = python3
commands = {posargs} commands = {posargs}
[testenv:venv-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command}
commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3 basepython = python3
commands = commands =
@@ -50,11 +35,6 @@ commands =
coverage html -d {envlogdir} coverage html -d {envlogdir}
coverage report coverage report
[testenv:cover-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:cover]commands}
[testenv:devstack] [testenv:devstack]
# to execute the tests: # to execute the tests:
# 1) create SSH key in os-faults folder: ssh-keygen -t rsa -f os_faults_key -N '' # 1) create SSH key in os-faults folder: ssh-keygen -t rsa -f os_faults_key -N ''
@@ -80,21 +60,6 @@ basepython = python3
commands = commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:docs]commands}
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:debug-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:debug]commands}
[flake8] [flake8]
# E123 skipped because it is ignored by default in the default pep8. # E123 skipped because it is ignored by default in the default pep8.
# E125 skipped until https://github.com/jcrocholl/pep8/issues/126 is resolved. # E125 skipped until https://github.com/jcrocholl/pep8/issues/126 is resolved.