Fix all of the train gate issues
Update gitreview for train Change-Id: Ieab25244e3d1bff56537de1d5915736f3e8c26dc Fix building OVS after python2 removal Switch functional to use python3 to install python3-based dependencies, which the OVS build checks for. Also, remove the py36 test Change-Id: I2d9599d7050a15f459e6845a112ffc9948b2a7bd (cherry-picked from commitd5420ab5d2
) Handle the ovs/ovn split This is the bare minimum to run against ovs/ovn master after the split. It should be updated to handle running against system- installed OVN. Change-Id: I264200ae016e3928fb4aff3bdcc7c1a94f91cae4 (cherry picked from commit54ee85113a
)
This commit is contained in:
parent
74b52bb349
commit
498e0863f4
|
@ -2,3 +2,4 @@
|
|||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/ovsdbapp.git
|
||||
defaultbranch=stable/train
|
||||
|
|
|
@ -24,6 +24,7 @@ class FunctionalTestCase(base.TestCase):
|
|||
_connections = None
|
||||
ovsvenv = venv.OvsOvnVenvFixture(tempfile.mkdtemp(),
|
||||
ovsdir=os.getenv('OVS_SRCDIR'),
|
||||
ovndir=os.getenv('OVN_SRCDIR'),
|
||||
remove=not bool(os.getenv('KEEP_VENV')))
|
||||
atexit.register(ovsvenv.cleanUp)
|
||||
ovsvenv.setUp()
|
||||
|
|
|
@ -129,26 +129,29 @@ class OvsVenvFixture(fixtures.Fixture):
|
|||
|
||||
|
||||
class OvsOvnVenvFixture(OvsVenvFixture):
|
||||
PATH_VAR_TEMPLATE = OvsVenvFixture.PATH_VAR_TEMPLATE + (
|
||||
":{0}/ovn/controller:{0}/ovn/northd:{0}/ovn/utilities")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.add_chassis = kwargs.pop('add_chassis', False)
|
||||
self.ovndir = kwargs.pop('ovndir')
|
||||
self.PATH_VAR_TEMPLATE += (
|
||||
":{0}/controller:{0}/northd:{0}/utilities".format(
|
||||
self.ovndir))
|
||||
super(OvsOvnVenvFixture, self).__init__(*args, **kwargs)
|
||||
self.env.update({'OVN_RUNDIR': self.venv})
|
||||
|
||||
@property
|
||||
def ovnsb_schema(self):
|
||||
path = os.path.join(self.ovsdir, 'ovn', 'ovn-sb.ovsschema')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
return os.path.join(self.ovsdir, 'ovn-sb.ovsschema')
|
||||
return os.path.join(self.ovndir, 'ovn-sb.ovsschema')
|
||||
|
||||
@property
|
||||
def ovnnb_schema(self):
|
||||
path = os.path.join(self.ovsdir, 'ovn', 'ovn-nb.ovsschema')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
return os.path.join(self.ovsdir, 'ovn-nb.ovsschema')
|
||||
return os.path.join(self.ovndir, 'ovn-nb.ovsschema')
|
||||
|
||||
@property
|
||||
def ovnnb_connection(self):
|
||||
|
|
|
@ -9,3 +9,9 @@ if [ "$OVS_SRCDIR" -a ! -d "$OVS_SRCDIR" ]; then
|
|||
git clone git://github.com/openvswitch/ovs.git $OVS_SRCDIR
|
||||
(cd $OVS_SRCDIR && ./boot.sh && PYTHON=/usr/bin/python ./configure && make -j$(($(nproc) + 1)))
|
||||
fi
|
||||
if [ "$OVN_SRCDIR" -a ! -d "$OVN_SRCDIR" ]; then
|
||||
echo "Building OVN in $OVN_SRCDIR"
|
||||
mkdir -p $OVN_SRCDIR
|
||||
git clone git://github.com/ovn-org/ovn.git $OVN_SRCDIR
|
||||
(cd $OVN_SRCDIR && ./boot.sh && PYTHON=/usr/bin/python ./configure --with-ovs-source=$OVS_SRCDIR && make -j$(($(nproc) + 1)))
|
||||
fi
|
||||
|
|
8
tox.ini
8
tox.ini
|
@ -43,20 +43,16 @@ basepython = python3
|
|||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:functional]
|
||||
basepython = python3
|
||||
setenv = {[testenv]setenv}
|
||||
OS_TEST_PATH=./ovsdbapp/tests/functional
|
||||
OVS_SRCDIR={envdir}/src/ovs
|
||||
OVN_SRCDIR={envdir}/src/ovn
|
||||
passenv = KEEP_VENV
|
||||
commands =
|
||||
{toxinidir}/tools/setup-ovs.sh
|
||||
{[testenv]commands}
|
||||
|
||||
[testenv:functional-py36]
|
||||
basepython = python3.6
|
||||
setenv = {[testenv:functional]setenv}
|
||||
passenv = {[testenv:functional]passenv}
|
||||
commands = {[testenv:functional]commands}
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
jobs:
|
||||
- openstack-tox-lower-constraints
|
||||
- openstack-tox-functional
|
||||
- openstack-tox-functional-py36
|
||||
- ovsdbapp-tempest-dsvm-networking-ovn-ovs-release
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-lower-constraints
|
||||
- openstack-tox-functional
|
||||
- openstack-tox-functional-py36
|
||||
- ovsdbapp-tempest-dsvm-networking-ovn-ovs-release
|
||||
|
|
Loading…
Reference in New Issue