From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17BDAA052F; Wed, 29 Jan 2020 18:27:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 723CD1C06D; Wed, 29 Jan 2020 18:27:03 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 6A1091C024 for ; Wed, 29 Jan 2020 18:27:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580318821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fFO/5NxOR7o0aOc+KSThB10kzMAWUpXhuSuyzfp0fVo=; b=eHr3ZkFLWdjvJTYgbrGx59CIGm4D0qLD24wpBy/ZtijwhJ5nZIEf9h8u28qJvsJg2WeX0i +Ot7yDLgXw7YKc1j6K3PvBAf23vdEYHjY7dZw+DFYE2HQDHrSLf/cSx+nHaNOzXL9l/KaE WqmoiFeXTMlN5XHQwuaVwskqlxS8hko= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-201-mXP5cI_CM8CsurDrVi2KMg-1; Wed, 29 Jan 2020 12:26:42 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2CDF4804AAE; Wed, 29 Jan 2020 17:26:41 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-128.brq.redhat.com [10.40.204.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46F9F84BC9; Wed, 29 Jan 2020 17:26:38 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, kevin.laatz@intel.com, aconole@redhat.com, nhorman@tuxdriver.com, akhil.goyal@nxp.com, anoobj@marvell.com, Michael Santana , Ferruh Yigit , Andrew Rybchenko Date: Wed, 29 Jan 2020 18:26:20 +0100 Message-Id: <20200129172621.28565-4-david.marchand@redhat.com> In-Reply-To: <20200129172621.28565-1-david.marchand@redhat.com> References: <20191220152058.10739-1-david.marchand@redhat.com> <20200129172621.28565-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: mXP5cI_CM8CsurDrVi2KMg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH v2 3/4] build: test meson installation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Let's test installing with meson as part of Travis and the devtools/test-meson-builds.sh script. The resulting headers and binaries make more sense to run checks against, since they should be the same as what the final users get. In this patch, test-null.sh is now called on an installed testpmd. For this to work LD_LIBRARY_PATH must be set appropriately, but it can be hard to debug, so a call to ldd has been added. The (future) ABI compatibility checks will also need to filter its report against installed public headers. Signed-off-by: David Marchand --- .ci/linux-build.sh | 6 +++++- devtools/test-meson-builds.sh | 27 ++++++++++++++++----------- devtools/test-null.sh | 1 + 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index ccc3a7ccd..e61aa2b0a 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -29,11 +29,15 @@ if [ "$BUILD_32BIT" =3D "1" ]; then fi =20 OPTS=3D"$OPTS --default-library=3D$DEF_LIB" +OPTS=3D"$OPTS --prefix=3D/usr -Dlibdir=3Dlib" meson build --werror -Dexamples=3Dall $OPTS ninja -C build +DESTDIR=3D$(pwd)/install ninja -C build install =20 if [ "$AARCH64" !=3D "1" ]; then - devtools/test-null.sh + export LD_LIBRARY_PATH=3D$(pwd)/install/usr/lib + devtools/test-null.sh install/usr/bin/dpdk-testpmd + unset LD_LIBRARY_PATH fi =20 if [ "$RUN_TESTS" =3D "1" ]; then diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index aed175889..254588ae6 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -63,7 +63,7 @@ config () # =09shift =09builddir=3D$1 =09shift -=09options=3D"--werror -Dexamples=3Dall" +=09options=3D"--werror -Dexamples=3Dall --prefix=3D/usr -Dlibdir=3Dlib" =09for option in $DPDK_MESON_OPTIONS ; do =09=09options=3D"$options -D$option" =09done @@ -74,22 +74,29 @@ config () # =09fi } =20 -compile () # +compile () # { =09builddir=3D$1 =09shift +=09export DESTDIR=3D$1 +=09shift +=09rm -rf $DESTDIR =09if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then =09=09# for full output from ninja use "-v" =09=09echo "$ninja_cmd -v -C $builddir" =09=09$ninja_cmd -v -C $builddir +=09=09$ninja_cmd -v -C $builddir install =09elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then =09=09# for keeping the history of short cmds, pipe through cat =09=09echo "$ninja_cmd -C $builddir | cat" =09=09$ninja_cmd -C $builddir | cat +=09=09$ninja_cmd -C $builddir install | cat =09else =09=09echo "$ninja_cmd -C $builddir" =09=09$ninja_cmd -C $builddir +=09=09$ninja_cmd -C $builddir install =09fi +=09unset DESTDIR } =20 build () # @@ -102,7 +109,8 @@ build () # =09command -v ${CC##* } >/dev/null 2>&1 || return 0 =09load_env $targetcc || return 0 =09config $srcdir $builds_dir/$targetdir $* -=09compile $builds_dir/$targetdir +=09compile $builds_dir/$targetdir \ +=09=09$(readlink -f $builds_dir/$targetdir/install) } =20 if [ "$1" =3D "-vv" ] ; then @@ -134,7 +142,7 @@ ok=3D$(cc -march=3D$default_machine -E - < /dev/null > = /dev/null 2>&1 || echo false) if [ "$ok" =3D "false" ] ; then =09default_machine=3D'corei7' fi -build build-x86-default cc -Dlibdir=3Dlib -Dmachine=3D$default_machine $us= e_shared +build build-x86-default cc -Dmachine=3D$default_machine $use_shared =20 c=3Daarch64-linux-gnu-gcc # generic armv8a with clang as host compiler @@ -150,12 +158,9 @@ for f in $srcdir/config/arm/arm64_[bdo]*gcc ; do =09unset CC done =20 -# 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=3D$(readlink -f $builds_dir/build-x86-default) -export DESTDIR=3D$build_path/install-root -$ninja_cmd -C $build_path install - +# Use the x86-default target, to check the sample apps build using the +# pkg-config file for cflags and libs +export DESTDIR=3D$(readlink -f $builds_dir/build-x86-default/install) load_env cc pc_file=3D$(find $DESTDIR -name libdpdk.pc) export PKG_CONFIG_PATH=3D$(dirname $pc_file):$PKG_CONFIG_PATH @@ -165,6 +170,6 @@ if pkg-config --define-prefix libdpdk >/dev/null 2>&1; = then =09export PKGCONF=3D"pkg-config --define-prefix" =09for example in cmdline helloworld l2fwd l3fwd skeleton timer; do =09=09echo "## Building $example" -=09=09$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all +=09=09$MAKE -C $DESTDIR/usr/share/dpdk/examples/$example clean all =09done fi diff --git a/devtools/test-null.sh b/devtools/test-null.sh index 548de8113..8121ec9e3 100755 --- a/devtools/test-null.sh +++ b/devtools/test-null.sh @@ -21,6 +21,7 @@ fi =20 if ldd $testpmd | grep -q librte_ ; then =09export LD_LIBRARY_PATH=3D$build/drivers:$build/lib:$LD_LIBRARY_PATH +=09ldd $testpmd =09libs=3D'-d librte_mempool_ring.so -d librte_pmd_null.so' else =09libs=3D --=20 2.23.0