summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-07-18 16:02:42 -0400
committerRoman Podoliaka <rpodolyaka@mirantis.com>2016-07-19 20:18:07 +0300
commita9ec13d9493586049791236e3aed70865dbe6e9b (patch)
treeaf9d61bfe9fcde159afaed2651f489c2a23ef592 /tox.ini
parentb791ed51a23ac82efbb398caab72371a96be0081 (diff)
downloadoslo-db-a9ec13d9493586049791236e3aed70865dbe6e9b.tar.gz
Consolidate pifpaf commands into variables
Removes the separate per-Python-interpreter setup for the pifpaf run and consolidates necessary variables in one place to be passed into a single command line. Change-Id: I2f34642f16d6dba5b01500fcdc89e88b93642cd3
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini46
1 files changed, 11 insertions, 35 deletions
diff --git a/tox.ini b/tox.ini
index 1c095cf..a1d7bf0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,9 +7,18 @@ whitelist_externals = bash
env
setenv =
VIRTUAL_ENV={envdir}
+ BASECOMMAND=bash tools/pretty_tox.sh
+
+ {postgresql,all}: PIFPAF_POSTGRESQL=pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql --
+ {mysql,all}: PIFPAF_MYSQL=pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql --
+ {mysql,postgresql,all}: BASECOMMAND={toxinidir}/tools/run-pifpaf-tests.sh
+
deps = .[test,fixtures,mysql,postgresql]
- py{27,34,35}-{postgresql,mysql,all}: .[pifpaf]
-commands = bash tools/pretty_tox.sh '{posargs}'
+ {postgresql,mysql,all}: .[pifpaf]
+
+commands =
+ {env:PIFPAF_MYSQL:} {env:PIFPAF_POSTGRESQL:} {env:BASECOMMAND:} '{posargs}'
+
passenv = OS_TEST_DBAPI_ADMIN_CONNECTION
[testenv:sqla_09]
@@ -21,39 +30,6 @@ commands =
env TEST_EVENTLET=0 bash tools/pretty_tox.sh '{posargs}'
env TEST_EVENTLET=1 bash tools/pretty_tox.sh '{posargs}'
-[testenv:py27-all]
-commands = pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql -- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql -- {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py34-all]
-commands = pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql -- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql -- {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py35-all]
-commands = pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql -- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql -- {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py27-mysql]
-commands =
- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py27-postgresql]
-commands =
- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py34-mysql]
-commands =
- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py35-mysql]
-commands =
- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py34-postgresql]
-commands =
- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
-[testenv:py35-postgresql]
-commands =
- pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql {toxinidir}/tools/run-pifpaf-tests.sh {posargs}
-
[testenv:mysql-python]
deps = .[mysql-c,postgresql,test,fixtures]
setenv =