diff options
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux/run-ptest | 23 | ||||
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.37.bb | 25 |
2 files changed, 7 insertions, 41 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest index e135ee583b..3a910be121 100644 --- a/meta/recipes-core/util-linux/util-linux/run-ptest +++ b/meta/recipes-core/util-linux/util-linux/run-ptest | |||
| @@ -13,31 +13,12 @@ current_path=$(readlink -f $0) | |||
| 13 | export bindir=$(dirname $current_path) | 13 | export bindir=$(dirname $current_path) |
| 14 | export PATH=$bindir/bin:$PATH | 14 | export PATH=$bindir/bin:$PATH |
| 15 | 15 | ||
| 16 | cd tests || exit 1 | 16 | ./tests/run.sh --use-system-commands --parsable --show-diff | sed -u '{ |
| 17 | |||
| 18 | comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) | ||
| 19 | |||
| 20 | |||
| 21 | echo | ||
| 22 | echo "-------------------- util-linux regression tests --------------------" | ||
| 23 | echo | ||
| 24 | echo " For development purpose only. " | ||
| 25 | echo " Don't execute on production system! " | ||
| 26 | echo | ||
| 27 | |||
| 28 | res=0 | ||
| 29 | count=0 | ||
| 30 | for ts in $comps; | ||
| 31 | do | ||
| 32 | $ts | sed -u '{ | ||
| 33 | s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ | 17 | s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ |
| 34 | s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ | 18 | s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ |
| 35 | s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ | 19 | s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ |
| 36 | }' | 20 | }' |
| 37 | done | ||
| 38 | |||
| 39 | 21 | ||
| 40 | if [ "x$UDEV_PID" != "x" ]; then | 22 | if [ "x$UDEV_PID" != "x" ]; then |
| 41 | /etc/init.d/udev start | 23 | /etc/init.d/udev start |
| 42 | fi | 24 | fi |
| 43 | |||
diff --git a/meta/recipes-core/util-linux/util-linux_2.37.bb b/meta/recipes-core/util-linux/util-linux_2.37.bb index 48b6208612..399f66d6a0 100644 --- a/meta/recipes-core/util-linux/util-linux_2.37.bb +++ b/meta/recipes-core/util-linux/util-linux_2.37.bb | |||
| @@ -280,25 +280,10 @@ do_install_ptest() { | |||
| 280 | cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ | 280 | cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ |
| 281 | cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} | 281 | cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} |
| 282 | 282 | ||
| 283 | # The original paths of executables to be tested point to a local folder containing | 283 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest |
| 284 | # the executables. We want to test the installed executables, not the local copies. | ||
| 285 | # So strip the paths, the executables will be located via "which" | ||
| 286 | sed -i \ | ||
| 287 | -e '/^TS_CMD/ s|$top_builddir/||g' \ | ||
| 288 | -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \ | ||
| 289 | ${D}${PTEST_PATH}/tests/commands.sh | ||
| 290 | |||
| 291 | # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]' | ||
| 292 | sed -i -e \ | ||
| 293 | '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ | ||
| 294 | ${D}${PTEST_PATH}/tests/functions.sh | ||
| 295 | |||
| 296 | # Running "kill" without the the complete path would use the shell's built-in kill | ||
| 297 | sed -i -e \ | ||
| 298 | '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ | ||
| 299 | ${D}${PTEST_PATH}/tests/commands.sh | ||
| 300 | |||
| 301 | |||
| 302 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest | ||
| 303 | 284 | ||
| 285 | # chfn needs PAM | ||
| 286 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then | ||
| 287 | rm -rf ${D}${PTEST_PATH}/tests/ts/chfn | ||
| 288 | fi | ||
| 304 | } | 289 | } |
