passenv = TRACE_FAILONLY
usedevelop = True
install_command =
- constraints: pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
+ constraints: {[testenv:common-constraints]install_command}
pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
setenv = OS_TEST_TIMEOUT=180
commands = false
+[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:dsvm]
# Fake job to define environment variables shared between dsvm jobs
setenv = OS_SUDO_TESTING=1
sh
bash
+[testenv:pep8-constraints]
+basepython = {[testenv:pep8]basepython}
+install_command = {[testenv:common-constraints]install_command}
+deps =
+ {[testenv]deps}
+commands=
+ # If it is easier to add a check via a shell script, consider adding it in this file
+ sh ./tools/misc-sanity-checks.sh
+ {toxinidir}/tools/check_unit_test_structure.sh
+ # Checks for coding and style guidelines
+ flake8
+ sh ./tools/coding-checks.sh --pylint '{posargs}'
+ neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
+whitelist_externals = {[testenv:pep8]whitelist_externals}
+
[testenv:cover]
basepython = python2.7
commands =
python setup.py testr --coverage --testr-args='{posargs}'
+[testenv:cover-constraints]
+basepython = {[testenv:cover]basepython}
+install_command = {[testenv:common-constraints]install_command}
+commands =
+ python setup.py testr --coverage --testr-args='{posargs}'
+
[testenv:venv]
commands = {posargs}
+[testenv:venv-constraints]
+install_command = {[testenv:common-constraints]install_command}
+commands = {posargs}
+
[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html
+[testenv:docs-constraints]
+install_command = {[testenv:common-constraints]install_command}
+commands = {[testenv:docs]commands}
+
[flake8]
# E125 continuation line does not distinguish itself from next logical line
# E126 continuation line over-indented for hanging indent