]> code.ossystems Code Review - openembedded-core.git/commitdiff
util-linux: Use PTEST binary directory
authorMariano Lopez <just.another.mariano@gmail.com>
Tue, 9 Apr 2019 05:44:14 +0000 (00:44 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Apr 2019 14:22:44 +0000 (15:22 +0100)
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]

Signed-off-by: Mariano Lopez <just.another.mariano@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/util-linux/util-linux.inc
meta/recipes-core/util-linux/util-linux/run-ptest

index c7ba8c446f1640dbdaf28349abb272cc9289f635..34255a2dec3f7b3fd5b7c7493ae6b9a606822642 100644 (file)
@@ -284,6 +284,7 @@ ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
 
 BBCLASSEXTEND = "native nativesdk"
 
+PTEST_BINDIR = "1"
 do_compile_ptest() {
     oe_runmake buildtest-TESTS
 }
@@ -312,8 +313,8 @@ do_install_ptest() {
         '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \
          ${D}${PTEST_PATH}/tests/functions.sh
 
-    # "kill -L" behaves differently than "/bin/kill -L" so we need an additional fix
+    # Running "kill" without the the complete path would use the shell's built-in kill
     sed -i -e \
-         '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \
+         '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \
          ${D}${PTEST_PATH}/tests/commands.sh
 }
index 8c57bd20740f3ee535f585ae7fbabbc91188e05f..03248325bf4451c26d6ece91ad717a056b549e8d 100644 (file)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+current_path=$(readlink -f $0)
+export bindir=$(dirname $current_path)
+export PATH=$bindir/bin:$PATH
+
 cd tests || exit 1                                                          
 
 comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" |  sort)