23b1ad1d42
This mirrors changes recently merged in nova-powervm to fix [1], cleanup[2], and modernize [3] our doc building. [1] 8a0a82fba9e6069f54316c6f0cc4eb4f73d9baae [2] 5b4d0f82265dbb86fcb044bf9dfe4577e2106904 [3] b0256a71b2195791cda4da9f633a3b5448ee2540 Change-Id: I79d53bcde102ad1d5b7ba65b623ea4a3fba3bfec
95 lines
2.4 KiB
INI
95 lines
2.4 KiB
INI
[tox]
|
|
minversion = 3.1.1
|
|
skipsdist = True
|
|
envlist = py35,py27,pep8
|
|
# 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
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONHASHSEED=0
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.utf-8
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-egit+https://git.openstack.org/openstack/ceilometer#egg=ceilometer
|
|
-rhttps://git.openstack.org/cgit/openstack/ceilometer/plain/test-requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:py35]
|
|
basepython = python3.5
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source ceilometer_powervm --parallel-mode
|
|
commands =
|
|
{[testenv]commands}
|
|
coverage erase
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/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]
|
|
ignore =
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,nova_tests,build
|
|
show-source = true
|
|
|
|
[hacking]
|
|
import_exceptions = ceilometer.openstack.common.gettextutils
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
-egit+https://git.openstack.org/openstack/ceilometer#egg=ceilometer
|
|
-rhttps://git.openstack.org/cgit/openstack/ceilometer/plain/test-requirements.txt
|