74 lines
2.0 KiB
INI
74 lines
2.0 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = pep8,mypy,functional,functional-py35,py27,py35
|
|
|
|
[testenv]
|
|
usedevelop=True
|
|
whitelist_externals = find
|
|
bash
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_TEST_TIMEOUT
|
|
PYTHON OS_TEST_PATH LISTOPT IDOPTION
|
|
commands =
|
|
find . -type f -name "*.py[c|o]" -delete
|
|
find . -type d -name "__pycache__" -delete
|
|
|
|
[testenv:py27]
|
|
commands = stestr run {posargs}
|
|
|
|
[testenv:py35]
|
|
commands = stestr run {posargs}
|
|
|
|
[testenv:functional]
|
|
whitelist_externals =
|
|
{[testenv]whitelist_externals}
|
|
{toxinidir}/kolla_cli/tests/functional/functional_test_setup.sh
|
|
setenv =
|
|
OS_TEST_PATH = ./kolla_cli/tests/functional
|
|
KOLLA_ETC = /tmp/kollaclitest/etc/kolla
|
|
KOLLA_HOME = /tmp/kollaclitest/usr/share/kolla-ansible
|
|
KOLLA_TOOLS_DIR = {toxinidir}/tools
|
|
commands =
|
|
{[testenv]commands}
|
|
{toxinidir}/kolla_cli/tests/functional/functional_test_setup.sh
|
|
bash -c "pushd /tmp/kollaclitest/usr/share/kolla-ansible/git; python setup.py install; popd"
|
|
stestr run {posargs} --serial
|
|
|
|
[testenv:functional-py35]
|
|
basepython = py35: python3.5
|
|
setenv = {[testenv:functional]setenv}
|
|
commands = {[testenv:functional]commands}
|
|
whitelist_externals = {[testenv:functional]whitelist_externals}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps = {[testenv]deps}
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:mypy]
|
|
basepython = python3
|
|
skip_install = true
|
|
whitelist_externals = mypy
|
|
commands =
|
|
mypy --py2 --ignore-missing-imports kolla_cli
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
commands = bandit -r kolla_cli
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = ./builddocs.sh
|