summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-core/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-core/util-linux')
-rw-r--r--poky/meta/recipes-core/util-linux/util-linux.inc7
-rw-r--r--poky/meta/recipes-core/util-linux/util-linux/run-ptest6
2 files changed, 9 insertions, 4 deletions
diff --git a/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc
index 18c3af240..34255a2de 100644
--- a/poky/meta/recipes-core/util-linux/util-linux.inc
+++ b/poky/meta/recipes-core/util-linux/util-linux.inc
@@ -142,7 +142,7 @@ RDEPENDS_${PN}_class-nativesdk = ""
RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
-RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN}"
+RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN} sed"
RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
ALLOW_EMPTY_${PN}-swaponoff = "1"
@@ -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
}
diff --git a/poky/meta/recipes-core/util-linux/util-linux/run-ptest b/poky/meta/recipes-core/util-linux/util-linux/run-ptest
index fbc2f9b56..03248325b 100644
--- a/poky/meta/recipes-core/util-linux/util-linux/run-ptest
+++ b/poky/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -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)
@@ -16,7 +20,7 @@ res=0
count=0
for ts in $comps;
do
- $ts | sed '{
+ $ts | sed -u '{
s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/