summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2015-08-04 11:25:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-10 12:40:21 -0700
commit31eb3866167bae3285e46d0b14f685beebb4c2da (patch)
tree0a884a597a8a6c088b7799eca3822cc0e272c3a0 /meta/recipes-devtools/qemu
parent800ebee9c508c742d8fecab527cacdacb20ca737 (diff)
downloadpoky-31eb3866167bae3285e46d0b14f685beebb4c2da.tar.gz
qemu: add ptest sub-package
Add sub-package ptest which runs all unit tests cases for qemu. (From OE-Core rev: a79435797ee60f5858c952646f864c04113e5803) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc16
-rw-r--r--meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch29
-rw-r--r--meta/recipes-devtools/qemu/qemu/run-ptest8
3 files changed, 52 insertions, 1 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 6a744c3e34..c3f73d1ec5 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -3,9 +3,10 @@ HOMEPAGE = "http://qemu.org"
3LICENSE = "GPLv2 & LGPLv2.1" 3LICENSE = "GPLv2 & LGPLv2.1"
4DEPENDS = "glib-2.0 zlib pixman" 4DEPENDS = "glib-2.0 zlib pixman"
5RDEPENDS_${PN}_class-target += "bash python" 5RDEPENDS_${PN}_class-target += "bash python"
6RDEPENDS_${PN}-ptest = "bash make"
6 7
7require qemu-targets.inc 8require qemu-targets.inc
8inherit autotools 9inherit autotools ptest
9BBCLASSEXTEND = "native nativesdk" 10BBCLASSEXTEND = "native nativesdk"
10 11
11PR = "r1" 12PR = "r1"
@@ -18,6 +19,8 @@ SRC_URI = "\
18 file://disable-grabs.patch \ 19 file://disable-grabs.patch \
19 file://exclude-some-arm-EABI-obsolete-syscalls.patch \ 20 file://exclude-some-arm-EABI-obsolete-syscalls.patch \
20 file://wacom.patch \ 21 file://wacom.patch \
22 file://add-ptest-in-makefile.patch \
23 file://run-ptest \
21 " 24 "
22 25
23SRC_URI_append_class-native = "\ 26SRC_URI_append_class-native = "\
@@ -54,6 +57,17 @@ do_configure() {
54 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh 57 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x ${S}/target-i386/beginend_funcs.sh
55} 58}
56 59
60do_compile_ptest() {
61 make buildtest-TESTS
62}
63
64do_install_ptest() {
65 cp -rL ${B}/tests ${D}${PTEST_PATH}
66 find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
67
68 cp ${S}/tests/Makefile ${D}${PTEST_PATH}/tests
69}
70
57do_install () { 71do_install () {
58 export STRIP="true" 72 export STRIP="true"
59 autotools_do_install 73 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 0000000000..a99f72098c
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Pending
2
3Add subpackage -ptest which runs all unit test cases for qemu.
4
5Signed-off-by: Kai Kang <kai.kang@windriver.com>
6---
7 tests/Makefile | 10 ++++++++++
8 1 file changed, 10 insertions(+)
9
10diff --git a/tests/Makefile b/tests/Makefile
11index 88f7105..3f40b4b 100644
12--- a/tests/Makefile
13+++ b/tests/Makefile
14@@ -405,3 +405,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
15
16 -include $(wildcard tests/*.d)
17 -include $(wildcard tests/libqos/*.d)
18+
19+buildtest-TESTS: $(check-unit-y)
20+
21+runtest-TESTS:
22+ for f in $(check-unit-y); do \
23+ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
24+ $$nf; \
25+ done
26+
27--
281.7.9.5
29
diff --git a/meta/recipes-devtools/qemu/qemu/run-ptest b/meta/recipes-devtools/qemu/qemu/run-ptest
new file mode 100644
index 0000000000..f4b8e97e1e
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/run-ptest
@@ -0,0 +1,8 @@
1#!/bin/sh
2#
3#This script is used to run qemu test suites
4ptestdir=$(pwd)
5cd tests
6
7export SRC_PATH=$ptestdir
8make -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g'