2012-05-29 17:57:58 -04:00
|
|
|
[tox]
|
2013-09-04 16:49:14 -04:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
2015-09-07 12:01:41 +00:00
|
|
|
envlist = py27,py34,functional,py34-functional,pep8
|
2012-05-29 17:57:58 -04:00
|
|
|
|
|
|
|
[testenv]
|
2013-05-28 10:11:07 +10:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-01-22 11:06:55 +08:00
|
|
|
install_command = pip install -U {opts} {packages}
|
2013-09-04 16:49:14 -04:00
|
|
|
usedevelop = True
|
2012-05-29 17:57:58 -04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2013-05-18 18:06:38 +10:00
|
|
|
EVENTLET_NO_GREENDNS=yes
|
2015-07-21 18:02:13 +03:00
|
|
|
OS_TEST_PATH=ceilometer/tests/unit
|
2013-02-25 15:16:23 -05:00
|
|
|
commands =
|
2015-07-21 18:02:13 +03:00
|
|
|
python setup.py testr --slowest --testr-args="{posargs}"
|
2014-03-29 06:52:48 +01:00
|
|
|
whitelist_externals = bash
|
2012-05-29 17:57:58 -04:00
|
|
|
|
2015-05-14 18:04:03 +03:00
|
|
|
# TODO(ityaptin): With separation tests to unit and functional folders we need
|
|
|
|
# set environment variable OS_TEST_PATH=./ceilometer/tests/functional
|
|
|
|
# in "py-<backend>" jobs
|
|
|
|
|
|
|
|
[testenv:py-mongodb]
|
2015-07-21 18:02:13 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional/
|
2015-05-14 18:04:03 +03:00
|
|
|
commands =
|
|
|
|
bash -x {toxinidir}/setup-test-env-mongodb.sh python setup.py testr --slowest --testr-args="{posargs}"
|
|
|
|
|
2014-10-03 11:02:03 +02:00
|
|
|
[testenv:py-mysql]
|
2015-07-21 18:02:13 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional/
|
2014-08-29 13:33:30 +02:00
|
|
|
commands =
|
|
|
|
bash -x {toxinidir}/setup-test-env-mysql.sh python setup.py testr --slowest --testr-args="{posargs}"
|
|
|
|
|
2014-10-03 11:02:03 +02:00
|
|
|
[testenv:py-pgsql]
|
2015-07-21 18:02:13 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional/
|
2014-10-03 11:02:03 +02:00
|
|
|
commands =
|
|
|
|
bash -x {toxinidir}/setup-test-env-postgresql.sh python setup.py testr --slowest --testr-args="{posargs}"
|
|
|
|
|
2015-05-14 18:04:03 +03:00
|
|
|
# Functional tests for elastic search
|
2014-11-24 09:02:36 -05:00
|
|
|
[testenv:py-elastic]
|
2015-07-21 18:02:13 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional/
|
2014-11-24 09:02:36 -05:00
|
|
|
commands =
|
2015-06-15 18:16:13 +02:00
|
|
|
bash -x {toxinidir}/setup-test-env-es.sh python setup.py testr --slowest --testr-args="{posargs}"
|
2014-11-24 09:02:36 -05:00
|
|
|
|
2015-05-14 18:04:03 +03:00
|
|
|
[testenv:functional]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
EVENTLET_NO_GREENDNS=yes
|
2015-05-15 16:43:36 +03:00
|
|
|
OS_TEST_PATH=ceilometer/tests/functional/
|
2015-08-11 19:09:00 +03:00
|
|
|
passenv = CEILOMETER_*
|
2015-05-14 18:04:03 +03:00
|
|
|
commands =
|
2015-05-15 16:43:36 +03:00
|
|
|
bash -x {toxinidir}/run-functional-tests.sh "{posargs}"
|
2015-05-14 18:04:03 +03:00
|
|
|
|
2015-09-07 12:01:41 +00:00
|
|
|
[testenv:py34-functional]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
EVENTLET_NO_GREENDNS=yes
|
|
|
|
OS_TEST_PATH=ceilometer/tests/functional/
|
|
|
|
basepython = python3.4
|
|
|
|
passenv = CEILOMETER_*
|
|
|
|
commands =
|
|
|
|
bash -x {toxinidir}/run-functional-tests.sh "{posargs}"
|
|
|
|
|
2015-07-29 19:03:26 +02:00
|
|
|
[testenv:integration]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
EVENTLET_NO_GREENDNS=yes
|
|
|
|
OS_TEST_PATH=./ceilometer/tests/integration
|
|
|
|
OS_TEST_TIMEOUT=2400
|
|
|
|
GABBI_LIVE_FAIL_IF_NO_TEST=1
|
|
|
|
passenv = HEAT_* CEILOMETER_* GNOCCHI_* AODH_* GLANCE_* NOVA_* ADMIN_*
|
2015-08-21 09:34:41 +02:00
|
|
|
# FIXME(sileht): run gabbi-run to failfast in case of error because testr
|
|
|
|
# doesn't support --failfast, but we loose the testr report.
|
2015-07-29 19:03:26 +02:00
|
|
|
commands =
|
2015-08-05 08:49:45 +02:00
|
|
|
bash -c 'cd ceilometer/tests/integration/gabbi/gabbits-live && gabbi-run -x < autoscaling.yaml'
|
2015-08-21 09:34:41 +02:00
|
|
|
# bash -x {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
2015-07-29 19:03:26 +02:00
|
|
|
|
2015-08-28 08:56:12 +00:00
|
|
|
# NOTE(chdent): The gabbi tests are also run under the other functional
|
|
|
|
# tox targets. This target simply provides a target to directly run just
|
|
|
|
# gabbi tests without needing to do discovery across the entire body of
|
2015-01-09 19:32:55 +00:00
|
|
|
# tests.
|
|
|
|
[testenv:gabbi]
|
2015-07-21 18:02:13 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional/gabbi
|
2015-09-10 14:12:52 +00:00
|
|
|
passenv = CEILOMETER_*
|
2015-01-09 19:32:55 +00:00
|
|
|
commands =
|
|
|
|
bash -x {toxinidir}/setup-test-env-mongodb.sh \
|
|
|
|
python setup.py testr --testr-args="{posargs}"
|
|
|
|
|
2012-08-07 12:22:09 -04:00
|
|
|
[testenv:cover]
|
2015-08-07 18:32:21 +00:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests
|
|
|
|
commands =
|
|
|
|
python setup.py testr --slowest --coverage --testr-args="{posargs}"
|
2012-06-07 18:00:49 -04:00
|
|
|
|
2012-05-29 17:57:58 -04:00
|
|
|
[testenv:pep8]
|
2013-02-04 10:39:35 -04:00
|
|
|
commands =
|
2013-06-12 22:59:27 +02:00
|
|
|
flake8
|
2014-03-29 06:52:48 +01:00
|
|
|
# Check that .po and .pot files are valid:
|
|
|
|
bash -c "find ceilometer -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
2012-10-12 11:20:53 +02:00
|
|
|
|
2014-04-18 13:11:15 +02:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
2014-10-08 13:22:51 -04:00
|
|
|
oslo-config-generator --output-file etc/ceilometer/ceilometer.conf \
|
|
|
|
--namespace ceilometer \
|
2014-12-25 11:14:19 +08:00
|
|
|
--namespace oslo.concurrency \
|
2014-10-08 13:22:51 -04:00
|
|
|
--namespace oslo.db \
|
2015-01-16 18:35:10 +08:00
|
|
|
--namespace oslo.log \
|
2014-10-08 13:22:51 -04:00
|
|
|
--namespace oslo.messaging \
|
2015-03-10 14:06:58 +08:00
|
|
|
--namespace oslo.policy \
|
2015-06-24 00:20:45 -07:00
|
|
|
--namespace oslo.service.service \
|
2014-10-08 13:22:51 -04:00
|
|
|
--namespace keystonemiddleware.auth_token
|
2014-04-18 13:11:15 +02:00
|
|
|
|
2013-03-08 16:08:39 -05:00
|
|
|
[testenv:docs]
|
|
|
|
commands = python setup.py build_sphinx
|
2015-03-26 16:58:09 +00:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2013-03-08 16:08:39 -05:00
|
|
|
|
2014-10-07 17:27:30 +03:00
|
|
|
[testenv:pylint]
|
|
|
|
commands = bash tools/lintstack.sh
|
|
|
|
|
2012-10-12 11:20:53 +02:00
|
|
|
[testenv:venv]
|
2014-05-30 13:52:31 +02:00
|
|
|
commands = {posargs}
|
2015-03-26 16:58:09 +00:00
|
|
|
setenv = PYTHONHASHSEED=0
|
2012-11-19 17:49:35 +01:00
|
|
|
|
2014-07-30 12:02:17 -04:00
|
|
|
[testenv:debug]
|
2015-08-24 19:47:21 +03:00
|
|
|
commands = bash -x oslo_debug_helper {posargs}
|
|
|
|
|
|
|
|
[testenv:debug-mongodb]
|
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional
|
2014-11-05 13:34:04 +08:00
|
|
|
commands = bash -x {toxinidir}/setup-test-env-mongodb.sh oslo_debug_helper {posargs}
|
|
|
|
|
|
|
|
[testenv:debug-mysql]
|
2015-08-24 19:47:21 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional
|
2014-11-05 13:34:04 +08:00
|
|
|
commands = bash -x {toxinidir}/setup-test-env-mysql.sh oslo_debug_helper {posargs}
|
|
|
|
|
|
|
|
[testenv:debug-pgsql]
|
2015-08-24 19:47:21 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional
|
|
|
|
commands = bash -x {toxinidir}/setup-test-env-pgsql.sh oslo_debug_helper {posargs}
|
2014-07-30 12:02:17 -04:00
|
|
|
|
2014-11-24 09:02:36 -05:00
|
|
|
[testenv:debug-elastic]
|
2015-08-24 19:47:21 +03:00
|
|
|
setenv = OS_TEST_PATH=ceilometer/tests/functional
|
2014-11-24 09:02:36 -05:00
|
|
|
commands = bash -x {toxinidir}/setup-test-env-elastic.sh oslo_debug_helper {posargs}
|
|
|
|
|
2013-05-11 12:39:05 -04:00
|
|
|
[flake8]
|
2014-10-30 01:27:47 +08:00
|
|
|
ignore =
|
2015-07-08 14:42:47 +03:00
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
2013-05-11 12:39:05 -04:00
|
|
|
show-source = True
|
2014-04-25 16:18:24 +04:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions =
|
2014-11-30 17:25:16 +08:00
|
|
|
ceilometer.i18n
|
2015-01-12 20:04:55 +08:00
|
|
|
local-check-factory = ceilometer.hacking.checks.factory
|