deb-gnocchi/tox.ini

110 lines
3.8 KiB
INI

[tox]
minversion = 1.8
envlist = py{34,35,27},py{34,35,27}-{postgresql,mysql}{,-file,-swift,-ceph},pep8,bashate,py35-postgresql-file-upgrade-from-2.2,py27-mysql-ceph-upgrade-from-2.2
[testenv]
usedevelop = True
sitepackages = False
passenv = LANG OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE GNOCCHI_TEST_*
deps = .[test]
postgresql: .[postgresql,swift,ceph,file]
mysql: .[mysql,swift,ceph,file]
setenv =
GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph
GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql
file: GNOCCHI_TEST_STORAGE_DRIVERS=file
swift: GNOCCHI_TEST_STORAGE_DRIVERS=swift
ceph: GNOCCHI_TEST_STORAGE_DRIVERS=ceph
postgresql: GNOCCHI_TEST_INDEXER_DRIVERS=postgresql
mysql: GNOCCHI_TEST_INDEXER_DRIVERS=mysql
commands =
doc8 --ignore-path doc/source/rest.rst doc/source
oslo-config-generator --config-file=etc/gnocchi/gnocchi-config-generator.conf
{toxinidir}/run-tests.sh {posargs}
[testenv:py35-postgresql-file-upgrade-from-2.2]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=2.2,<2.3
pifpaf>=0.13
gnocchiclient
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-2.2]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=2.2,<2.3
gnocchiclient
pifpaf>=0.13
cradox
# cradox is required because 2.2 extra names are incorrect
commands = pifpaf --env-prefix INDEXER run mysql -- pifpaf --env-prefix STORAGE run ceph {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:bashate]
deps = bashate
commands = bashate -v devstack/plugin.sh devstack/gate/gate_hook.sh devstack/gate/post_test_hook.sh
whitelist_externals = bash
[testenv:pep8]
deps = hacking>=0.11,<0.12
commands = flake8
[testenv:py27-gate]
setenv = OS_TEST_PATH=gnocchi/tests/gabbi
GABBI_LIVE=1
passenv = {[testenv]passenv} GNOCCHI_SERVICE*
sitepackages = True
basepython = python2.7
commands = {toxinidir}/tools/pretty_tox.sh '{posargs}'
# This target provides a shortcut to running just the gabbi tests.
[testenv:py27-gabbi]
deps = .[test,postgresql,file]
setenv = OS_TEST_PATH=gnocchi/tests/gabbi
basepython = python2.7
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- {toxinidir}/tools/pretty_tox.sh '{posargs}'
[testenv:py27-cover]
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py testr --coverage --testr-args="{posargs}"
[testenv:venv]
# This is used by the doc job on the gate
deps = {[testenv:docs]deps}
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- {posargs}
[flake8]
exclude = .tox,.eggs,doc
show-source = true
[testenv:genconfig]
deps = .[mysql,postgresql,test,file,ceph,swift]
commands = oslo-config-generator --config-file=etc/gnocchi/gnocchi-config-generator.conf
[testenv:docs]
# This does not work, see: https://bitbucket.org/hpk42/tox/issues/302
# deps = {[testenv]deps}
# .[doc]
deps = .[test,postgresql,file,doc]
setenv = GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
commands = doc8 --ignore-path doc/source/rest.rst doc/source
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py build_sphinx
[testenv:docs-gnocchi.xyz]
deps = .[file,postgresql,test,doc]
sphinx_rtd_theme
commands =
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- sphinx-build -D html_theme=sphinx_rtd_theme doc/source doc/build/html