ovsdbapp/tools/setup-ovs.sh
Terry Wilson ee28e381fb 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
2023-04-03 15:46:39 -05:00

17 lines
509 B
Bash
Executable File

#!/bin/bash -xe
OVN_BRANCH=${OVN_BRANCH:-main}
if [ "$OVN_SRCDIR" -a ! -d "$OVN_SRCDIR" ]; then
echo "Building OVN branch $OVN_BRANCH in $OVN_SRCDIR"
mkdir -p $OVN_SRCDIR
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