StarlingX Distributed Cloud
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

176 lines
4.9 KiB

[tox]
envlist = linters,pep8,py27-dev
minversion = 2.3
skipsdist = True
[dc]
dc_base_dir = .
stx_fault_dir = ../stx-fault
nfv_client_src_dir = ../stx-nfv/nfv/nfv-client
fmclient_src_dir = {[dc]stx_fault_dir}/python-fmclient/fmclient
fm_api_src_dir = {[dc]stx_fault_dir}/fm-api
sysinv_src_dir = ../stx-config/sysinv/sysinv/sysinv
tsconfig_src_dir = ../stx-update/tsconfig/tsconfig
configutilities_src_dir = ../stx-config/configutilities/configutilities
cgtsclient_src_dir = ../stx-config/sysinv/cgts-client/cgts-client
[testenv]
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}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
CURRENT_CFG_FILE={toxinidir}/.current.cfg
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
keyring
whitelist_externals =
rm
find
reno
[testenv:py27-dev]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
keyring
-e../{[dc]nfv_client_src_dir}
-e../{[dc]sysinv_src_dir}
-e../{[dc]tsconfig_src_dir}
-e../{[dc]fmclient_src_dir}
-e../{[dc]fm_api_src_dir}
-e../{[dc]configutilities_src_dir}
-e../{[dc]cgtsclient_src_dir}
setenv =
CURRENT_CFG_FILE={toxinidir}/.current.cfg
DATA_DIRECTORY={toxinidir}/dcmanager/tests/data
SINGLE_REPO=True
commands =
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
python setup_ddt_tests.py testr --slowest --testr-args='{posargs}'
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
keyring
-e{[dc]nfv_client_src_dir}
-e{[dc]sysinv_src_dir}
-e{[dc]tsconfig_src_dir}
-e{[dc]fmclient_src_dir}
-e{[dc]fm_api_src_dir}
-e{[dc]configutilities_src_dir}
-e{[dc]cgtsclient_src_dir}
setenv =
CURRENT_CFG_FILE={toxinidir}/.current.cfg
DATA_DIRECTORY={toxinidir}/dcmanager/tests/data
SINGLE_REPO=True
commands =
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
python setup_ddt_tests.py testr --slowest --testr-args='{posargs}'
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper {posargs}
[testenv:debug-py34]
basepython = python3.4
commands = oslo_debug_helper {posargs}
[testenv:pep8]
basepython = python3
deps = hacking<0.11,>=0.10.2
commands = flake8
[testenv:venv]
basepython = python3
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]
basepython = python3
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals = rm
[testenv:newnote]
basepython = python3
# Re-use the releasenotes venv
envdir = {toxworkdir}/releasenotes
deps = -r{toxinidir}/doc/requirements.txt
commands = reno new {posargs}
[testenv:api-ref]
basepython = python3
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm
[testenv:debug]
basepython = python3
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]
basepython = python3
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
[testenv:linters]
basepython = python3
# bashate ignore:
# E006 - accept long lines
# E040 - false positive on |& syntax (new in bash 4)
whitelist_externals = bash
commands =
bash -c "find {toxinidir} \
\( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"