aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/kbd/kbd_2.0.3.bb
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2016-09-30 16:49:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-30 17:15:10 +0100
commit901ccb3e70e9036112c51acc6d18d05025f6e1bb (patch)
tree40a3416b4237fe08ebea98d148b7a5395c66a92f /meta/recipes-core/kbd/kbd_2.0.3.bb
parent23cca700870230b46d251086441136e99659ef12 (diff)
downloadopenembedded-core-contrib-901ccb3e70e9036112c51acc6d18d05025f6e1bb.tar.gz
openembedded-core-contrib-901ccb3e70e9036112c51acc6d18d05025f6e1bb.tar.bz2
openembedded-core-contrib-901ccb3e70e9036112c51acc6d18d05025f6e1bb.zip
kbd: create ptest sub-package
Create kbd-ptest sub-package: * add file run-ptest and runtime dependency make * modify installed Makefile to disable remake Makefile and the test cases when run the ptest * add patch to set proper path for test cases to get resource files Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/kbd/kbd_2.0.3.bb')
-rw-r--r--meta/recipes-core/kbd/kbd_2.0.3.bb19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/recipes-core/kbd/kbd_2.0.3.bb b/meta/recipes-core/kbd/kbd_2.0.3.bb
index ea1e0b48d1..54d16835fc 100644
--- a/meta/recipes-core/kbd/kbd_2.0.3.bb
+++ b/meta/recipes-core/kbd/kbd_2.0.3.bb
@@ -11,6 +11,8 @@ RPROVIDES_${PN} = "console-tools"
RCONFLICTS_${PN} = "console-tools"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
+ file://run-ptest \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \
"
SRC_URI[md5sum] = "231b46e7142eb41ea3ae06d2ded3c208"
@@ -19,6 +21,21 @@ SRC_URI[sha256sum] = "7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb46
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta
+}
+
+do_install_ptest() {
+ install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
+ sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
+
+ find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
+ find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \;
+
+ install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver
+}
+
PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
FILES_${PN}-consolefonts = "${datadir}/consolefonts"
@@ -26,6 +43,8 @@ FILES_${PN}-consoletrans = "${datadir}/consoletrans"
FILES_${PN}-keymaps = "${datadir}/keymaps"
FILES_${PN}-unimaps = "${datadir}/unimaps"
+RDEPENDS_${PN}-ptest = "make"
+
inherit update-alternatives
ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"