Merge "Add -constraints for CI jobs"

This commit is contained in:
Jenkins 2015-11-26 19:56:54 +00:00 committed by Gerrit Code Review
commit d24cae18da

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 -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -86,19 +91,38 @@ commands =
glance.tests.unit.v2.test_schemas_resource \
glance.tests.unit.v2.test_tasks_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
@ -110,6 +134,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:'