Files
f5646a313ca3fc7ac77745671e4c1a43dcd3138c
networking-bgpvpn /tox.ini
Luong Anh Tuan b060b655b5 Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to
oslo_debug_helper to indicate the directory where tests
are located. This will solves ImportError exception.
[1] https://docs.openstack.org/developer/oslotest/features.html
Change-Id: I0e4b2707a4f9bd6b1449624ba585ece5dab7c451
Closes-Bug: #1666560 
2017年03月15日 01:16:14 +00:00

99 lines
2.9 KiB
INI

[tox]
minversion = 1.6
envlist = py35,py27,pypy,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {toxinidir}/tools/ostestr_compat_shim.sh {posargs}
python {toxinidir}/tools/django-manage.py test bgpvpn_dashboard.test.api_tests.bgpvpn_tests
[testenv:releasenotes]
commands = sphinx-build -W -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
deps =
{[testenv]deps}
commands =
flake8
flake8 doc/source/samples
pylint --version
pylint --rcfile=.pylintrc --output-format=colorized {posargs:networking_bgpvpn}
pylint --rcfile=.pylintrc --output-format=colorized doc/source/samples
neutron-db-manage --subproject networking-bgpvpn --database-connection sqlite:// check_migration
[testenv:dsvm]
setenv = OS_FAIL_ON_MISSING_DEPS=1
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
[testenv:functional]
setenv = {[testenv]setenv}
OS_TEST_TIMEOUT=180
OS_TEST_PATH=./networking_bgpvpn/tests/functional
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
deps =
{[testenv]deps}
-r{toxinidir}/networking_bgpvpn/tests/functional/requirements.txt
commands =
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:dsvm-functional]
basepython = python2.7
setenv = {[testenv:functional]setenv}
{[testenv:dsvm]setenv}
sitepackages=True
deps =
{[testenv:functional]deps}
commands =
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
# If you are running the tests locally you should set the env variable
# TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
[testenv:api]
sitepackages = True
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/networking_bgpvpn_tempest/tests/api
OS_TESTR_CONCURRENCY=1
# If you are running the tests locally you should set the env variable
# TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
[testenv:scenario]
sitepackages = True
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/networking_bgpvpn_tempest/tests/scenario
OS_TESTR_CONCURRENCY=1
[testenv:py27]
setenv = OS_FAIL_ON_MISSING_DEPS=1
[testenv:venv]
commands = {posargs}
[testenv:cover]
basepython = python2.7
commands =
python setup.py test --coverage --coverage-package-name=networking_bgpvpn --omit="*/tests/*" --testr-args='{posargs}'
coverage report --omit="*/tests/*" -m
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper -t networking_bgpvpn/tests/unit {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.tmp