mogan/tox.ini
Zhenguo Niu 7575d1b96e Rename nimble to mogan (4)
This changes devstack plugin some other related things

Change-Id: I60913691a89b767f34a04192244eee7ce4af7996
2017-01-05 00:49:39 +08:00

97 lines
2.8 KiB
INI

[tox]
minversion = 2.0
envlist = py35-constraints,py34-constraints,py27-constraints,pypy-constraints,pep8-constraints,functional
skipsdist = True
[testenv]
usedevelop = True
install_command = {[testenv:common-constraints]install_command}
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=mogan/tests/unit
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
[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 = flake8 {posargs}
[testenv:pep8-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[testenv:venv-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = {posargs}
[testenv:cover]
commands =
python setup.py test --coverage --testr-args='{posargs}'
coverage report
[testenv:cover-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
commands =
python setup.py build_sphinx
oslo-config-generator --config-file=tools/config/mogan-config-generator.conf
[testenv:releasenotes]
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:functional]
setenv = OS_TEST_PATH=mogan/tests/functional/
commands = python setup.py testr --slowest --testr-args="{posargs}"
[testenv:debug-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = oslo_debug_helper {posargs}
[testenv:genconfig]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslo-config-generator --config-file=tools/config/mogan-config-generator.conf
[testenv:genpolicy]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslopolicy-sample-generator --namespace=mogan.api --output-file=etc/mogan/policy.json.sample
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
whitelist_externals = bash
commands =
bash -c 'rm -rf api-ref/build'
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
[flake8]
# H405 is another one that is good as a guideline, but sometimes
# multiline doc strings just don't have a natural summary
# line. Rejecting code for this reason is wrong.
show-source = True
ignore = H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exceptions = mogan.common.i18n