Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix rt-tests redo install error and add qemu ptest
@ 2015-08-01 17:35 Kai Kang
  2015-08-01 17:35 ` [PATCH 1/2] rt-tests: fix redo install error Kai Kang
  2015-08-01 17:35 ` [PATCH 2/2] qemu: add ptest sub-package Kai Kang
  0 siblings, 2 replies; 6+ messages in thread
From: Kai Kang @ 2015-08-01 17:35 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit a8bc06c3a001d89586f534c6411c3eeb2b106906:

  bitbake: bb.parse: properly error out on filesystem errors (2015-08-01 11:31:16 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib kangkai/qemu-ptest
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kangkai/qemu-ptest

Kai Kang (2):
  rt-tests: fix redo install error
  qemu: add ptest sub-package

 meta/recipes-devtools/qemu/qemu.inc                | 16 +++++++-
 .../qemu/qemu/add-ptest-in-makefile.patch          | 29 +++++++++++++
 meta/recipes-devtools/qemu/qemu/run-ptest          |  8 ++++
 .../rt-tests/files/fix-re-install-failure.patch    | 48 ++++++++++++++++++++++
 meta/recipes-rt/rt-tests/rt-tests.inc              |  1 +
 5 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/run-ptest
 create mode 100644 meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] rt-tests: fix redo install error
  2015-08-01 17:35 [PATCH 0/2] Fix rt-tests redo install error and add qemu ptest Kai Kang
@ 2015-08-01 17:35 ` Kai Kang
  2015-08-01 17:35 ` [PATCH 2/2] qemu: add ptest sub-package Kai Kang
  1 sibling, 0 replies; 6+ messages in thread
From: Kai Kang @ 2015-08-01 17:35 UTC (permalink / raw)
  To: openembedded-core

Currently gzip on host is used. If host gzip is provided by pigz, it
fails to redo install that pigz can't handle the option after file name.
When run command for target install in Makefile:

gzip src/backfire/backfire.4 -c > OUTPUT_FILE

File src/backfire/backfire.4 is zipped into backfire.4.gz but the
OUTPUT_FILE is empty. When rerun do_install, it shows warning:

| gzip: src/backfire/backfire.4 does not exist -- skipping

and empty manual gzip files are created:

$ file image/usr/share/man/man4/backfire.4.gz
image/usr/share/man/man4/backfire.4.gz: empty

Fix it by putting option '-c' before the file name.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../rt-tests/files/fix-re-install-failure.patch    | 48 ++++++++++++++++++++++
 meta/recipes-rt/rt-tests/rt-tests.inc              |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch

diff --git a/meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch b/meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch
new file mode 100644
index 0000000..e38ec92
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch
@@ -0,0 +1,48 @@
+Currently gzip on host is used. If host gzip is provided by pigz, it fails to
+redo install that pigz can't handle the option after file name. When run:
+
+gzip src/backfire/backfire.4 -c > OUTPUT_FILE
+
+File src/backfire/backfire.4 is zipped into backfire.4.gz but the OUTPUT_FILE
+is empty. When rerun do_install, it shows warning:
+
+| gzip: src/backfire/backfire.4 does not exist -- skipping
+
+and empty manual gzip files are created:
+
+$ file image/usr/share/man/man4/backfire.4.gz
+image/usr/share/man/man4/backfire.4.gz: empty
+
+Fix it by putting option '-c' before the file name.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+--- git/Makefile.orig	2014-11-14 15:47:26.406638419 +0800
++++ git/Makefile	2014-11-14 15:46:53.890637533 +0800
+@@ -127,15 +127,15 @@
+ 	cp $(TARGETS) "$(DESTDIR)$(bindir)"
+ 	install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
+ 	install -m 644 src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire/Makefile"
+-	gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
+-	gzip src/cyclictest/cyclictest.8 -c >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
+-	gzip src/pi_tests/pi_stress.8 -c >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
+-	gzip src/ptsematest/ptsematest.8 -c >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
+-	gzip src/sigwaittest/sigwaittest.8 -c >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
+-	gzip src/svsematest/svsematest.8 -c >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
+-	gzip src/pmqtest/pmqtest.8 -c >"$(DESTDIR)$(mandir)/man8/pmqtest.8.gz"
+-	gzip src/backfire/sendme.8 -c >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
+-	gzip src/hackbench/hackbench.8 -c >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
++	gzip -c src/backfire/backfire.4 >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
++	gzip -c src/cyclictest/cyclictest.8 >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
++	gzip -c src/pi_tests/pi_stress.8 >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
++	gzip -c src/ptsematest/ptsematest.8 >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
++	gzip -c src/sigwaittest/sigwaittest.8 >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
++	gzip -c src/svsematest/svsematest.8 >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
++	gzip -c src/pmqtest/pmqtest.8 >"$(DESTDIR)$(mandir)/man8/pmqtest.8.gz"
++	gzip -c src/backfire/sendme.8 >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
++	gzip -c src/hackbench/hackbench.8 >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
+ 
+ .PHONY: install_hwlatdetect
+ install_hwlatdetect: hwlatdetect
diff --git a/meta/recipes-rt/rt-tests/rt-tests.inc b/meta/recipes-rt/rt-tests/rt-tests.inc
index e63182a..9a076ad 100644
--- a/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -8,6 +8,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
            file://added-missing-dependencies.patch \
            file://hackbench-fix-error-check.patch \
            file://Makefile-fix-gzip-command.patch \
