* [PATCH] kmod: add ptest
@ 2013-07-17 23:56 Tudor Florea
2013-07-18 22:51 ` Saul Wold
2013-07-19 17:31 ` [PATCH v2] kmod: Add ptest Tudor Florea
0 siblings, 2 replies; 3+ messages in thread
From: Tudor Florea @ 2013-07-17 23:56 UTC (permalink / raw)
To: openembedded-core
Install kmod test suite and run it as ptest.
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
---
meta/recipes-kernel/kmod/kmod.inc | 4 +++-
meta/recipes-kernel/kmod/kmod/ptest.patch | 20 ++++++++++++++++++++
meta/recipes-kernel/kmod/kmod/run-ptest | 5 +++++
meta/recipes-kernel/kmod/kmod_git.bb | 9 +++++++++
4 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-kernel/kmod/kmod/ptest.patch
create mode 100755 meta/recipes-kernel/kmod/kmod/run-ptest
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index 3cd963f..a780b6c 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -15,11 +15,13 @@ DEPENDS += "pkgconfig-native"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
-inherit autotools gtk-doc
+inherit autotools gtk-doc ptest
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \
+ file://run-ptest \
+ file://ptest.patch \
"
SRCREV = "62081c0f68905b22f375156d4532fd37fa5c8d33"
diff --git a/meta/recipes-kernel/kmod/kmod/ptest.patch b/meta/recipes-kernel/kmod/kmod/ptest.patch
new file mode 100644
index 0000000..8f3355f
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/ptest.patch
@@ -0,0 +1,20 @@
+diff -ruN a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200
++++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200
+@@ -204,6 +204,16 @@
+
+ distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
+
++install-ptest:
++ @$(MKDIR_P) $(DESTDIR)/testsuite
++ @for file in $(TESTSUITE); do \
++ install $$file $(DESTDIR)/testsuite; \
++ done;
++ @cp Makefile $(DESTDIR)
++ @sed -i 's/^Makefile/_Makefile/' ${DESTDIR}/Makefile
++ @tar -czf $(DESTDIR)/tools.tgz $(noinst_SCRIPTS) $(noinst_PROGRAMS)
++ @tar -C testsuite -czf $(DESTDIR)/testsuite.tgz rootfs-pristine .libs
++
+ # ------------------------------------------------------------------------------
+ # custom release helpers
+ # ------------------------------------------------------------------------------
diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
new file mode 100755
index 0000000..fac24fd
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+tar -xzf tools.tgz
+tar -C testsuite -xzf testsuite.tgz
+make rootfs
+make -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 ca6b004..cb7a131 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -36,6 +36,15 @@ do_install_append () {
install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
}
+do_compile_prepend() {
+ sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status
+}
+
+do_compile_ptest () {
+ oe_runmake buildtest-TESTS
+ oe_runmake rootfs
+}
+
inherit update-alternatives
ALTERNATIVE_PRIORITY = "60"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kmod: add ptest
2013-07-17 23:56 [PATCH] kmod: add ptest Tudor Florea
@ 2013-07-18 22:51 ` Saul Wold
2013-07-19 17:31 ` [PATCH v2] kmod: Add ptest Tudor Florea
1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2013-07-18 22:51 UTC (permalink / raw)
To: Tudor Florea; +Cc: openembedded-core
On 07/17/2013 04:56 PM, Tudor Florea wrote:
> Install kmod test suite and run it as ptest.
>
> Signed-off-by: Tudor Florea <tudor.florea@enea.com>
> ---
> meta/recipes-kernel/kmod/kmod.inc | 4 +++-
> meta/recipes-kernel/kmod/kmod/ptest.patch | 20 ++++++++++++++++++++
> meta/recipes-kernel/kmod/kmod/run-ptest | 5 +++++
> meta/recipes-kernel/kmod/kmod_git.bb | 9 +++++++++
> 4 files changed, 37 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-kernel/kmod/kmod/ptest.patch
> create mode 100755 meta/recipes-kernel/kmod/kmod/run-ptest
>
> diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
> index 3cd963f..a780b6c 100644
> --- a/meta/recipes-kernel/kmod/kmod.inc
> +++ b/meta/recipes-kernel/kmod/kmod.inc
> @@ -15,11 +15,13 @@ DEPENDS += "pkgconfig-native"
> LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
> file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
> "
> -inherit autotools gtk-doc
> +inherit autotools gtk-doc ptest
>
> SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
> file://depmod-search.conf \
> file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \
> + file://run-ptest \
> + file://ptest.patch \
> "
>
> SRCREV = "62081c0f68905b22f375156d4532fd37fa5c8d33"
> diff --git a/meta/recipes-kernel/kmod/kmod/ptest.patch b/meta/recipes-kernel/kmod/kmod/ptest.patch
> new file mode 100644
> index 0000000..8f3355f
> --- /dev/null
> +++ b/meta/recipes-kernel/kmod/kmod/ptest.patch
This patch needs a header with Upstream-Status: and Signed-off-by:
Sau!
> @@ -0,0 +1,20 @@
> +diff -ruN a/Makefile.am b/Makefile.am
> +--- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200
> ++++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200
> +@@ -204,6 +204,16 @@
> +
> + distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
> +
> ++install-ptest:
> ++ @$(MKDIR_P) $(DESTDIR)/testsuite
> ++ @for file in $(TESTSUITE); do \
> ++ install $$file $(DESTDIR)/testsuite; \
> ++ done;
> ++ @cp Makefile $(DESTDIR)
> ++ @sed -i 's/^Makefile/_Makefile/' ${DESTDIR}/Makefile
> ++ @tar -czf $(DESTDIR)/tools.tgz $(noinst_SCRIPTS) $(noinst_PROGRAMS)
> ++ @tar -C testsuite -czf $(DESTDIR)/testsuite.tgz rootfs-pristine .libs
> ++
> + # ------------------------------------------------------------------------------
> + # custom release helpers
> + # ------------------------------------------------------------------------------
> diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
> new file mode 100755
> index 0000000..fac24fd
> --- /dev/null
> +++ b/meta/recipes-kernel/kmod/kmod/run-ptest
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +tar -xzf tools.tgz
> +tar -C testsuite -xzf testsuite.tgz
> +make rootfs
> +make -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 ca6b004..cb7a131 100644
> --- a/meta/recipes-kernel/kmod/kmod_git.bb
> +++ b/meta/recipes-kernel/kmod/kmod_git.bb
> @@ -36,6 +36,15 @@ do_install_append () {
> install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
> }
>
> +do_compile_prepend() {
> + sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status
> +}
> +
> +do_compile_ptest () {
> + oe_runmake buildtest-TESTS
> + oe_runmake rootfs
> +}
> +
> inherit update-alternatives
>
> ALTERNATIVE_PRIORITY = "60"
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] kmod: Add ptest
2013-07-17 23:56 [PATCH] kmod: add ptest Tudor Florea
2013-07-18 22:51 ` Saul Wold
@ 2013-07-19 17:31 ` Tudor Florea
1 sibling, 0 replies; 3+ messages in thread
From: Tudor Florea @ 2013-07-19 17:31 UTC (permalink / raw)
To: openembedded-core
Install kmod test suite and run it as ptest.
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
---
meta/recipes-kernel/kmod/kmod.inc | 4 +++-
meta/recipes-kernel/kmod/kmod/ptest.patch | 25 +++++++++++++++++++++++++
meta/recipes-kernel/kmod/kmod/run-ptest | 5 +++++
meta/recipes-kernel/kmod/kmod_git.bb | 9 +++++++++
4 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-kernel/kmod/kmod/ptest.patch
create mode 100755 meta/recipes-kernel/kmod/kmod/run-ptest
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index 3cd963f..a780b6c 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -15,11 +15,13 @@ DEPENDS += "pkgconfig-native"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
-inherit autotools gtk-doc
+inherit autotools gtk-doc ptest
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \
+ file://run-ptest \
+ file://ptest.patch \
"
SRCREV = "62081c0f68905b22f375156d4532fd37fa5c8d33"
diff --git a/meta/recipes-kernel/kmod/kmod/ptest.patch b/meta/recipes-kernel/kmod/kmod/ptest.patch
new file mode 100644
index 0000000..839d2a6
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/ptest.patch
@@ -0,0 +1,25 @@
+Add 'install-ptest' rule.
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-status: Pending
+
+diff -ruN a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2013-07-12 17:11:05.278331557 +0200
++++ b/Makefile.am 2013-07-12 17:14:27.033788016 +0200
+@@ -204,6 +204,16 @@
+
+ distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
+
++install-ptest:
++ @$(MKDIR_P) $(DESTDIR)/testsuite
++ @for file in $(TESTSUITE); do \
++ install $$file $(DESTDIR)/testsuite; \
++ done;
++ @cp Makefile $(DESTDIR)
++ @sed -i 's/^Makefile/_Makefile/' ${DESTDIR}/Makefile
++ @tar -czf $(DESTDIR)/tools.tgz $(noinst_SCRIPTS) $(noinst_PROGRAMS)
++ @tar -C testsuite -czf $(DESTDIR)/testsuite.tgz rootfs-pristine .libs
++
+ # ------------------------------------------------------------------------------
+ # custom release helpers
+ # ------------------------------------------------------------------------------
diff --git a/meta/recipes-kernel/kmod/kmod/run-ptest b/meta/recipes-kernel/kmod/kmod/run-ptest
new file mode 100755
index 0000000..fac24fd
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+tar -xzf tools.tgz
+tar -C testsuite -xzf testsuite.tgz
+make rootfs
+make -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 ca6b004..cb7a131 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -36,6 +36,15 @@ do_install_append () {
install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
}
+do_compile_prepend() {
+ sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status
+}
+
+do_compile_ptest () {
+ oe_runmake buildtest-TESTS
+ oe_runmake rootfs
+}
+
inherit update-alternatives
ALTERNATIVE_PRIORITY = "60"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-19 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17 23:56 [PATCH] kmod: add ptest Tudor Florea
2013-07-18 22:51 ` Saul Wold
2013-07-19 17:31 ` [PATCH v2] kmod: Add ptest Tudor Florea
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.