Skip to contentSkip to conversation

devtools: document test meson script config options

PATCH In review Ferruh Yigit 4 participants 10 messages Dec 6, 2022 – Dec 21, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 devtools: document test meson script config options

Document config options of script that can be provided by 'devel.config' config file.

---
 devtools/test-meson-builds.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
devtools/test-meson-builds.sh +10 -0
index 3a308bc9af65..bbe90e2bde2e 100755
@@ -12,6 +12,16 @@ PIPEFAIL=""
 set -o | grep -q pipefail && set -o pipefail && PIPEFAIL=1
 
 srcdir=$(dirname $(readlink -f $0))/..
+
+# Load config options:
+# - DPDK_BUILD_TEST_DIR
+#
+# - DPDK_MESON_OPTIONS
+#
+# - DPDK_ABI_REF_DIR
+# - DPDK_ABI_REF_VERSION
+#
+# - DPDK_BUILD_TEST_EXAMPLES
 . $srcdir/devtools/load-devel-config
 
 MESON=${MESON:-meson}
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 devtools: configure source repo to use as ABI reference

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.

---
 devtools/test-meson-builds.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
devtools/test-meson-builds.sh +3 -1
index bbe90e2bde2e..8a0ed92fcf0a 100755
@@ -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
Signature · 1 line
2.25.1
Acked-by on v1 2/2
#2 lore raw

RE: [EXT] [PATCH 2/2] devtools: configure source repo to use as ABI reference

Quoted 16 lines

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
`

Quoted 8 lines

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.

---

Worked for me, but I still needed to clone the dpdk-stable repo manually.
I was hoping, test-meson-build.sh would do that by itself.
Had it been a tag in same repo, it would have been straight forward as before.
I would still suggest to add a tag v22.11.1 in main branch and all can use that instead of v22.11. The fix that we are talking about is a mandatory one for each one to use for ABI checks, dpdk-stable patches are not mandatory for the users.

-Akhil

#3 lore raw

Re: [EXT] [PATCH 2/2] devtools: configure source repo to use as ABI reference

08/12/2022 19:14, Akhil Goyal:

Quoted 25 lines
Quoted 16 lines

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
`

Quoted 8 lines

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.

---

Quoted 6 lines

Worked for me, but I still needed to clone the dpdk-stable repo manually.
I was hoping, test-meson-build.sh would do that by itself.
Had it been a tag in same repo, it would have been straight forward as before.
I would still suggest to add a tag v22.11.1 in main branch and all can use that instead of v22.11.

First, v22.11.1 exists already in dpdk-stable. Second, vXX.YY.z tags are supposed to be only in dpdk-stable.

Quoted 2 lines

The fix that we are talking about is a mandatory one for each one to use for ABI checks, dpdk-stable patches are not mandatory for the users.

You could have dpdk-stable as a remote in your main DPDK directory.
If you don't want to do that, you could refer to the commit SHA1 of the fix I think.

#4 lore raw

RE: [EXT] [PATCH 2/2] devtools: configure source repo to use as ABI reference

Quoted 28 lines

08/12/2022 19:14, Akhil Goyal:

