setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
usedevelop = True
-install_command = pip install {opts} {packages}
+install_command =
+ constraints: {[testenv:common-constraints]install_command}
+ pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[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:py34]
commands =
ostestr --whitelist_file=tests-py3.txt
+[testenv:py34-constraints]
+install_command = {[testenv:common-constraints]install_command}
+commands = {[testenv:py34]commands}
+
[testenv:pep8]
commands =
flake8 {posargs} . cinder/common
{toxinidir}/tools/config/check_uptodate.sh
{toxinidir}/tools/check_exec.py {toxinidir}/cinder
+[testenv:pep8-constraints]
+install_command = {[testenv:common-constraints]install_command}
+commands =
+ flake8 {posargs} . cinder/common
+ # Check that .po and .pot files are valid:
+ bash -c "find cinder -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
+ {toxinidir}/tools/config/check_uptodate.sh
+ {toxinidir}/tools/check_exec.py {toxinidir}/cinder
+
[testenv:fast8]
# Use same environment directory as pep8 env to save space and install time
envdir = {toxworkdir}/pep8
pylint==0.26.0
commands = bash tools/lintstack.sh
+[testenv:pylint-constraints]
+install_command = {[testenv:common-constraints]install_command}
+deps = {[testenv:pylint]deps}
+commands = {[testenv:pylint]commands}
+
[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
python setup.py testr --coverage \
--testr-args='^(?!.*test.*coverage).*$'
+[testenv:cover-constraints]
+install_command = {[testenv:common-constraints]install_command}
+commands = {[testenv:cover]commands}
+
[testenv:genconfig]
sitepackages = False
envdir = {toxworkdir}/venv
[testenv:venv]
commands = {posargs}
+[testenv:venv-constraints]
+install_command = {[testenv:common-constraints]install_command}
+commands = {posargs}
+
[testenv:docs]
commands = python setup.py build_sphinx