summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorMehdi Abaakouk <sileht@redhat.com>2016-09-14 10:03:42 +0200
committerMehdi Abaakouk <sileht@redhat.com>2016-09-21 08:21:02 +0200
commita2ef6ad5e43ef38a4c92fab10e1c51df86491565 (patch)
treeffddac44a6a34b52d74decb80eafdf61a48a9ca7 /tox.ini
parentea87d93bfe51497ef5b7d036349364964b676a5b (diff)
downloadceilometer-a2ef6ad5e43ef38a4c92fab10e1c51df86491565.tar.gz
tox: refactor targets
This change allows to run any target on all python versions Change-Id: I9e8fc4de346ca65627b51b29f6c0c34a0a47451f
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini77
1 files changed, 14 insertions, 63 deletions
diff --git a/tox.ini b/tox.ini
index e78ca6fb..9778c1e8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,69 +1,39 @@
[tox]
-minversion = 1.6
+minversion = 1.8
skipsdist = True
-envlist = py34,py27,py35,functional,py34-functional,py35-functional,pep8
+envlist = py{34,27,35},{debug,py,py34,py27,py35}-{mongodb,mysql,pgsql,elastic,functional},pep8
[testenv]
deps = .[mongo,mysql,postgresql,gnocchi]
-r{toxinidir}/test-requirements.txt
-
install_command = pip install -U {opts} {packages}
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=ceilometer/tests/unit
-passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
+ CEILOMETER_TEST_BACKEND={env:CEILOMETER_TEST_BACKEND:none}
+ CEILOMETER_TEST_DEBUG={env:CEILOMETER_TEST_DEBUG:}
+ debug: CEILOMETER_TEST_DEBUG=True
+ {mongodb,mysql,pgsql,elastic,functional}: OS_TEST_PATH=ceilometer/tests/functional/
+ mongodb: CEILOMETER_TEST_BACKEND=mongodb
+ mysql: CEILOMETER_TEST_BACKEND=mysql
+ pgsql: CEILOMETER_TEST_BACKEND=postgresql
+ elastic: CEILOMETER_TEST_BACKEND=elasticsearch
+ functional: CEILOMETER_TEST_BACKEND={env:CEILOMETER_TEST_BACKEND:mongodb}
+passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE CEILOMETER_*
commands =
- {toxinidir}/tools/pretty_tox.sh "{posargs}"
+ bash -x {toxinidir}/run-tests.sh "{posargs}"
oslo-config-generator --config-file=etc/ceilometer/ceilometer-config-generator.conf
whitelist_externals = bash
-[testenv:py-mongodb]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}"
-
-[testenv:py-mysql]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-commands = pifpaf run mysql {toxinidir}/tools/pretty_tox.sh "{posargs}"
-
-[testenv:py-pgsql]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-commands = pifpaf run postgresql {toxinidir}/tools/pretty_tox.sh "{posargs}"
-
-# Functional tests for elastic search
-[testenv:py-elastic]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}"
-
-[testenv:functional]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-passenv = CEILOMETER_*
-commands =
- bash -x {toxinidir}/run-functional-tests.sh "{posargs}"
-
-[testenv:py34-functional]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-basepython = python3.4
-passenv = CEILOMETER_*
-commands =
- bash -x {toxinidir}/run-functional-tests.sh "{posargs}"
-
-[testenv:py35-functional]
-setenv = OS_TEST_PATH=ceilometer/tests/functional/
-basepython = python3.5
-passenv = CEILOMETER_*
-commands =
- bash -x {toxinidir}/run-functional-tests.sh "{posargs}"
-
[testenv:integration]
setenv = OS_TEST_PATH=./ceilometer/tests/integration
OS_TEST_TIMEOUT=2400
GABBI_LIVE_FAIL_IF_NO_TEST=1
passenv = {[testenv]passenv} HEAT_* CEILOMETER_* GNOCCHI_* AODH_* GLANCE_* NOVA_* ADMIN_*
-# FIXME(sileht): run gabbi-run to failfast in case of error because testr
+# NOTE(sileht): run gabbi-run to failfast in case of error because testr
# doesn't support --failfast, but we loose the testr report.
commands =
bash -c 'cd ceilometer/tests/integration/gabbi/gabbits-live && gabbi-run -x < autoscaling.yaml'
-# bash -x {toxinidir}/tools/pretty_tox.sh "{posargs}"
# NOTE(chdent): The gabbi tests are also run under the other functional
# tox targets. This target simply provides a target to directly run just
@@ -107,25 +77,6 @@ setenv = PYTHONHASHSEED=0
commands = {posargs}
setenv = PYTHONHASHSEED=0
-[testenv:debug]
-commands = bash -x oslo_debug_helper {posargs}
-
-[testenv:debug-mongodb]
-setenv = OS_TEST_PATH=ceilometer/tests/functional
-commands = pifpaf --debug run mongodb oslo_debug_helper {posargs}
-
-[testenv:debug-mysql]
-setenv = OS_TEST_PATH=ceilometer/tests/functional
-commands = pifpaf --debug run mysql oslo_debug_helper {posargs}
-
-[testenv:debug-pgsql]
-setenv = OS_TEST_PATH=ceilometer/tests/functional
-commands = pifpaf --debug run postgresql oslo_debug_helper {posargs}
-
-[testenv:debug-elastic]
-setenv = OS_TEST_PATH=ceilometer/tests/functional
-commands = pifpaf --debug run elasticsearch oslo_debug_helper {posargs}
-
[flake8]
ignore =
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,install-guide