Fix tox python3 overrides & add lower-constraints

Change-Id: Ic88342a8a48456cc44c5b7e0b5fbcbf9ed256980
Signed-off-by: Trinh Nguyen <dangtrinhnt@gmail.com>
This commit is contained in:
Trinh Nguyen 2018-09-08 10:37:22 +09:00
parent 55f0fcdf02
commit 7c9391ce21
2 changed files with 30 additions and 3 deletions

11
lower-constraints.txt Normal file
View File

@ -0,0 +1,11 @@
coverage==4.0 # Apache-2.0
hacking==0.12.0 # Apache-2.0
coverage==4.0 # Apache-2.0
openstackdocstheme==1.18.1 # Apache-2.0
oslotest==1.10.0 # Apache-2.0
pbr==2.0 # Apache-2.0
python-subunit==0.0.18 # Apache-2.0/BSD
reno==2.5.0 # Apache-2.0
sphinx==1.6.2 # BSD
stestr==1.0.0 # Apache-2.0
testtools==1.4.0 # MIT

22
tox.ini
View File

@ -1,27 +1,33 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
envlist = py35,pep8 envlist = py36,py35,py27,pep8,docs
skipsdist = True skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} install_command = pip install -U {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning
OS_STDOUT_CAPTURE=1 OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1 OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60 OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = stestr run {posargs} commands = stestr run {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
PYTHON=coverage run --source fenix --parallel-mode PYTHON=coverage run --source fenix --parallel-mode
@ -32,15 +38,18 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:docs] [testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
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:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[flake8] [flake8]
@ -50,3 +59,10 @@ show-source = True
ignore = E123,E125 ignore = E123,E125
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt