diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-07-05 12:50:22 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-07-05 12:50:22 +0000 |
| commit | f947d1f377aeba243f516e1620f794b43564b700 (patch) | |
| tree | 9b57688e484c27f92d3e9ea231cacc8679bd0801 | |
| parent | 03dbf70f701c322d422ea65dacdc05d08e83d303 (diff) | |
| parent | 6d1e1b55cbd3dc3e522b6210fd5dfd861ca00fab (diff) | |
| download | tooz-f947d1f377aeba243f516e1620f794b43564b700.tar.gz | |
Merge "Simplify env list and test running"
| -rwxr-xr-x | run-tests.sh | 24 | ||||
| -rw-r--r-- | tox.ini | 82 |
2 files changed, 31 insertions, 75 deletions
diff --git a/run-tests.sh b/run-tests.sh index 6e44846..56fa755 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -1,8 +1,22 @@ -#!/bin/sh +#!/bin/bash set -e set -x -for d in $TOOZ_TEST_URLS -do - TOOZ_TEST_URL=$d $* -done +if [ -n "$TOOZ_TEST_DRIVERS" ] +then + IFS="," + for TOOZ_TEST_DRIVER in $TOOZ_TEST_DRIVERS + do + IFS=" " + TOOZ_TEST_DRIVER=(${TOOZ_TEST_DRIVER}) + SETUP_ENV_SCRIPT="./setup-${TOOZ_TEST_DRIVER[0]}-env.sh" + [ -x $SETUP_ENV_SCRIPT ] || unset SETUP_ENV_SCRIPT + $SETUP_ENV_SCRIPT pifpaf -e TOOZ_TEST run "${TOOZ_TEST_DRIVER[@]}" -- $* + done + unset IFS +else + for d in $TOOZ_TEST_URLS + do + TOOZ_TEST_URL=$d $* + done +fi @@ -18,6 +18,18 @@ deps = .[test,zake,ipc,memcached,mysql,etcd,etcd3,etcd3gw] consul: .[consul] setenv = TOOZ_TEST_URLS = file:///tmp zake:// ipc:// + zookeeper: TOOZ_TEST_DRIVERS = zookeeper + redis: TOOZ_TEST_DRIVERS = redis + sentinel: TOOZ_TEST_DRIVERS = redis --sentinel + memcached: TOOZ_TEST_DRIVERS = memcached + mysql: TOOZ_TEST_DRIVERS = mysql + postgresql: TOOZ_TEST_DRIVERS = postgresql + etcd: TOOZ_TEST_DRIVERS = etcd,etcd --cluster + etcd3: TOOZ_TEST_DRIVERS = etcd + etcd3: TOOZ_TEST_ETCD3 = 1 + etcd3gw: TOOZ_TEST_DRIVERS = etcd + etcd3gw: TOOZ_TEST_ETCD3GW = 1 + consul: TOOZ_TEST_DRIVERS = consul # NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt commands = {toxinidir}/run-tests.sh {toxinidir}/tools/pretty_tox.sh "{posargs}" @@ -28,76 +40,6 @@ commands = deps = .[doc] commands = {posargs} -[testenv:py27-zookeeper] -commands = pifpaf -e TOOZ_TEST run zookeeper -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-zookeeper] -commands = pifpaf -e TOOZ_TEST run zookeeper -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-redis] -commands = pifpaf -e TOOZ_TEST run redis -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-redis] -commands = pifpaf -e TOOZ_TEST run redis -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-sentinel] -commands = pifpaf -e TOOZ_TEST run redis --sentinel -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-sentinel] -commands = pifpaf -e TOOZ_TEST run redis --sentinel -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-memcached] -commands = pifpaf -e TOOZ_TEST run memcached -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-memcached] -commands = pifpaf -e TOOZ_TEST run memcached -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-postgresql] -commands = pifpaf -e TOOZ_TEST run postgresql -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-postgresql] -commands = pifpaf -e TOOZ_TEST run postgresql -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-mysql] -commands = pifpaf -e TOOZ_TEST run mysql -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-mysql] -commands = pifpaf -e TOOZ_TEST run mysql -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-etcd] -commands = {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd --cluster -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-etcd] -commands = {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd --cluster -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-etcd3] -setenv = TOOZ_TEST_ETCD3=1 -commands = {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd --cluster -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-etcd3] -setenv = TOOZ_TEST_ETCD3=1 -commands = {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd --cluster -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-etcd3gw] -setenv = TOOZ_TEST_ETCD3GW=1 -commands = {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd --cluster -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-etcd3gw] -setenv = TOOZ_TEST_ETCD3GW=1 -commands = {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - {toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd --cluster -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py27-consul] -commands = {toxinidir}/setup-consul-env.sh pifpaf -e TOOZ_TEST run consul -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - -[testenv:py35-consul] -commands = {toxinidir}/setup-consul-env.sh pifpaf -e TOOZ_TEST run consul -- {toxinidir}/tools/pretty_tox.sh "{posargs}" - [testenv:cover] commands = python setup.py testr --slowest --coverage --testr-args="{posargs}" |
