aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux.inc
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-12-03 04:08:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-08 10:20:50 +0000
commit6f837cc142ccad39856cb846a205a2999658b16e (patch)
tree723b88f666ae54f9525a7f6eac03590e8a24876c /meta/recipes-core/util-linux/util-linux.inc
parentdbd02bda78d5c8bd4873f376d64b079339e0b388 (diff)
downloadopenembedded-core-contrib-6f837cc142ccad39856cb846a205a2999658b16e.tar.gz
util-linux: Add ptest
(From OE-Core rev: 705a369e5f48dc75f2db4ef814f63d11c2285058) Signed-off-by: Tudor Florea <tudor.florea@enea.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux.inc')
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc31
1 files changed, 30 insertions, 1 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 48d7e898f2..318c74ba62 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
-inherit autotools gettext pkgconfig systemd update-alternatives python-dir
+inherit autotools gettext pkgconfig systemd update-alternatives python-dir ptest
DEPENDS = "zlib ncurses"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
@@ -272,3 +272,32 @@ python populate_packages_prepend() {
description='util-linux lib%s',
extra_depends='', prepend=True, allow_links=True)
}
+
+RDEPENDS_${PN}-ptest = "bash"
+
+do_compile_ptest() {
+ oe_runmake buildtest-TESTS
+}
+
+do_install_ptest() {
+ mkdir -p ${D}${PTEST_PATH}/tests/ts
+ find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+ cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
+ cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
+ cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
+ cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+
+ list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf"
+ # The following tests are not installed yet:
+ # blkid scsi_debug module dependent
+ # cramfs gcc dependent
+ # eject gcc dependent
+ # fdisk scsi_debug module and gcc dependent
+ # lscpu gcc dependant
+ # libmount uuidgen dependent
+ # mount gcc dependant
+ # partx blkid dependant
+ for d in $list; do
+ cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
+ done
+}