Use OVN's OVS submodule for functional tests
The OVN tree for several years has had an OVS submodule that pulls in the version of OVS it is guaranteed to work with. There is currently a patch in OVS master that breaks the build of OVN main so switch to using the submodule. Change-Id: I61195cd3ebf8a5015890d3ba3988c3d9795ee817
This commit is contained in:
parent
2ed1280148
commit
ee28e381fb
@ -1,25 +1,16 @@
|
||||
#!/bin/bash -xe
|
||||
|
||||
OVS_BRANCH=${OVS_BRANCH:-master}
|
||||
OVN_BRANCH=${OVN_BRANCH:-main}
|
||||
|
||||
function use_new_ovn_repository {
|
||||
# If OVN_BRANCH > branch-2.12 return 0
|
||||
return $(! printf "%s\n%s" $OVN_BRANCH branch-2.12 | sort -C -V)
|
||||
}
|
||||
|
||||
# We require at least OVS 2.7. Testing infrastructure doesn't support it yet,
|
||||
# so build it. Eventually, we should run some checks to see what is actually
|
||||
# installed and see if we can use it instead.
|
||||
if [ "$OVS_SRCDIR" -a ! -d "$OVS_SRCDIR" ]; then
|
||||
echo "Building OVS branch $OVS_BRANCH in $OVS_SRCDIR"
|
||||
mkdir -p $OVS_SRCDIR
|
||||
git clone https://github.com/openvswitch/ovs.git $OVS_SRCDIR
|
||||
(cd $OVS_SRCDIR && git checkout $OVS_BRANCH && ./boot.sh && PYTHON=/usr/bin/python ./configure && make -j$(($(nproc) + 1)))
|
||||
fi
|
||||
if use_new_ovn_repository && [ "$OVN_SRCDIR" -a ! -d "$OVN_SRCDIR" ]; then
|
||||
if [ "$OVN_SRCDIR" -a ! -d "$OVN_SRCDIR" ]; then
|
||||
echo "Building OVN branch $OVN_BRANCH in $OVN_SRCDIR"
|
||||
mkdir -p $OVN_SRCDIR
|
||||
git clone https://github.com/ovn-org/ovn.git $OVN_SRCDIR
|
||||
(cd $OVN_SRCDIR && git checkout $OVN_BRANCH && ./boot.sh && PYTHON=/usr/bin/python ./configure --with-ovs-source=$OVS_SRCDIR && make -j$(($(nproc) + 1)))
|
||||
git clone --recurse-submodules https://github.com/ovn-org/ovn.git $OVN_SRCDIR
|
||||
pushd $OVN_SRCDIR
|
||||
git checkout $OVN_BRANCH
|
||||
pushd ovs
|
||||
./boot.sh && PYTHON=/usr/bin/python ./configure && make -j$(($(nproc) + 1))
|
||||
popd
|
||||
./boot.sh && PYTHON=/usr/bin/python ./configure && make -j$(($(nproc) + 1))
|
||||
popd
|
||||
fi
|
||||
|
5
tox.ini
5
tox.ini
@ -63,10 +63,9 @@ commands = oslo_debug_helper {posargs}
|
||||
[testenv:functional]
|
||||
setenv = {[testenv]setenv}
|
||||
OS_TEST_PATH=./ovsdbapp/tests/functional
|
||||
OVS_SRCDIR={envdir}/src/ovs
|
||||
OVN_SRCDIR={envdir}/src/ovn
|
||||
VTEP_SRCDIR={envdir}/src/ovs/vtep
|
||||
OVS_BRANCH={env:OVS_BRANCH:}
|
||||
OVS_SRCDIR={envdir}/src/ovn/ovs
|
||||
VTEP_SRCDIR={envdir}src/ovn/ovs/vtep
|
||||
OVN_BRANCH={env:OVN_BRANCH:}
|
||||
passenv = KEEP_VENV
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user