Stop testing python 2
Since it's no longer supported past Train, lets stop running the tests. Updated docs and made some pep8 code tweaks as well. Change-Id: I1c171ab906a3b4c66558163ad26947ebf710a276
This commit is contained in:
parent
8acf9ea32b
commit
6842465260
14
.zuul.yaml
14
.zuul.yaml
@ -7,7 +7,6 @@
|
|||||||
- neutron-tempest-plugin-jobs
|
- neutron-tempest-plugin-jobs
|
||||||
- openstack-cover-jobs
|
- openstack-cover-jobs
|
||||||
- openstack-lower-constraints-jobs
|
- openstack-lower-constraints-jobs
|
||||||
- openstack-python-jobs
|
|
||||||
- openstack-python3-ussuri-jobs
|
- openstack-python3-ussuri-jobs
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- periodic-stable-jobs
|
- periodic-stable-jobs
|
||||||
@ -17,8 +16,6 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-functional
|
- neutron-functional
|
||||||
# TODO(ralonsoh): until the bug 1848944 is fixed or PY2 removed
|
|
||||||
#- neutron-functional-python27:
|
|
||||||
- neutron-fullstack
|
- neutron-fullstack
|
||||||
- neutron-rally-task
|
- neutron-rally-task
|
||||||
- neutron-tempest-dvr
|
- neutron-tempest-dvr
|
||||||
@ -68,8 +65,6 @@
|
|||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-functional
|
- neutron-functional
|
||||||
# TODO(ralonsoh): until the bug 1848944 is fixed or PY2 removed
|
|
||||||
#- neutron-functional-python27:
|
|
||||||
- neutron-fullstack
|
- neutron-fullstack
|
||||||
- neutron-tempest-dvr
|
- neutron-tempest-dvr
|
||||||
- neutron-tempest-linuxbridge
|
- neutron-tempest-linuxbridge
|
||||||
@ -139,15 +134,6 @@
|
|||||||
# tox.ini file
|
# tox.ini file
|
||||||
'{{ devstack_base_dir }}/logs/dsvm-functional-logs': logs
|
'{{ devstack_base_dir }}/logs/dsvm-functional-logs': logs
|
||||||
|
|
||||||
- job:
|
|
||||||
name: neutron-functional-python27
|
|
||||||
parent: neutron-functional
|
|
||||||
description: Run neutron functional tests with Python 2.7
|
|
||||||
vars:
|
|
||||||
devstack_localrc:
|
|
||||||
USE_PYTHON3: false
|
|
||||||
tox_envlist: dsvm-functional-python27
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: neutron-fullstack
|
name: neutron-fullstack
|
||||||
parent: neutron-functional
|
parent: neutron-functional
|
||||||
|
18
TESTING.rst
18
TESTING.rst
@ -132,7 +132,7 @@ __ file-based-sqlite_
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
$ OS_TEST_DBAPI_ADMIN_CONNECTION=sqlite:///sqlite.db .tox/py27/bin/python -m \
|
$ OS_TEST_DBAPI_ADMIN_CONNECTION=sqlite:///sqlite.db .tox/py37/bin/python -m \
|
||||||
testtools.run neutron.tests.unit...
|
testtools.run neutron.tests.unit...
|
||||||
...
|
...
|
||||||
(Pdb) self.engine.url
|
(Pdb) self.engine.url
|
||||||
@ -507,7 +507,7 @@ To restrict the pylint check to only the files altered by the latest patch chang
|
|||||||
|
|
||||||
To run only the unit tests::
|
To run only the unit tests::
|
||||||
|
|
||||||
tox -e py27
|
tox -e py37
|
||||||
|
|
||||||
Many changes span across both the neutron and neutron-lib repos, and tox
|
Many changes span across both the neutron and neutron-lib repos, and tox
|
||||||
will always build the test environment using the published module versions
|
will always build the test environment using the published module versions
|
||||||
@ -520,7 +520,7 @@ For example, to run against the 'master' branch of neutron-lib::
|
|||||||
cd $SRC
|
cd $SRC
|
||||||
git clone https://opendev.org/openstack/neutron-lib
|
git clone https://opendev.org/openstack/neutron-lib
|
||||||
cd $NEUTRON_DIR
|
cd $NEUTRON_DIR
|
||||||
env TOX_ENV_SRC_MODULES=$SRC/neutron-lib tox -r -e pep8,py27
|
env TOX_ENV_SRC_MODULES=$SRC/neutron-lib tox -r -e pep8,py37
|
||||||
|
|
||||||
To run against a change of your own, repeat the same steps, but use the
|
To run against a change of your own, repeat the same steps, but use the
|
||||||
directory with your changes, not a fresh clone.
|
directory with your changes, not a fresh clone.
|
||||||
@ -533,7 +533,7 @@ desired gerrit refs for this example)::
|
|||||||
cd neutron-lib
|
cd neutron-lib
|
||||||
git fetch https://opendev.org/openstack/neutron-lib refs/changes/13/635313/6 && git checkout FETCH_HEAD
|
git fetch https://opendev.org/openstack/neutron-lib refs/changes/13/635313/6 && git checkout FETCH_HEAD
|
||||||
cd $NEUTRON_DIR
|
cd $NEUTRON_DIR
|
||||||
env TOX_ENV_SRC_MODULES=$SRC/neutron-lib tox -r -e pep8,py27
|
env TOX_ENV_SRC_MODULES=$SRC/neutron-lib tox -r -e pep8,py37
|
||||||
|
|
||||||
Note that the '-r' is needed to re-create the tox virtual envs, and will also
|
Note that the '-r' is needed to re-create the tox virtual envs, and will also
|
||||||
be needed to restore them to standard when not using this method.
|
be needed to restore them to standard when not using this method.
|
||||||
@ -542,7 +542,7 @@ Any pip installable package can be overriden with this environment variable,
|
|||||||
not just neutron-lib. To specify multiple packages to override, specify them
|
not just neutron-lib. To specify multiple packages to override, specify them
|
||||||
as a space separated list to TOX_ENV_SRC_MODULES. Example::
|
as a space separated list to TOX_ENV_SRC_MODULES. Example::
|
||||||
|
|
||||||
env TOX_ENV_SRC_MODULES="$SRC/neutron-lib $SRC/oslo.db" tox -r -e pep8,py27
|
env TOX_ENV_SRC_MODULES="$SRC/neutron-lib $SRC/oslo.db" tox -r -e pep8,py37
|
||||||
|
|
||||||
Functional Tests
|
Functional Tests
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
@ -664,13 +664,13 @@ the dot-separated path you want as an argument to it.
|
|||||||
|
|
||||||
For example, the following would run only a single test or test case::
|
For example, the following would run only a single test or test case::
|
||||||
|
|
||||||
$ tox -e py27 neutron.tests.unit.test_manager
|
$ tox -e py37 neutron.tests.unit.test_manager
|
||||||
$ tox -e py27 neutron.tests.unit.test_manager.NeutronManagerTestCase
|
$ tox -e py37 neutron.tests.unit.test_manager.NeutronManagerTestCase
|
||||||
$ tox -e py27 neutron.tests.unit.test_manager.NeutronManagerTestCase.test_service_plugin_is_loaded
|
$ tox -e py37 neutron.tests.unit.test_manager.NeutronManagerTestCase.test_service_plugin_is_loaded
|
||||||
|
|
||||||
If you want to pass other arguments to stestr, you can do the following::
|
If you want to pass other arguments to stestr, you can do the following::
|
||||||
|
|
||||||
$ tox -e py27 -- neutron.tests.unit.test_manager --serial
|
$ tox -e py37 -- neutron.tests.unit.test_manager --serial
|
||||||
|
|
||||||
|
|
||||||
Coverage
|
Coverage
|
||||||
|
@ -10,7 +10,6 @@ libffi-devel [platform:rpm]
|
|||||||
|
|
||||||
# MySQL and PostgreSQL databases since some jobs are set up in
|
# MySQL and PostgreSQL databases since some jobs are set up in
|
||||||
# OpenStack infra that need these like
|
# OpenStack infra that need these like
|
||||||
# periodic-neutron-py27-with-oslo-master and
|
|
||||||
# periodic-neutron-py35-with-neutron-lib-master.
|
# periodic-neutron-py35-with-neutron-lib-master.
|
||||||
haproxy
|
haproxy
|
||||||
libmysqlclient-dev [platform:dpkg test]
|
libmysqlclient-dev [platform:dpkg test]
|
||||||
|
@ -229,8 +229,8 @@ Create and activate the virtualenv
|
|||||||
|
|
||||||
From the root of the neutron (or sub-project) repo directory, run::
|
From the root of the neutron (or sub-project) repo directory, run::
|
||||||
|
|
||||||
tox --notest -r -e py27
|
tox --notest -r -e py37
|
||||||
source .tox/py27/bin/activate
|
source .tox/py37/bin/activate
|
||||||
|
|
||||||
Now you can use the ``test-db-manage`` alias in place of ``neutron-db-manage``
|
Now you can use the ``test-db-manage`` alias in place of ``neutron-db-manage``
|
||||||
in the script auto-generation instructions below.
|
in the script auto-generation instructions below.
|
||||||
|
@ -315,7 +315,7 @@ be the bare minimum you have to complete in order to get you off the ground.
|
|||||||
<http://docs.openstack.org/infra/manual/creators.html#update-the-gerrit-group-members>`_.
|
<http://docs.openstack.org/infra/manual/creators.html#update-the-gerrit-group-members>`_.
|
||||||
* Fix, fix, fix: at this point you have an external base to work on. You can
|
* Fix, fix, fix: at this point you have an external base to work on. You can
|
||||||
develop against the new opendev.org project, the same way you work with
|
develop against the new opendev.org project, the same way you work with
|
||||||
any other OpenStack project: you have pep8, docs, and python27 CI jobs that
|
any other OpenStack project: you have pep8, docs, and python CI jobs that
|
||||||
validate your patches when posted to Gerrit. For instance, one thing you
|
validate your patches when posted to Gerrit. For instance, one thing you
|
||||||
would need to do is to define an entry point for your plugin or driver in
|
would need to do is to define an entry point for your plugin or driver in
|
||||||
your own setup.cfg similarly as to how it is done in the `setup.cfg for ODL
|
your own setup.cfg similarly as to how it is done in the `setup.cfg for ODL
|
||||||
|
@ -65,7 +65,6 @@ keepalived_state_change: CommandFilter, neutron-keepalived-state-change, root
|
|||||||
# TODO(mlavalle) These kill filters will be updated once we come up with a
|
# TODO(mlavalle) These kill filters will be updated once we come up with a
|
||||||
# mechanism to kill using the name of the script being executed by Python
|
# mechanism to kill using the name of the script being executed by Python
|
||||||
kill_keepalived_monitor_py: KillFilter, root, python, -15
|
kill_keepalived_monitor_py: KillFilter, root, python, -15
|
||||||
kill_keepalived_monitor_py27: KillFilter, root, python2.7, -15
|
|
||||||
kill_keepalived_monitor_py3: KillFilter, root, python3, -15
|
kill_keepalived_monitor_py3: KillFilter, root, python3, -15
|
||||||
kill_keepalived_monitor_py35: KillFilter, root, python3.5, -15
|
kill_keepalived_monitor_py35: KillFilter, root, python3.5, -15
|
||||||
kill_keepalived_monitor_py36: KillFilter, root, python3.6, -15
|
kill_keepalived_monitor_py36: KillFilter, root, python3.6, -15
|
||||||
|
@ -147,7 +147,6 @@ traceback2==1.4.0
|
|||||||
unittest2==1.1.0
|
unittest2==1.1.0
|
||||||
vine==1.1.4
|
vine==1.1.4
|
||||||
waitress==1.1.0
|
waitress==1.1.0
|
||||||
weakrefmethod==1.0.2
|
|
||||||
WebOb==1.8.2
|
WebOb==1.8.2
|
||||||
WebTest==2.0.27
|
WebTest==2.0.27
|
||||||
wrapt==1.7.0
|
wrapt==1.7.0
|
||||||
|
@ -22,8 +22,6 @@ from neutron_lib.agent import topics
|
|||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from neutron_lib import context
|
from neutron_lib import context
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
import six
|
|
||||||
import testtools
|
|
||||||
|
|
||||||
import neutron
|
import neutron
|
||||||
from neutron.agent.common import ovs_lib
|
from neutron.agent.common import ovs_lib
|
||||||
@ -207,14 +205,6 @@ def register_sriovnicswitch_agent(host=HOST,
|
|||||||
return _register_agent(agent, plugin)
|
return _register_agent(agent, plugin)
|
||||||
|
|
||||||
|
|
||||||
def requires_py2(testcase):
|
|
||||||
return testtools.skipUnless(six.PY2, "requires python 2.x")(testcase)
|
|
||||||
|
|
||||||
|
|
||||||
def requires_py3(testcase):
|
|
||||||
return testtools.skipUnless(six.PY3, "requires python 3.x")(testcase)
|
|
||||||
|
|
||||||
|
|
||||||
def get_not_used_vlan(bridge, vlan_range):
|
def get_not_used_vlan(bridge, vlan_range):
|
||||||
port_vlans = bridge.ovsdb.db_find(
|
port_vlans = bridge.ovsdb.db_find(
|
||||||
'Port', ('tag', '!=', []), columns=['tag']).execute()
|
'Port', ('tag', '!=', []), columns=['tag']).execute()
|
||||||
|
@ -733,7 +733,7 @@ class IpMonitorTestCase(testscenarios.WithScenarios,
|
|||||||
if ip_address not in registers:
|
if ip_address not in registers:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
except (OSError, IOError) as e:
|
except (OSError, IOError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _check_read_file(self, ip_addresses):
|
def _check_read_file(self, ip_addresses):
|
||||||
|
@ -27,7 +27,6 @@ import oslo_i18n
|
|||||||
|
|
||||||
from neutron.agent.linux import utils
|
from neutron.agent.linux import utils
|
||||||
from neutron.tests import base
|
from neutron.tests import base
|
||||||
from neutron.tests.common import helpers
|
|
||||||
|
|
||||||
|
|
||||||
_marker = object()
|
_marker = object()
|
||||||
@ -173,7 +172,6 @@ class AgentUtilsExecuteTest(base.BaseTestCase):
|
|||||||
result = utils.execute(['ls', self.test_file], return_stderr=True)
|
result = utils.execute(['ls', self.test_file], return_stderr=True)
|
||||||
self.assertEqual((str_data, ''), result)
|
self.assertEqual((str_data, ''), result)
|
||||||
|
|
||||||
@helpers.requires_py3
|
|
||||||
def test_surrogateescape_in_decoding_out_data(self):
|
def test_surrogateescape_in_decoding_out_data(self):
|
||||||
bytes_err_data = b'\xed\xa0\xbd'
|
bytes_err_data = b'\xed\xa0\xbd'
|
||||||
err_data = bytes_err_data.decode('utf-8', 'surrogateescape')
|
err_data = bytes_err_data.decode('utf-8', 'surrogateescape')
|
||||||
|
@ -544,13 +544,13 @@ class TimerTestCase(base.BaseTestCase):
|
|||||||
def test__getattr(self):
|
def test__getattr(self):
|
||||||
with utils.Timer() as timer:
|
with utils.Timer() as timer:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.assertEqual(1, round(timer.total_seconds(), 0))
|
self.assertEqual(1.0, round(timer.total_seconds(), 0))
|
||||||
self.assertEqual(1, timer.delta.seconds)
|
self.assertEqual(1, timer.delta.seconds)
|
||||||
|
|
||||||
def test__enter_with_timeout(self):
|
def test__enter_with_timeout(self):
|
||||||
with utils.Timer(timeout=10) as timer:
|
with utils.Timer(timeout=10) as timer:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.assertEqual(1, round(timer.total_seconds(), 0))
|
self.assertEqual(1.0, round(timer.total_seconds(), 0))
|
||||||
|
|
||||||
def test__enter_with_timeout_exception(self):
|
def test__enter_with_timeout_exception(self):
|
||||||
msg = r'Timer timeout expired after 1 second\(s\).'
|
msg = r'Timer timeout expired after 1 second\(s\).'
|
||||||
|
@ -28,7 +28,6 @@ import webob.exc
|
|||||||
|
|
||||||
from neutron.common import ipv6_utils
|
from neutron.common import ipv6_utils
|
||||||
from neutron.tests import base
|
from neutron.tests import base
|
||||||
from neutron.tests.common import helpers
|
|
||||||
from neutron import wsgi
|
from neutron import wsgi
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
@ -520,18 +519,6 @@ class JSONDictSerializerTest(base.BaseTestCase):
|
|||||||
|
|
||||||
self.assertEqual(expected_json, result)
|
self.assertEqual(expected_json, result)
|
||||||
|
|
||||||
# The tested behaviour is only meant to be witnessed in Python 2, so it is
|
|
||||||
# OK to skip this test with Python 3.
|
|
||||||
@helpers.requires_py2
|
|
||||||
def test_json_with_utf8(self):
|
|
||||||
input_dict = dict(servers=dict(a=(2, '\xe7\xbd\x91\xe7\xbb\x9c')))
|
|
||||||
expected_json = b'{"servers":{"a":[2,"\\u7f51\\u7edc"]}}'
|
|
||||||
serializer = wsgi.JSONDictSerializer()
|
|
||||||
result = serializer.serialize(input_dict)
|
|
||||||
result = result.replace(b'\n', b'').replace(b' ', b'')
|
|
||||||
|
|
||||||
self.assertEqual(expected_json, result)
|
|
||||||
|
|
||||||
def test_json_with_unicode(self):
|
def test_json_with_unicode(self):
|
||||||
input_dict = dict(servers=dict(a=(2, u'\u7f51\u7edc')))
|
input_dict = dict(servers=dict(a=(2, u'\u7f51\u7edc')))
|
||||||
expected_json = b'{"servers":{"a":[2,"\\u7f51\\u7edc"]}}'
|
expected_json = b'{"servers":{"a":[2,"\\u7f51\\u7edc"]}}'
|
||||||
|
5
releasenotes/notes/drop-python-2-7-9707a901c7d8eab6.yaml
Normal file
5
releasenotes/notes/drop-python-2-7-9707a901c7d8eab6.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Python 2.7 support has been dropped. The minimum version of Python now
|
||||||
|
supported by Neutron is Python 3.6.
|
@ -49,7 +49,6 @@ ovs>=2.8.0 # Apache-2.0
|
|||||||
ovsdbapp>=0.9.1 # Apache-2.0
|
ovsdbapp>=0.9.1 # Apache-2.0
|
||||||
psutil>=3.2.2 # BSD
|
psutil>=3.2.2 # BSD
|
||||||
pyroute2>=0.5.3;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
|
pyroute2>=0.5.3;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
|
||||||
weakrefmethod>=1.0.2;python_version=='2.7' # PSF
|
|
||||||
|
|
||||||
python-novaclient>=9.1.0 # Apache-2.0
|
python-novaclient>=9.1.0 # Apache-2.0
|
||||||
openstacksdk>=0.31.2 # Apache-2.0
|
openstacksdk>=0.31.2 # Apache-2.0
|
||||||
|
@ -13,8 +13,6 @@ classifier =
|
|||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: POSIX :: Linux
|
Operating System :: POSIX :: Linux
|
||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
Programming Language :: Python :: 2
|
|
||||||
Programming Language :: Python :: 2.7
|
|
||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.6
|
Programming Language :: Python :: 3.6
|
||||||
Programming Language :: Python :: 3.7
|
Programming Language :: Python :: 3.7
|
||||||
@ -266,6 +264,3 @@ domain = neutron neutron-log-error neutron-log-info neutron-log-warning
|
|||||||
domain = neutron
|
domain = neutron
|
||||||
output_dir = neutron/locale
|
output_dir = neutron/locale
|
||||||
input_file = neutron/locale/neutron.pot
|
input_file = neutron/locale/neutron.pot
|
||||||
|
|
||||||
[wheel]
|
|
||||||
universal = 1
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# Why, you ask? Because you made changes to neutron-lib, and you want
|
# Why, you ask? Because you made changes to neutron-lib, and you want
|
||||||
# run the unit tests together. E.g.:
|
# run the unit tests together. E.g.:
|
||||||
#
|
#
|
||||||
# env TOX_ENV_SRC_MODULES="$HOME/src/neutron-lib" tox -e py27
|
# env TOX_ENV_SRC_MODULES="$HOME/src/neutron-lib" tox -e py37
|
||||||
|
|
||||||
toxinidir="$1"
|
toxinidir="$1"
|
||||||
|
|
||||||
|
36
tox.ini
36
tox.ini
@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = docs,py27,py37,pep8
|
envlist = docs,py37,pep8
|
||||||
minversion = 2.3.2
|
minversion = 2.3.2
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||||
@ -26,18 +27,15 @@ commands =
|
|||||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
commands = oslo_debug_helper -t neutron/tests {posargs}
|
commands = oslo_debug_helper -t neutron/tests {posargs}
|
||||||
|
|
||||||
[testenv:common]
|
[testenv:common]
|
||||||
basepython = python3
|
|
||||||
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
|
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
|
||||||
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}
|
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}
|
||||||
commands = false
|
commands = false
|
||||||
|
|
||||||
[testenv:dsvm]
|
[testenv:dsvm]
|
||||||
basepython = python3
|
|
||||||
# Fake job to define environment variables shared between dsvm jobs
|
# Fake job to define environment variables shared between dsvm jobs
|
||||||
setenv = OS_SUDO_TESTING=1
|
setenv = OS_SUDO_TESTING=1
|
||||||
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
||||||
@ -47,7 +45,6 @@ setenv = OS_SUDO_TESTING=1
|
|||||||
commands = false
|
commands = false
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
basepython = python3
|
|
||||||
setenv = {[testenv]setenv}
|
setenv = {[testenv]setenv}
|
||||||
{[testenv:common]setenv}
|
{[testenv:common]setenv}
|
||||||
OS_TEST_PATH=./neutron/tests/functional
|
OS_TEST_PATH=./neutron/tests/functional
|
||||||
@ -59,14 +56,7 @@ deps =
|
|||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
||||||
|
|
||||||
[testenv:functional-python27]
|
|
||||||
basepython = python2.7
|
|
||||||
setenv = {[testenv:functional]setenv}
|
|
||||||
deps =
|
|
||||||
{[testenv:functional]deps}
|
|
||||||
|
|
||||||
[testenv:dsvm-functional]
|
[testenv:dsvm-functional]
|
||||||
basepython = python3
|
|
||||||
setenv = {[testenv:functional]setenv}
|
setenv = {[testenv:functional]setenv}
|
||||||
{[testenv:dsvm]setenv}
|
{[testenv:dsvm]setenv}
|
||||||
deps =
|
deps =
|
||||||
@ -75,16 +65,7 @@ commands =
|
|||||||
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:dsvm-functional-python27]
|
|
||||||
basepython = python2.7
|
|
||||||
setenv = {[testenv:dsvm-functional]setenv}
|
|
||||||
deps =
|
|
||||||
{[testenv:dsvm-functional]deps}
|
|
||||||
commands =
|
|
||||||
{[testenv:dsvm-functional]commands}
|
|
||||||
|
|
||||||
[testenv:dsvm-fullstack]
|
[testenv:dsvm-fullstack]
|
||||||
basepython = python3
|
|
||||||
setenv = {[testenv]setenv}
|
setenv = {[testenv]setenv}
|
||||||
{[testenv:common]setenv}
|
{[testenv:common]setenv}
|
||||||
{[testenv:dsvm]setenv}
|
{[testenv:dsvm]setenv}
|
||||||
@ -99,13 +80,11 @@ commands =
|
|||||||
stestr run --concurrency 4 {posargs}
|
stestr run --concurrency 4 {posargs}
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/docs
|
envdir = {toxworkdir}/docs
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
@ -127,7 +106,6 @@ whitelist_externals =
|
|||||||
bash
|
bash
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
@ -140,17 +118,14 @@ commands =
|
|||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/docs
|
envdir = {toxworkdir}/docs
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:pdf-docs]
|
[testenv:pdf-docs]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/docs
|
envdir = {toxworkdir}/docs
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
@ -160,7 +135,6 @@ commands =
|
|||||||
make -C doc/build/pdf
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[testenv:linkcheck]
|
[testenv:linkcheck]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/docs
|
envdir = {toxworkdir}/docs
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
||||||
@ -189,7 +163,6 @@ import_exceptions = neutron._i18n
|
|||||||
local-check-factory = neutron.hacking.checks.factory
|
local-check-factory = neutron.hacking.checks.factory
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
# B104: Possible binding to all interfaces
|
# B104: Possible binding to all interfaces
|
||||||
# B303: blacklist calls: md5, sha1
|
# B303: blacklist calls: md5, sha1
|
||||||
@ -199,7 +172,6 @@ deps = -r{toxinidir}/test-requirements.txt
|
|||||||
commands = bandit -r neutron -x tests -n5 -s B104,B303,B311,B604
|
commands = bandit -r neutron -x tests -n5 -s B104,B303,B311,B604
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
commands = bash -c "find {toxinidir} \
|
commands = bash -c "find {toxinidir} \
|
||||||
-not \( -type d -name .tox\* -prune \) \
|
-not \( -type d -name .tox\* -prune \) \
|
||||||
@ -213,19 +185,16 @@ commands = bash -c "find {toxinidir} \
|
|||||||
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
|
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
||||||
|
|
||||||
[testenv:genpolicy]
|
[testenv:genpolicy]
|
||||||
basepython = python3
|
|
||||||
envdir = {toxworkdir}/shared
|
envdir = {toxworkdir}/shared
|
||||||
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
|
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
|
||||||
|
|
||||||
# This environment can be used to quickly validate that all needed system
|
# This environment can be used to quickly validate that all needed system
|
||||||
# packages required to successfully execute test targets are installed
|
# packages required to successfully execute test targets are installed
|
||||||
[testenv:bindep]
|
[testenv:bindep]
|
||||||
basepython = python3
|
|
||||||
# Do not install any requirements. We want this to be fast and work even if
|
# Do not install any requirements. We want this to be fast and work even if
|
||||||
# system dependencies are missing, since it's used to tell you what system
|
# system dependencies are missing, since it's used to tell you what system
|
||||||
# dependencies are missing! This also means that bindep must be installed
|
# dependencies are missing! This also means that bindep must be installed
|
||||||
@ -234,7 +203,6 @@ deps = bindep
|
|||||||
commands = bindep test
|
commands = bindep test
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
basepython = python3
|
|
||||||
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
|
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
|
||||||
deps =
|
deps =
|
||||||
-c{toxinidir}/lower-constraints.txt
|
-c{toxinidir}/lower-constraints.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user