+           file://fix-re-install-failure.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] qemu: add ptest sub-package
  2015-08-01 17:35 [PATCH 0/2] Fix rt-tests redo install error and add qemu ptest Kai Kang
  2015-08-01 17:35 ` [PATCH 1/2] rt-tests: fix redo install error Kai Kang
@ 2015-08-01 17:35 ` Kai Kang
  2015-08-01 20:12   ` Richard Purdie
  1 sibling, 1 reply; 6+ messages in thread
From: Kai Kang @ 2015-08-01 17:35 UTC (permalink / raw)
  To: openembedded-core

Add sub-package ptest for qemu.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-devtools/qemu/qemu.inc                | 16 +++++++++++-
 .../qemu/qemu/add-ptest-in-makefile.patch          | 29 ++++++++++++++++++++++
 meta/recipes-devtools/qemu/qemu/run-ptest          |  8 ++++++
 3 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/run-ptest

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 6a744c3..c3f73d1 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -3,9 +3,10 @@ HOMEPAGE = "http://qemu.org"
 LICENSE = "GPLv2 & LGPLv2.1"
 DEPENDS = "glib-2.0 zlib pixman"
 RDEPENDS_${PN}_class-target += "bash python"
+RDEPENDS_${PN}-ptest = "bash make"
 
 require qemu-targets.inc
-inherit autotools
+inherit autotools ptest
 BBCLASSEXTEND = "native nativesdk"
 
 PR = "r1"
@@ -18,6 +19,8 @@ SRC_URI = "\
     file://disable-grabs.patch \
     file://exclude-some-arm-EABI-obsolete-syscalls.patch \
     file://wacom.patch \
+    file://add-ptest-in-makefile.patch \
+    file://run-ptest \
     "
 
 SRC_URI_append_class-native = "\
@@ -54,6 +57,17 @@ do_configure() {
     test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
 }
 
+do_compile_ptest() {
+	make buildtest-TESTS
+}
+
+do_install_ptest() {
+	cp -rL ${B}/tests ${D}${PTEST_PATH}
+	find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+	cp ${S}/tests/Makefile ${D}${PTEST_PATH}/tests
+}
+
 do_install () {
 	export STRIP="true"
 	autotools_do_install
diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
new file mode 100644
index 0000000..2e79356
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
@@ -0,0 +1,29 @@
+From 9b25fbc38c2c57c93ab53bf48a759bd2bd4c209d Mon Sep 17 00:00:00 2001
+From: HYANG2 <hyang2@pek-hyang2-d1.(none)>
+Date: Tue, 15 Jul 2014 10:13:22 +0800
+Subject: [PATCH] fix for ptest
+
+---
+ tests/Makefile |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 88f7105..3f40b4b 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -405,3 +405,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+ 
+ -include $(wildcard tests/*.d)
+ -include $(wildcard tests/libqos/*.d)
++
++buildtest-TESTS: $(check-unit-y) $(check-qtest-i386-y)
++
++runtest-TESTS:
++	for f in $(check-unit-y); do \
++		nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
++		$$nf; \
++	done
++
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/qemu/qemu/run-ptest b/meta/recipes-devtools/qemu/qemu/run-ptest
new file mode 100644
index 0000000..f4b8e97
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+#This script is used to run qemu test suites
+ptestdir=$(pwd)
+cd tests
+
+export SRC_PATH=$ptestdir
+make -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g'
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] qemu: add ptest sub-package
  2015-08-01 17:35 ` [PATCH 2/2] qemu: add ptest sub-package Kai Kang
@ 2015-08-01 20:12   ` Richard Purdie
  2015-08-03  1:40     ` Kang Kai
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-08-01 20:12 UTC (permalink / raw)
  To: Kai Kang; +Cc: openembedded-core

On Sun, 2015-08-02 at 01:35 +0800, Kai Kang wrote:
> Add sub-package ptest for qemu.
> 
[...]
> diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
> new file mode 100644
> index 0000000..2e79356
> --- /dev/null
> +++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
> @@ -0,0 +1,29 @@
> +From 9b25fbc38c2c57c93ab53bf48a759bd2bd4c209d Mon Sep 17 00:00:00 2001
> +From: HYANG2 <hyang2@pek-hyang2-d1.(none)>
> +Date: Tue, 15 Jul 2014 10:13:22 +0800
> +Subject: [PATCH] fix for ptest

