summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2013-07-19 19:31:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-24 11:35:35 +0100
commit18f39e545674d7405cbdf4486a911c577177706f (patch)
tree23be69f7009d7f57f0e7e8085aa1d1b601165d61 /meta
parentbbab6e78f437eedfbb7dcb09c2d5c57ee71210a3 (diff)
downloadpoky-18f39e545674d7405cbdf4486a911c577177706f.tar.gz
kmod: Add ptest
Install kmod test suite and run it as ptest. (From OE-Core rev: 152c973227e41b7736457b7f8c40849cc71b45ca) Signed-off-by: Tudor Florea <tudor.florea@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc4
-rw-r--r--meta/recipes-kernel/kmod/kmod/ptest.patch25
-rwxr-xr-xmeta/recipes-kernel/kmod/kmod/run-ptest5
-rw-r--r--meta/recipes-kernel/kmod/kmod_git.bb9
4 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index 3cd963f651..a780b6c15f 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -15,11 +15,13 @@ DEPENDS += "pkgconfig-native"
15LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ 15LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
16 file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 16 file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
17 " 17 "
18inherit autotools gtk-doc 18inherit autotools gtk-doc ptest
19 19
20SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \ 20SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
21 file://depmod-search.conf \ 21 file://depmod-search.conf \
22 file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \ 22 file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \
23 file://run-ptest \
24 file://ptest.patch \
23 " 25 "
24 26
25SRCREV = "62081c0f68905b22f375156d4532fd37fa5c8d33" 27SRCREV = "62081c0f68905b22f375156d4532fd37fa5c8d33"
diff --git a/meta/recipes-kernel/kmod/kmod/ptest.patch b/meta/recipes-kernel/kmod/kmod/ptest.patch
new file mode 100644
index 0000000000..839d2a6928
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/ptest.patch
@@ -0,0 +1,25 @@
1Add 'install-ptest' rule.
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-status: Pending
5
6diff -ruN a/Makefile.am b/Makefile.am
7--- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200
8+++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200
9@@ -204,6 +204,16 @@
10
11 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
12
13+install-ptest:
14+ @$(MKDIR_P) $(DESTDIR)/testsuite
15+ @for file in $(TESTSUITE); do \
16+ install $$file $(DESTDIR)/testsuite; \
17+ done;
18+ @cp Makefile $(DESTDIR)
19+ @sed -i 's/^Makefile/_Makefile/' ${DESTDIR}/Makefile
20+ @tar -czf $(DESTDIR)/tools.tgz $(noinst_SCRIPTS) $(noinst_PROGRAMS)
21+ @tar -C testsuite -czf $(DESTDIR)/testsuite.tgz rootfs-pristine .libs
22+
23 # ------------------------------------------------------------------------------
24 # custom release helpers
25 # ------------------------------------------------------------------------------
diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
new file mode 100755
index 0000000000..fac24fd6e1
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2tar -xzf tools.tgz
3tar -C testsuite -xzf testsuite.tgz
4make rootfs
5make -k runtest-TESTS 2>/dev/null| grep -e ^PASS -e ^FAIL
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
index 6afaca6dbb..f92ff72904 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -37,6 +37,15 @@ do_install_append () {
37 install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" 37 install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
38} 38}
39 39
40do_compile_prepend() {
41 sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status
42}
43
44do_compile_ptest () {
45 oe_runmake buildtest-TESTS
46 oe_runmake rootfs
47}
48
40inherit update-alternatives 49inherit update-alternatives
41 50
42ALTERNATIVE_PRIORITY = "60" 51ALTERNATIVE_PRIORITY = "60"