gnocchi/tox.ini

139 lines
4.9 KiB
INI

[tox]
minversion = 1.8
envlist = py{35,27}-{postgresql,mysql}{,-file,-swift,-ceph,-s3},pep8,bashate
[testenv]
usedevelop = True
sitepackages = False
passenv = LANG OS_DEBUG OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE GNOCCHI_TEST_* AWS_*
setenv =
GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph s3 redis
GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql
file: GNOCCHI_TEST_STORAGE_DRIVERS=file
swift: GNOCCHI_TEST_STORAGE_DRIVERS=swift
ceph: GNOCCHI_TEST_STORAGE_DRIVERS=ceph
redis: GNOCCHI_TEST_STORAGE_DRIVERS=redis
s3: GNOCCHI_TEST_STORAGE_DRIVERS=s3
postgresql: GNOCCHI_TEST_INDEXER_DRIVERS=postgresql
mysql: GNOCCHI_TEST_INDEXER_DRIVERS=mysql
GNOCCHI_STORAGE_DEPS=file,swift,test-swift,s3,ceph,ceph_recommended_lib,redis
ceph: GNOCCHI_STORAGE_DEPS=ceph,ceph_recommended_lib
swift: GNOCCHI_STORAGE_DEPS=swift,test-swift
file: GNOCCHI_STORAGE_DEPS=file
redis: GNOCCHI_STORAGE_DEPS=redis
s3: GNOCCHI_STORAGE_DEPS=s3
# FIXME(sileht): pbr doesn't support url in setup.cfg extras, so we do this crap
GNOCCHI_TEST_TARBALLS=http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
ceph: GNOCCHI_TEST_TARBALLS=
swift: GNOCCHI_TEST_TARBALLS=http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
s3: GNOCCHI_TEST_TARBALLS=
redis: GNOCCHI_TEST_TARBALLS=
file: GNOCCHI_TEST_TARBALLS=
deps = .[test]
postgresql: .[postgresql,{env:GNOCCHI_STORAGE_DEPS}]
mysql: .[mysql,{env:GNOCCHI_STORAGE_DEPS}]
{env:GNOCCHI_TEST_TARBALLS:}
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
commands =
doc8 --ignore-path doc/source/rest.rst doc/source
gnocchi-config-generator
{toxinidir}/run-tests.sh {posargs}
{toxinidir}/run-func-tests.sh {posargs}
[testenv:py35-postgresql-file-upgrade-from-3.1]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
# FIXME(sileht): We set alembic version until next Gnocchi 3.1 is released
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=3.1,<3.2
alembic<0.9.0
pifpaf>=0.13
gnocchiclient>=2.8.0
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-3.1]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
# FIXME(sileht): We set alembic version until next Gnocchi 3.1 is released
envdir = upgrade
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=3.1,<3.2
alembic<0.9.0
gnocchiclient>=2.8.0
pifpaf>=0.13
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.12,<0.13
commands = flake8
[testenv:py27-gate]
setenv = OS_TEST_PATH=gnocchi/tests/functional_live
GABBI_LIVE=1
passenv = {[testenv]passenv} GNOCCHI_SERVICE* GNOCCHI_AUTHORIZATION
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/functional
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
enable-extensions = H904
[testenv:genconfig]
deps = .[mysql,postgresql,test,file,ceph,swift,s3]
commands = gnocchi-config-generator
[testenv:docs]
basepython = python2.7
# 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]
basepython = python2.7
deps = .[file,postgresql,test,doc]
sphinx_rtd_theme
sphinxcontrib-versioning
# for 2.x doc
pytimeparse
retrying
commands =
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- sphinx-versioning build doc/source doc/build/html -- -D html_theme=sphinx_rtd_theme