summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariano Lopez <just.another.mariano@gmail.com>2019-04-09 00:44:14 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-11 21:12:48 +0100
commitdb9a0dd7849edcfa1ae4b56d0c991997b850e913 (patch)
tree029febae8c28ab905265b2105b3ac6498fc1d11f
parent6995ec65e8019dc6fdf96fc9d508ba600b4551d9 (diff)
downloadpoky-db9a0dd7849edcfa1ae4b56d0c991997b850e913.tar.gz
util-linux: Use PTEST binary directory
Some binaries generated by util-linux will be replaced by core-utils in the final image by update-alternatives, so use a dedicated directory with symlinks to avoid using a binary generated by another package. This will solve the issue with the ptest runner timing out when running the kill ptests for util-linux. [YOCTO #13238] (From OE-Core rev: 1a8fd875f0b171e25a5ac8a32cc81ff3887935bd) Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc5
-rw-r--r--meta/recipes-core/util-linux/util-linux/run-ptest4
2 files changed, 7 insertions, 2 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index c7ba8c446f..34255a2dec 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -284,6 +284,7 @@ ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
284 284
285BBCLASSEXTEND = "native nativesdk" 285BBCLASSEXTEND = "native nativesdk"
286 286
287PTEST_BINDIR = "1"
287do_compile_ptest() { 288do_compile_ptest() {
288 oe_runmake buildtest-TESTS 289 oe_runmake buildtest-TESTS
289} 290}
@@ -312,8 +313,8 @@ do_install_ptest() {
312 '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ 313 '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \
313 ${D}${PTEST_PATH}/tests/functions.sh 314 ${D}${PTEST_PATH}/tests/functions.sh
314 315
315 # "kill -L" behaves differently than "/bin/kill -L" so we need an additional fix 316 # Running "kill" without the the complete path would use the shell's built-in kill
316 sed -i -e \ 317 sed -i -e \
317 '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \ 318 '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \
318 ${D}${PTEST_PATH}/tests/commands.sh 319 ${D}${PTEST_PATH}/tests/commands.sh
319} 320}
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest
index 8c57bd2074..03248325bf 100644
--- a/meta/recipes-core/util-linux/util-linux/run-ptest
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -1,5 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3current_path=$(readlink -f $0)
4export bindir=$(dirname $current_path)
5export PATH=$bindir/bin:$PATH
6
3cd tests || exit 1 7cd tests || exit 1
4 8
5comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) 9comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)