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.
100 lines
2.5 KiB
100 lines
2.5 KiB
[tox]
|
|
envlist = py27,py36,py37,pep8
|
|
minversion = 3.1.1
|
|
skipsdist = True
|
|
# Automatic envs (pyXX) will use the python version appropriate to that
|
|
# env and ignore basepython inherited from [testenv]. That's what we
|
|
# want, and we don't need to be warned about it.
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.utf-8
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-egit+https://opendev.org/openstack/neutron#egg=neutron
|
|
-rhttps://opendev.org/openstack/neutron/raw/branch/master/test-requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
[testenv:py27]
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:py36]
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:py37]
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source networking_powervm --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:bashate]
|
|
commands =
|
|
bash -c "ls devstack/*.sh | xargs bashate -v {posargs}"
|
|
whitelist_externals = bash
|
|
|
|
[flake8]
|
|
# N530 direct neutron imports not allowed
|
|
# W504 line break after binary operator
|
|
# It's either ^ or W503 (line break *before* binary operator). Match neutron.
|
|
ignore = N530,W504
|
|
enable-extensions = H106,H203,H204,H205,H904
|
|
show-source = true
|
|
exclude = ./.*,build,dist,doc
|
|
import-order-style = pep8
|
|
|
|
[hacking]
|
|
local-check-factory = networking_powervm.hacking.checks.factory
|
|
|
|
[testenv:lower-constraints]
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
-egit+https://opendev.org/openstack/neutron#egg=neutron
|
|
-rhttps://opendev.org/openstack/neutron/raw/branch/master/test-requirements.txt
|