No Upstream-Status?

Cheers,

Richard




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] qemu: add ptest sub-package
  2015-08-01 20:12   ` Richard Purdie
@ 2015-08-03  1:40     ` Kang Kai
  0 siblings, 0 replies; 6+ messages in thread
From: Kang Kai @ 2015-08-03  1:40 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 2015年08月02日 04:12, Richard Purdie wrote:
> On Sun, 2015-08-02 at 01:35 +0800, Kai Kang wrote:
>> Add sub-package ptest for qemu.
>>
> [...]
>> diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
>> new file mode 100644
>> index 0000000..2e79356
>> --- /dev/null
>> +++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
>> @@ -0,0 +1,29 @@
>> +From 9b25fbc38c2c57c93ab53bf48a759bd2bd4c209d Mon Sep 17 00:00:00 2001
>> +From: HYANG2 <hyang2@pek-hyang2-d1.(none)>
>> +Date: Tue, 15 Jul 2014 10:13:22 +0800
>> +Subject: [PATCH] fix for ptest
> No Upstream-Status?

Sorry, forgot it. V2 will be sent.

Thanks,
Kai


>
> Cheers,
>
> Richard
>
>
>


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] qemu: add ptest sub-package
  2015-08-04  3:25 [PATCH 0/2] V2: Fix rt-tests redo install error and add qemu ptest Kai Kang
@ 2015-08-04  3:25 ` Kai Kang
  0 siblings, 0 replies; 6+ messages in thread
From: Kai Kang @ 2015-08-04  3:25 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

Add sub-package ptest which runs all unit tests cases for qemu.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-devtools/qemu/qemu.inc                | 16 +++++++++++-
 .../qemu/qemu/add-ptest-in-makefile.patch          | 29 ++++++++++++++++++++++
 meta/recipes-devtools/qemu/qemu/run-ptest          |  8 ++++++
 3 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/run-ptest

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 6a744c3..c3f73d1 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -3,9 +3,10 @@ HOMEPAGE = "http://qemu.org"
 LICENSE = "GPLv2 & LGPLv2.1"
 DEPENDS = "glib-2.0 zlib pixman"
 RDEPENDS_${PN}_class-target += "bash python"
+RDEPENDS_${PN}-ptest = "bash make"
 
 require qemu-targets.inc
-inherit autotools
+inherit autotools ptest
 BBCLASSEXTEND = "native nativesdk"
 
 PR = "r1"
@@ -18,6 +19,8 @@ SRC_URI = "\
     file://disable-grabs.patch \
     file://exclude-some-arm-EABI-obsolete-syscalls.patch \
     file://wacom.patch \
+    file://add-ptest-in-makefile.patch \
+    file://run-ptest \
     "
 
 SRC_URI_append_class-native = "\
@@ -54,6 +57,17 @@ do_configure() {
     test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
 }
 
+do_compile_ptest() {
+	make buildtest-TESTS
+}
+
+do_install_ptest() {
+	cp -rL ${B}/tests ${D}${PTEST_PATH}
+	find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+	cp ${S}/tests/Makefile ${D}${PTEST_PATH}/tests
+}
+
 do_install () {
 	export STRIP="true"
 	autotools_do_install
diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
new file mode 100644
index 0000000..a99f720
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Pending
+
+Add subpackage -ptest which runs all unit test cases for qemu.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ tests/Makefile |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 88f7105..3f40b4b 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -405,3 +405,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+ 
+ -include $(wildcard tests/*.d)
+ -include $(wildcard tests/libqos/*.d)
++
++buildtest-TESTS: $(check-unit-y)
++
++runtest-TESTS:
++	for f in $(check-unit-y); do \
++		nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
++		$$nf; \
++	done
++
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/qemu/qemu/run-ptest b/meta/recipes-devtools/qemu/qemu/run-ptest
new file mode 100644
index 0000000..f4b8e97
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+#This script is used to run qemu test suites
+ptestdir=$(pwd)
+cd tests
+
+export SRC_PATH=$ptestdir
+make -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g'
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-04  3:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-01 17:35 [PATCH 0/2] Fix rt-tests redo install error and add qemu ptest Kai Kang
2015-08-01 17:35 ` [PATCH 1/2] rt-tests: fix redo install error Kai Kang
2015-08-01 17:35 ` [PATCH 2/2] qemu: add ptest sub-package Kai Kang
2015-08-01 20:12   ` Richard Purdie
2015-08-03  1:40     ` Kang Kai
  -- strict thread matches above, loose matches on Subject: below --
2015-08-04  3:25 [PATCH 0/2] V2: Fix rt-tests redo install error and add qemu ptest Kai Kang
2015-08-04  3:25 ` [PATCH 2/2] qemu: add ptest sub-package Kai Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox