DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, bruce.richardson@intel.com
Subject: [PATCH 3/4] devtools: build all examples externally
Date: Tue, 13 Jun 2023 10:17:40 +0200	[thread overview]
Message-ID: <20230613081741.4083273-4-david.marchand@redhat.com> (raw)
In-Reply-To: <20230613081741.4083273-1-david.marchand@redhat.com>

So far, users of test-meson-builds.sh had to define their own set of
examples to build externally. This is not that great because users need
to maintain this list when examples are removed/added.

Rework the script so that the 'all' value triggers an automatic
discovery based on what was configured/compiled with meson/ninja.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/test-meson-builds.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 9131088c9d..cab3373544 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -299,6 +299,20 @@ export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
 libdir=$(dirname $(find $DESTDIR -name librte_eal.so))
 export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
 examples=${DPDK_BUILD_TEST_EXAMPLES:-"cmdline helloworld l2fwd l3fwd skeleton timer"}
+if [ "$examples" = 'all' ]; then
+	examples=$(ninja -C $build_path -t targets all | grep 'examples/.*:.*c_LINKER' |
+	while read target; do
+		target=${target%%:*}
+		target=${target#examples/dpdk-}
+		if [ -e $srcdir/examples/$target/Makefile ]; then
+			echo $target
+			continue
+		fi
+		find $srcdir/examples -name Makefile |
+		sed -ne "s,$srcdir/examples/\([^/]*\)\(/.*\|\)/$target/Makefile,\1,p"
+	done | sort -u |
+	tr '\n' ' ')
+fi
 # if pkg-config defines the necessary flags, test building some examples
 if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
-- 
2.40.1


  parent reply	other threads:[~2023-06-13  8:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  8:17 [PATCH 0/4] Test examples compilation externally David Marchand
2023-06-13  8:17 ` [PATCH 1/4] examples/fips_validation: fix external build David Marchand
2023-06-13 15:05   ` [EXT] " Gowrishankar Muthukrishnan
2023-06-13  8:17 ` [PATCH 2/4] examples/server_node_efd: simplify build configuration David Marchand
2023-06-13 11:05   ` David Marchand
2023-06-13  8:17 ` David Marchand [this message]
2023-06-13  9:20   ` [PATCH 3/4] devtools: build all examples externally Bruce Richardson
2023-06-13  9:29     ` David Marchand
2023-06-13  9:23   ` Bruce Richardson
2023-06-13  8:17 ` [PATCH 4/4] ci: build " David Marchand
2023-06-13  9:21 ` [PATCH 0/4] Test examples compilation externally Bruce Richardson
2023-06-13 14:06 ` [PATCH v2 " David Marchand
2023-06-13 14:06   ` [PATCH v2 1/4] examples/fips_validation: fix external build David Marchand
2023-06-13 14:06   ` [PATCH v2 2/4] examples/server_node_efd: simplify build configuration David Marchand
2023-06-20  9:42     ` Thomas Monjalon
2023-06-20  9:58       ` David Marchand
2023-06-13 14:06   ` [PATCH v2 3/4] devtools: build all examples externally David Marchand
2023-06-20  9:45     ` Thomas Monjalon
2023-06-20  9:52       ` David Marchand
2023-06-13 14:06   ` [PATCH v2 4/4] ci: build " David Marchand
2023-06-16 13:14     ` Aaron Conole
2023-06-20 14:07 ` [PATCH v3 0/4] Test examples compilation externally David Marchand
2023-06-20 14:07   ` [PATCH v3 1/4] examples/fips_validation: fix external build David Marchand
2023-06-21  6:23     ` David Marchand
2023-06-20 14:07   ` [PATCH v3 2/4] examples/server_node_efd: simplify build configuration David Marchand
2023-06-20 14:07   ` [PATCH v3 3/4] devtools: build all examples externally David Marchand
2023-06-20 14:07   ` [PATCH v3 4/4] ci: build " David Marchand
2023-06-22 13:48   ` [PATCH] examples/l2fwd-cat: fix external build Thomas Monjalon
2023-06-22 13:55     ` Thomas Monjalon
2023-06-22 13:54   ` [PATCH v3 0/4] Test examples compilation externally Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230613081741.4083273-4-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).