set default python to python3

Set the default python to python3 except for the py27 specific test
environments. Set Python 2.7 as the python version to use for these
tests.

Temporarily ignore optional driver requirements for now. This will be
addressed in a later update.

Change-Id: Iea8e48b72234bb9a580f2345396cf60fe2022618
This commit is contained in:
Kenneth Giusti 2018-04-13 11:02:23 -04:00
parent e67bafd526
commit 629d449bbb
1 changed files with 18 additions and 5 deletions

23
tox.ini
View File

@ -3,6 +3,7 @@ minversion = 2.0
envlist = py35,py27,pep8,bandit
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
passenv = OS_*
@ -15,6 +16,9 @@ deps =
-r{toxinidir}/requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:py27]
basepython = python2.7
[testenv:pep8]
commands = flake8
deps = hacking<0.11,>=0.10.0
@ -32,6 +36,7 @@ deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:py27-func-rabbit]
basepython = python2.7
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=rabbit
@ -41,10 +46,10 @@ commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args=
setenv =
{[testenv]setenv}
TRANSPORT_DRIVER=rabbit
basepython = python3.5
commands = pifpaf run rabbitmq -- python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-kafka]
basepython = python2.7
setenv =
{[testenv]setenv}
TRANSPORT_URL=kafka://127.0.0.1:9092/
@ -52,6 +57,7 @@ setenv =
commands = {toxinidir}/setup-test-env-kafka.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-amqp1]
basepython = python2.7
setenv =
{[testenv]setenv}
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
@ -61,7 +67,6 @@ setenv =
commands = {toxinidir}/tools/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py35-func-amqp1]
basepython = python3.5
setenv =
{[testenv]setenv}
TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:65123//
@ -71,18 +76,22 @@ setenv =
commands = {toxinidir}/tools/setup-test-env-amqp1.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-zmq]
basepython = python2.7
commands = {toxinidir}/setup-test-env-zmq.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py35-func-zmq]
commands = {toxinidir}/setup-test-env-zmq.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-zmq-dyn]
basepython = python2.7
commands = {toxinidir}/setup-test-env-zmq-direct-dynamic.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-zmq-proxy]
basepython = python2.7
commands = {toxinidir}/setup-test-env-zmq-proxy.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:py27-func-zmq-pubsub]
basepython = python2.7
commands = {toxinidir}/setup-test-env-zmq-pub-sub.sh python setup.py testr --slowest --testr-args='{posargs:oslo_messaging.tests.functional}'
[testenv:bandit]
@ -108,9 +117,14 @@ local-check-factory = oslo_messaging.hacking.checks.factory
# do not install test-requirements as that will pollute the virtualenv for
# determining missing packages
# this also means that pip-missing-reqs must be installed separately, outside
# of the requirements.txt files
# of the requirements.txt files.
# Ignore optional driver components for now (see https://review.openstack.org/#/c/525319/)
deps = pip_check_reqs
commands = pip-missing-reqs -d --ignore-module=oslo_messaging* --ignore-file=oslo_messaging/tests/* --ignore-file=tests/ oslo_messaging
commands = pip-missing-reqs -d --ignore-module=oslo_messaging* \
--ignore-file=oslo_messaging/tests/* \
--ignore-file=oslo_messaging/_drivers/zmq_driver/* \
--ignore-file=oslo_messaging/_drivers/impl_kafka.py \
--ignore-file=tests/ oslo_messaging
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@ -121,7 +135,6 @@ deps = bindep
commands = bindep {posargs}
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt