99 lines
2.8 KiB
INI
99 lines
2.8 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py27,pep8
|
|
# Tox does not work if the path to the workdir is too long, so move it to /tmp
|
|
toxworkdir = /tmp/{env:USER}_distributedcloud
|
|
#skipsdist = True
|
|
|
|
[testenv]
|
|
#usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
|
DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
|
|
|
deps = keyring
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-e{toxinidir}/../../middleware/config/recipes-common/tsconfig/tsconfig
|
|
-e{toxinidir}/../../middleware/config/recipes-control/configutilities/configutilities
|
|
-e{toxinidir}/../../middleware/sysinv/recipes-common/sysinv/sysinv
|
|
-e{toxinidir}/../../middleware/fault/recipes-common/fm-api
|
|
-e{toxinidir}/../../middleware/patching/recipes-common/cgcs-patch/cgcs-patch
|
|
-e{toxinidir}/../../middleware/sysinv/recipes-common/cgts-client/cgts-client
|
|
-e{toxinidir}/../../recipes-nfv/nfv/nfv-client
|
|
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
python setup_ddt_tests.py testr --slowest --testr-args='{posargs}'
|
|
whitelist_externals =
|
|
rm
|
|
find
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
|
|
[testenv:py27-single]
|
|
basepython = python2.7
|
|
setenv =
|
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
|
DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
|
SINGLE_REPO=True
|
|
|
|
[testenv:debug-py27]
|
|
basepython = python2.7
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py34]
|
|
basepython = python3.4
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:pep8]
|
|
deps = hacking<0.11,>=0.10.2
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python2.7
|
|
usedevelop = True
|
|
commands =
|
|
coverage erase
|
|
rm -Rf cover
|
|
rm -f coverage.xml
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage xml --rcfile=.coveragerc_xml
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
show-source = True
|
|
ignore = E123,E125,H233
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=tools/config-generator.conf
|
|
|
|
[hacking]
|
|
import_exceptions = dcmanager.common.i18n,dcorch.common.i18n
|
|
|
|
[testenv:pylint]
|
|
basepython = python2.7
|
|
sitepackages = False
|
|
|
|
deps = {[testenv]deps}
|
|
|
|
commands =
|
|
pylint {posargs} dcmanager dcorch --rcfile=./pylint.rc
|
|
|