always use pip constraints

This flips the tox.ini to always use constraints installation for all
targets. It drops the extra -constraints targets in the process. This
makes it so there is no developer change required to operate in our
new world order.

Change-Id: I857032002c2ca873510ce7c39138e0e35cc5d3b3
This commit is contained in:
Sean Dague
2016-01-13 13:46:40 -05:00
parent dbdf27021c
commit 1f0dec3a03

60
tox.ini
View File

@@ -9,9 +9,7 @@ usedevelop = True
whitelist_externals = bash
find
rm
install_command =
constraints: {[testenv:common-constraints]install_command}
pip install -U --force-reinstall {opts} {packages}
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./nova/tests/unit
LANGUAGE=en_US
@@ -27,9 +25,6 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
[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:pep8]
commands =
bash tools/flake8wrap.sh {posargs}
@@ -37,11 +32,6 @@ commands =
bash -c "find nova -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 =
bash tools/flake8wrap.sh {posargs}
[testenv:py34]
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
# .testrepository and try again. Running py34 before py27 is OK, but not the
@@ -51,16 +41,8 @@ commands =
find . -type f -name "*.pyc" -delete
ostestr --blacklist_file tests-py3.txt
[testenv:py34-constraints]
install_command = {[testenv:common-constraints]install_command}
setenv = {[testenv]setenv}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {[testenv:py34]commands}
[testenv:functional]
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./nova/tests/functional
LANGUAGE=en_US
@@ -70,7 +52,6 @@ commands =
[testenv:api-samples]
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
GENERATE_SAMPLES=True
PYTHONHASHSEED=0
@@ -80,31 +61,16 @@ commands =
find . -type f -name "*.pyc" -delete
bash tools/pretty_tox.sh '{posargs}'
[testenv:functional-constraints]
usedevelop = {[testenv:functional]usedevelop}
install_command = {[testenv:common-constraints]install_command}
setenv = {[testenv:functional]setenv}
commands =
find . -type f -name "*.pyc" -delete
bash tools/pretty_tox.sh '{posargs}'
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands =
coverage erase
python setup.py testr --coverage \
--testr-args='{posargs}'
coverage combine
coverage html --include='nova/*' --omit='nova/openstack/common/*' -d covhtml -i
[testenv:cover-constraints]
install_command = {[testenv:common-constraints]install_command}
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
coverage erase
python setup.py testr --coverage \
@@ -115,10 +81,6 @@ commands =
[testenv:venv]
commands = {posargs}
[testenv:venv-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = {posargs}
[testenv:docs]
commands =
rm -rf doc/source/api doc/build api-guide/build
@@ -130,17 +92,21 @@ commands =
[testenv:api-guide]
# This environment is called from CI scripts to test and publish
# the API Guide to developer.openstack.org.
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
sphinx-build -b html -d api-guide/build/doctrees api-guide/source api-guide/build/html
[testenv:docs-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:docs]commands}
[testenv:bandit]
commands = bandit -c bandit.yaml -r nova -n 5 -ll
[testenv:releasenotes]
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html