Quoted 27 lines
Quoted 16 lines

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
`

Quoted 8 lines

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.

---

Quoted 8 lines
Quoted 4 lines

Worked for me, but I still needed to clone the dpdk-stable repo manually. I was hoping, test-meson-build.sh would do that by itself.
Had it been a tag in same repo, it would have been straight forward as before. I would still suggest to add a tag v22.11.1 in main branch and all can use that

instead of v22.11.

First, v22.11.1 exists already in dpdk-stable. Second, vXX.YY.z tags are supposed to be only in dpdk-stable.

May be some other tag name we can think. v22.11.hotfix or something better. I was just asking to give a name to commit, and NOT updating the VERSION file.

Quoted 9 lines
Quoted 2 lines

The fix that we are talking about is a mandatory one for each one to use for

ABI checks,

Quoted 1 line

dpdk-stable patches are not mandatory for the users.

You could have dpdk-stable as a remote in your main DPDK directory. If you don't want to do that, you could refer to the commit SHA1 of the fix I think.

Adding remote did not solve the issue as the commits are different(version commit). I cloned stable repo separately and it worked for me.
Since you refer to use commit SHA, why not give it a name, remembering SHA is not easy.

-Akhil

#5 lore raw

Re: [PATCH 2/2] devtools: configure source repo to use as ABI reference

In reply to Ferruh Yigit
Quoted 5 lines · Ferruh Yigit

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.

Quoted 7 lines

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_SRC could be passed as a remote repository. This should remove the need for any "git remote" configuration.

$ DPDK_ABI_REF_SRC=https://dpdk.org/git/dpdk-stable
DPDK_ABI_REF_VERSION=v22.11.1 ./devtools/test-meson-builds.sh
devtools/test-meson-builds.sh +1 -1
index 406bf4e184..48f4e52df3 100755
@@ -18,8 +18,8 @@ srcdir=$(dirname $(readlink -f $0))/..
 #
 # - DPDK_MESON_OPTIONS
 #
-# - DPDK_ABI_REF_SRC
 # - DPDK_ABI_REF_DIR
+# - DPDK_ABI_REF_SRC
 # - DPDK_ABI_REF_VERSION
 #
 # - DPDK_BUILD_TEST_EXAMPLES
@@ -186,10 +186,14 @@ 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 \
+                               abirefsrc=${DPDK_ABI_REF_SRC:-$srcdir}
+                               abirefcloneopts=
+                               if [ -d $abirefsrc ]; then
+                                       abirefcloneopts="--local --no-hardlinks"
+                               fi
+                               git clone $abirefcloneopts \
                                        --single-branch \
                                        -b $DPDK_ABI_REF_VERSION \
                                        $abirefsrc $abirefdir/src
Quoted 10 lines

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.

Signature · 1 line
David Marchand
#6 lore raw

Re: [PATCH 2/2] devtools: configure source repo to use as ABI reference

Quoted 14 lines · David Marchand
Quoted 5 lines · Ferruh Yigit

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.

Quoted 7 lines

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/ \

Quoted 6 lines

DPDK_ABI_REF_SRC could be passed as a remote repository. This should remove the need for any "git remote" configuration.

$ DPDK_ABI_REF_SRC=https://dpdk.org/git/dpdk-stable
DPDK_ABI_REF_VERSION=v22.11.1 ./devtools/test-meson-builds.sh

+1 to 'DPDK_ABI_REF_SRC' accept either folder or remote git repo.

Can you send a v2 with your sign off added, or do you want me send a v2?

Quoted 48 lines
devtools/test-meson-builds.sh +1 -1
index 406bf4e184..48f4e52df3 100755
@@ -18,8 +18,8 @@ srcdir=$(dirname $(readlink -f $0))/..
 #
 # - DPDK_MESON_OPTIONS
 #
-# - DPDK_ABI_REF_SRC
 # - DPDK_ABI_REF_DIR
+# - DPDK_ABI_REF_SRC
 # - DPDK_ABI_REF_VERSION
 #
 # - DPDK_BUILD_TEST_EXAMPLES
@@ -186,10 +186,14 @@ 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

devtools/test-meson-builds.sh +6 -2
-                       abirefsrc=${DPDK_ABI_REF_SRC:-$srcdir}
                        # clone current sources
                        if [ ! -d $abirefdir/src ]; then
-                               git clone --local --no-hardlinks \
+                               abirefsrc=${DPDK_ABI_REF_SRC:-$srcdir}
+                               abirefcloneopts=
+                               if [ -d $abirefsrc ]; then
+                                       abirefcloneopts="--local --no-hardlinks"
+                               fi
+                               git clone $abirefcloneopts \
                                        --single-branch \
                                        -b $DPDK_ABI_REF_VERSION \
                                        $abirefsrc $abirefdir/src
Quoted 12 lines

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.

#7 lore raw

PATCH v2 1/2 devtools: document test meson script config options

In reply to Ferruh Yigit

From: Ferruh Yigit <[email protected]>

Document config options of script that can be provided by 'devel.config' config file.

---
 devtools/test-meson-builds.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
devtools/test-meson-builds.sh +10 -0
index 7efd5576fc..02541c19aa 100755
@@ -12,6 +12,16 @@ PIPEFAIL=""
 set -o | grep -q pipefail && set -o pipefail && PIPEFAIL=1
 
 srcdir=$(dirname $(readlink -f $0))/..
+
+# Load config options:
+# - DPDK_BUILD_TEST_DIR
+#
+# - DPDK_MESON_OPTIONS
+#
+# - DPDK_ABI_REF_DIR
+# - DPDK_ABI_REF_VERSION
+#
+# - DPDK_BUILD_TEST_EXAMPLES
 . $srcdir/devtools/load-devel-config
 
 MESON=${MESON:-meson}
Signature · 1 line
2.38.1
#8 lore raw

PATCH v2 2/2 devtools: configure source repo to use as ABI reference

From: Ferruh Yigit <[email protected]>

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 clone for reference using 'DPDK_ABI_REF_SRC' environment variable. 'DPDK_ABI_REF_SRC' may refer to a directory containing a cloned git repository, or a remote git repository.

It is possible to put these variables to 'devel.config' config file, or provide via command line, like:
`
DPDK_ABI_REF_SRC=https://dpdk.org/git/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.

---
Changes since v1:
- expanded DPDK_ABI_REF_SRC usage to "non-local" sources,

---
 devtools/test-meson-builds.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
devtools/test-meson-builds.sh +8 -2
index 02541c19aa..48f4e52df3 100755
@@ -19,6 +19,7 @@ srcdir=$(dirname $(readlink -f $0))/..
 # - DPDK_MESON_OPTIONS
 #
 # - DPDK_ABI_REF_DIR
+# - DPDK_ABI_REF_SRC
 # - DPDK_ABI_REF_VERSION
 #
 # - DPDK_BUILD_TEST_EXAMPLES
@@ -187,10 +188,15 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options]
 		if [ ! -d $abirefdir/$targetdir ]; then
 			# clone current sources
 			if [ ! -d $abirefdir/src ]; then
-				git clone --local --no-hardlinks \
+				abirefsrc=${DPDK_ABI_REF_SRC:-$srcdir}
+				abirefcloneopts=
+				if [ -d $abirefsrc ]; then
+					abirefcloneopts="--local --no-hardlinks"
+				fi
+				git clone $abirefcloneopts \
 					--single-branch \
 					-b $DPDK_ABI_REF_VERSION \
-					$srcdir $abirefdir/src
+					$abirefsrc $abirefdir/src
 			fi
 
 			rm -rf $abirefdir/build
Signature · 1 line
2.38.1
#9 lore raw

Re: [PATCH v2 2/2] devtools: configure source repo to use as ABI reference

Quoted 27 lines · David Marchand

From: Ferruh Yigit <[email protected]>

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 clone for reference using 'DPDK_ABI_REF_SRC' environment variable. 'DPDK_ABI_REF_SRC' may refer to a directory containing a cloned git repository, or a remote git repository.

It is possible to put these variables to 'devel.config' config file, or provide via command line, like:
`
DPDK_ABI_REF_SRC=https://dpdk.org/git/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.

Quoted 6 lines

---
Changes since v1:
- expanded DPDK_ABI_REF_SRC usage to "non-local" sources,

Series applied, thanks.

Signature · 1 line
David Marchand