Merge "Switch default functional tests to python3, add job for python2"
This commit is contained in:
commit
3e88f941aa
21
.zuul.yaml
21
.zuul.yaml
@ -15,6 +15,7 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-functional
|
- neutron-functional
|
||||||
|
- neutron-functional-python27
|
||||||
- neutron-fullstack
|
- neutron-fullstack
|
||||||
- neutron-rally-task
|
- neutron-rally-task
|
||||||
- neutron-tempest-dvr
|
- neutron-tempest-dvr
|
||||||
@ -57,6 +58,7 @@
|
|||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-functional
|
- neutron-functional
|
||||||
|
- neutron-functional-python27
|
||||||
- neutron-fullstack
|
- neutron-fullstack
|
||||||
- neutron-tempest-dvr
|
- neutron-tempest-dvr
|
||||||
- neutron-tempest-linuxbridge
|
- neutron-tempest-linuxbridge
|
||||||
@ -79,7 +81,6 @@
|
|||||||
- neutron-tempest-with-os-ken-master
|
- neutron-tempest-with-os-ken-master
|
||||||
experimental:
|
experimental:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-functional-python35
|
|
||||||
- neutron-functional-with-uwsgi
|
- neutron-functional-with-uwsgi
|
||||||
- neutron-fullstack-with-uwsgi
|
- neutron-fullstack-with-uwsgi
|
||||||
- neutron-tempest-with-uwsgi
|
- neutron-tempest-with-uwsgi
|
||||||
@ -112,20 +113,10 @@
|
|||||||
- ^releasenotes/.*$
|
- ^releasenotes/.*$
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: neutron-functional-python35
|
name: neutron-functional-python27
|
||||||
parent: legacy-dsvm-base
|
parent: neutron-functional
|
||||||
run: playbooks/legacy/neutron-functional-python35/run.yaml
|
run: playbooks/legacy/neutron-functional-python27/run.yaml
|
||||||
post-run: playbooks/legacy/neutron-functional-python35/post.yaml
|
post-run: playbooks/legacy/neutron-functional-python27/post.yaml
|
||||||
timeout: 7800
|
|
||||||
required-projects:
|
|
||||||
- openstack-infra/devstack-gate
|
|
||||||
- openstack/neutron
|
|
||||||
irrelevant-files:
|
|
||||||
- ^.*\.rst$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^neutron/locale/.*$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
voting: false
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: neutron-fullstack
|
name: neutron-fullstack
|
||||||
|
@ -20,6 +20,7 @@ import abc
|
|||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
@ -180,6 +181,17 @@ class DietTestCase(base.BaseTestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(DietTestCase, self).setUp()
|
super(DietTestCase, self).setUp()
|
||||||
|
|
||||||
|
# Suppress some log messages during test runs, otherwise it may cause
|
||||||
|
# issues with subunit parser when running on Python 3. It happened for
|
||||||
|
# example for neutron-functional tests.
|
||||||
|
# With this suppress of log levels DEBUG logs will not be captured by
|
||||||
|
# stestr on pythonlogging stream and will not cause this parser issue.
|
||||||
|
supress_logs = ['neutron', 'neutron_lib', 'stevedore', 'oslo_policy',
|
||||||
|
'oslo_concurrency', 'oslo_db', 'alembic', 'ovsdbapp']
|
||||||
|
for supress_log in supress_logs:
|
||||||
|
logger = logging.getLogger(supress_log)
|
||||||
|
logger.setLevel(logging.ERROR)
|
||||||
|
|
||||||
# FIXME(amuller): this must be called in the Neutron unit tests base
|
# FIXME(amuller): this must be called in the Neutron unit tests base
|
||||||
# class. Moving this may cause non-deterministic failures. Bug #1489098
|
# class. Moving this may cause non-deterministic failures. Bug #1489098
|
||||||
# for more info.
|
# for more info.
|
||||||
|
@ -55,7 +55,7 @@ function load_rc_for_rally {
|
|||||||
|
|
||||||
|
|
||||||
case $VENV in
|
case $VENV in
|
||||||
"dsvm-functional"|"dsvm-fullstack"|"dsvm-functional-python35")
|
"dsvm-functional"|"dsvm-functional-python27"|"dsvm-fullstack")
|
||||||
# The following need to be set before sourcing
|
# The following need to be set before sourcing
|
||||||
# configure_for_func_testing.
|
# configure_for_func_testing.
|
||||||
GATE_STACK_USER=stack
|
GATE_STACK_USER=stack
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
name: Neutron functional test suite running with Python 3.5
|
name: Autoconverted job legacy-neutron-dsvm-functional from old job gate-neutron-dsvm-functional-ubuntu-xenial-nv
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Ensure legacy workspace directory
|
- name: Ensure legacy workspace directory
|
||||||
@ -38,12 +38,12 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function gate_hook {
|
function gate_hook {
|
||||||
bash -xe $BASE/new/neutron/neutron/tests/contrib/gate_hook.sh dsvm-functional-python35
|
bash -xe $BASE/new/neutron/neutron/tests/contrib/gate_hook.sh dsvm-functional-python27
|
||||||
}
|
}
|
||||||
export -f gate_hook
|
export -f gate_hook
|
||||||
|
|
||||||
function post_test_hook {
|
function post_test_hook {
|
||||||
bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-functional-python35
|
bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-functional-python27
|
||||||
}
|
}
|
||||||
export -f post_test_hook
|
export -f post_test_hook
|
||||||
|
|
@ -27,6 +27,7 @@
|
|||||||
cmd: |
|
cmd: |
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
export USE_PYTHON3=true
|
||||||
export PYTHONUNBUFFERED=true
|
export PYTHONUNBUFFERED=true
|
||||||
export DEVSTACK_GATE_TEMPEST=0
|
export DEVSTACK_GATE_TEMPEST=0
|
||||||
export DEVSTACK_GATE_EXERCISES=0
|
export DEVSTACK_GATE_EXERCISES=0
|
||||||
|
15
tox.ini
15
tox.ini
@ -44,7 +44,7 @@ setenv = OS_SUDO_TESTING=1
|
|||||||
commands = false
|
commands = false
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
basepython = python2.7
|
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
|
||||||
@ -56,14 +56,14 @@ deps =
|
|||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
||||||
|
|
||||||
[testenv:functional-python35]
|
[testenv:functional-python27]
|
||||||
basepython = python3.5
|
basepython = python2.7
|
||||||
setenv = {[testenv:functional]setenv}
|
setenv = {[testenv:functional]setenv}
|
||||||
deps =
|
deps =
|
||||||
{[testenv:functional]deps}
|
{[testenv:functional]deps}
|
||||||
|
|
||||||
[testenv:dsvm-functional]
|
[testenv:dsvm-functional]
|
||||||
basepython = python2.7
|
basepython = python3
|
||||||
setenv = {[testenv:functional]setenv}
|
setenv = {[testenv:functional]setenv}
|
||||||
{[testenv:dsvm]setenv}
|
{[testenv:dsvm]setenv}
|
||||||
deps =
|
deps =
|
||||||
@ -72,14 +72,13 @@ 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-python35]
|
[testenv:dsvm-functional-python27]
|
||||||
basepython = python3.5
|
basepython = python2.7
|
||||||
setenv = {[testenv:dsvm-functional]setenv}
|
setenv = {[testenv:dsvm-functional]setenv}
|
||||||
deps =
|
deps =
|
||||||
{[testenv:dsvm-functional]deps}
|
{[testenv:dsvm-functional]deps}
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
{[testenv:dsvm-functional]commands}
|
||||||
stestr run {posargs}
|
|
||||||
|
|
||||||
[testenv:dsvm-fullstack]
|
[testenv:dsvm-fullstack]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user