From a9ec13d9493586049791236e3aed70865dbe6e9b Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 18 Jul 2016 16:02:42 -0400 Subject: 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 --- tox.ini | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) (limited to 'tox.ini') 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 = -- cgit v1.2.1