Add -constraints for CI jobs
This adds the constraints factor to the base section and duplicates the sections required for CI with -constraints as tox does not currently support factors in sections. Work towards enabling factor support in sections is currently stalled, as such we will need to duplicate sections adding -constraints to facilitate running sections with the constrained install_command. Implements Blueprint: Requirements-Management Change-Id: Ibbeabdf65c1405bf4d35e21375636dcc4583bbc2
This commit is contained in:
parent
52623b9edd
commit
97975ed317
30
tox.ini
30
tox.ini
@ -6,7 +6,9 @@ skipsdist = True
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
install_command =
|
||||
constraints: {[testenv:common-constraints]install_command}
|
||||
pip install -U {opts} {packages}
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}'
|
||||
whitelist_externals = bash
|
||||
@ -15,6 +17,9 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:common-constraints]
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
|
||||
[testenv:releasenotes]
|
||||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
@ -78,19 +83,38 @@ commands =
|
||||
glance.tests.unit.v2.test_metadef_resources \
|
||||
glance.tests.unit.v2.test_schemas_resource
|
||||
|
||||
[testenv:py34-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands = {[testenv:py34]commands}
|
||||
|
||||
[testenv:pep8]
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
# Check that .po and .pot files are valid:
|
||||
bash -c "find glance -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
|
||||
[testenv:pep8-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
# Check that .po and .pot files are valid:
|
||||
bash -c "find glance -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
|
||||
[testenv:cover]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
commands = python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
|
||||
|
||||
[testenv:cover-constraints]
|
||||
setenv = {[testenv:cover]setenv}
|
||||
commands = {[testenv:cover]commands}
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:venv-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:genconfig]
|
||||
commands =
|
||||
oslo-config-generator --config-file etc/oslo-config-generator/glance-api.conf
|
||||
@ -102,6 +126,10 @@ commands =
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:docs-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[flake8]
|
||||
# TODO(dmllr): Analyze or fix the warnings blacklisted below
|
||||
# E711 comparison to None should be 'if cond is not None:'
|
||||
|
Loading…
x
Reference in New Issue
Block a user