[PATCH 2/2] devtools: configure source repo to use as ABI reference
Ferruh Yigit
ferruh.yigit at amd.com
Tue Dec 6 13:23:41 CET 2022
By default 'test-meson-builds.sh' script clones the repository which the
script is in, and selects a configured branch ('DPDK_ABI_REF_VERSION')
as a reference for ABI check.
This patch enables selecting different repository to close for reference
using 'DPDK_ABI_REF_SRC' environment variable.
It is possible to put these variables to 'devel.config' config file, or
provide via command line, like:
`
DPDK_ABI_REF_SRC=~/dpdk-stable/ \
DPDK_ABI_REF_VERSION=v22.11.1 \
DPDK_ABI_REF_DIR=/tmp/dpdk-abiref \
./devtools/test-meson-builds.sh
`
When 'DPDK_ABI_REF_SRC' is not defined, script behaves as it did
previously.
Other alternative to using 'DPDK_ABI_REF_SRC' variable is adding that
other repo as a new 'remote' to the exiting git repository.
Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
devtools/test-meson-builds.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index bbe90e2bde2e..8a0ed92fcf0a 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -18,6 +18,7 @@ srcdir=$(dirname $(readlink -f $0))/..
#
# - DPDK_MESON_OPTIONS
#
+# - DPDK_ABI_REF_SRC
# - DPDK_ABI_REF_DIR
# - DPDK_ABI_REF_VERSION
#
@@ -185,12 +186,13 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options]
if [ -n "$DPDK_ABI_REF_VERSION" -a "$abicheck" = ABI ] ; then
abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION
if [ ! -d $abirefdir/$targetdir ]; then
+ abirefsrc=${DPDK_ABI_REF_SRC:-$srcdir}
# clone current sources
if [ ! -d $abirefdir/src ]; then
git clone --local --no-hardlinks \
--single-branch \
-b $DPDK_ABI_REF_VERSION \
- $srcdir $abirefdir/src
+ $abirefsrc $abirefdir/src
fi
rm -rf $abirefdir/build
--
2.25.1
More information about the dev
mailing list