summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2019-07-02 15:44:43 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-07-02 18:10:02 +0200
commit7f80a2102bbb842a528ac17bcfc52e46865602df (patch)
treeb41ee7e71b0a54e9c31b3828c45460872cdbc558
parentd6917418e4e92a1d4ac0198ffb622cdce9d782a9 (diff)
downloaddpdk-next-eventdev-7f80a2102bbb842a528ac17bcfc52e46865602df.zip
dpdk-next-eventdev-7f80a2102bbb842a528ac17bcfc52e46865602df.tar.gz
dpdk-next-eventdev-7f80a2102bbb842a528ac17bcfc52e46865602df.tar.xz
devtools: test pkg-config file
The pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
-rwxr-xr-xdevtools/test-meson-builds.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index fe11e3c..57d1af4 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/..
MESON=${MESON:-meson}
use_shared="--default-library=shared"
+if command -v gmake >/dev/null 2>&1 ; then
+ MAKE=gmake
+else
+ MAKE=make
+fi
if command -v ninja >/dev/null 2>&1 ; then
ninja_cmd=ninja
elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -92,3 +97,17 @@ if command -v $c >/dev/null 2>&1 ; then
$use_shared --cross-file $f
done
fi
+
+# Test installation of the x86-default target, to be used for checking
+# the sample apps build using the pkg-config file for cflags and libs
+build_path=build-x86-default
+export DESTDIR=$(pwd)/$build_path/install-root
+$ninja_cmd -C $build_path install
+
+pc_file=$(find $DESTDIR -name libdpdk.pc)
+export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
+
+for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
+ echo "## Building $example"
+ $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all
+done