[v2,2/2] devtools: use absolute path for the build directory
diff mbox series

Message ID 1600854012-10226-2-git-send-email-phil.yang@arm.com
State New
Delegated to: David Marchand
Headers show
Series
  • [v2,1/2] devtools: fix ninja install breakage under relative path
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch warning coding style issues

Commit Message

Phil Yang Sept. 23, 2020, 9:40 a.m. UTC
The 'ninja install' needs absolute paths. Use the absolute path for the
default build_dir to avoid repeatedly calling of readlink.

Suggested-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 devtools/test-meson-builds.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Juraj Linkeš Sept. 23, 2020, 10:13 a.m. UTC | #1
> -----Original Message-----
> From: Phil Yang <phil.yang@arm.com>
> Sent: Wednesday, September 23, 2020 11:40 AM
> To: dev@dpdk.org; david.marchand@redhat.com
> Cc: Juraj Linkeš <juraj.linkes@pantheon.tech>; Ruifeng.Wang@arm.com;
> nd@arm.com; Bruce Richardson <bruce.richardson@intel.com>
> Subject: [PATCH v2 2/2] devtools: use absolute path for the build directory
> 
> The 'ninja install' needs absolute paths. Use the absolute path for the default
> build_dir to avoid repeatedly calling of readlink.
> 
> Suggested-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> ---
>  devtools/test-meson-builds.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index
> 5236b9c..f43f715 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -16,7 +16,7 @@ srcdir=$(dirname $(readlink -f $0))/..
> 
>  MESON=${MESON:-meson}
>  use_shared="--default-library=shared"
> -builds_dir=${DPDK_BUILD_TEST_DIR:-.}
> +builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.})
> 
>  if command -v gmake >/dev/null 2>&1 ; then
>  	MAKE=gmake
> @@ -168,11 +168,11 @@ build () # <directory> <target compiler | cross file>
> <meson options>
>  		fi
> 
>  		install_target $builds_dir/$targetdir \
> -			$(readlink -f $builds_dir/$targetdir/install)
> +			$builds_dir/$targetdir/install
>  		$srcdir/devtools/gen-abi.sh \
> -			$(readlink -f $builds_dir/$targetdir/install)
> +			$builds_dir/$targetdir/install
>  		$srcdir/devtools/check-abi.sh $abirefdir/$targetdir \
> -			$(readlink -f $builds_dir/$targetdir/install)
> +			$builds_dir/$targetdir/install
>  	fi
>  }
> 
> --
> 2.7.4
> 

Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>

Patch
diff mbox series

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 5236b9c..f43f715 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -16,7 +16,7 @@  srcdir=$(dirname $(readlink -f $0))/..
 
 MESON=${MESON:-meson}
 use_shared="--default-library=shared"
-builds_dir=${DPDK_BUILD_TEST_DIR:-.}
+builds_dir=$(readlink -f ${DPDK_BUILD_TEST_DIR:-.})
 
 if command -v gmake >/dev/null 2>&1 ; then
 	MAKE=gmake
@@ -168,11 +168,11 @@  build () # <directory> <target compiler | cross file> <meson options>
 		fi
 
 		install_target $builds_dir/$targetdir \
-			$(readlink -f $builds_dir/$targetdir/install)
+			$builds_dir/$targetdir/install
 		$srcdir/devtools/gen-abi.sh \
-			$(readlink -f $builds_dir/$targetdir/install)
+			$builds_dir/$targetdir/install
 		$srcdir/devtools/check-abi.sh $abirefdir/$targetdir \
-			$(readlink -f $builds_dir/$targetdir/install)
+			$builds_dir/$targetdir/install
 	fi
 }