diff options
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 5c4694b1fd..f0ffd255ff 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
@@ -304,7 +304,7 @@ python populate_packages_prepend() { | |||
304 | } | 304 | } |
305 | 305 | ||
306 | RDEPENDS_${PN}-bash-completion += "util-linux-lsblk" | 306 | RDEPENDS_${PN}-bash-completion += "util-linux-lsblk" |
307 | RDEPENDS_${PN}-ptest = "bash grep coreutils" | 307 | RDEPENDS_${PN}-ptest = "bash grep coreutils which util-linux-blkid util-linux-fsck btrfs-tools" |
308 | 308 | ||
309 | do_compile_ptest() { | 309 | do_compile_ptest() { |
310 | oe_runmake buildtest-TESTS | 310 | oe_runmake buildtest-TESTS |
@@ -312,23 +312,30 @@ do_compile_ptest() { | |||
312 | 312 | ||
313 | do_install_ptest() { | 313 | do_install_ptest() { |
314 | mkdir -p ${D}${PTEST_PATH}/tests/ts | 314 | mkdir -p ${D}${PTEST_PATH}/tests/ts |
315 | find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; | 315 | find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; |
316 | cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/ | 316 | find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; |
317 | cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/ | 317 | find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; |
318 | cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/ | ||
319 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected | ||
320 | 318 | ||
321 | list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon" | 319 | cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ |
322 | # The following tests are not installed yet: | 320 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected |
323 | # blkid scsi_debug module dependent | 321 | cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ |
324 | # cramfs gcc dependent | 322 | cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} |
325 | # eject gcc dependent | 323 | |
326 | # fdisk scsi_debug module and gcc dependent | 324 | # The original paths of executables to be tested point to a local folder containing |
327 | # lscpu gcc dependant | 325 | # the executables. We want to test the installed executables, not the local copies. |
328 | # libmount uuidgen dependent | 326 | # So strip the paths, the executables will be located via "which" |
329 | # mount gcc dependant | 327 | sed -i \ |
330 | # partx blkid dependant | 328 | -e '/^TS_CMD/ s|$top_builddir/||g' \ |
331 | for d in $list; do | 329 | -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \ |
332 | cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/ | 330 | ${D}${PTEST_PATH}/tests/commands.sh |
333 | done | 331 | |
332 | # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]' | ||
333 | sed -i -e \ | ||
334 | '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ | ||
335 | ${D}${PTEST_PATH}/tests/functions.sh | ||
336 | |||
337 | # "kill -L" behaves differently than "/bin/kill -L" so we need an additional fix | ||
338 | sed -i -e \ | ||
339 | '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \ | ||
340 | ${D}${PTEST_PATH}/tests/commands.sh | ||
334 | } | 341 | } |