diff options
author | Kai Kang <kai.kang@windriver.com> | 2015-08-04 11:25:36 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-10 12:40:21 -0700 |
commit | 31eb3866167bae3285e46d0b14f685beebb4c2da (patch) | |
tree | 0a884a597a8a6c088b7799eca3822cc0e272c3a0 /meta/recipes-devtools/qemu | |
parent | 800ebee9c508c742d8fecab527cacdacb20ca737 (diff) | |
download | poky-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.inc | 16 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch | 29 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/run-ptest | 8 |
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" | |||
3 | LICENSE = "GPLv2 & LGPLv2.1" | 3 | LICENSE = "GPLv2 & LGPLv2.1" |
4 | DEPENDS = "glib-2.0 zlib pixman" | 4 | DEPENDS = "glib-2.0 zlib pixman" |
5 | RDEPENDS_${PN}_class-target += "bash python" | 5 | RDEPENDS_${PN}_class-target += "bash python" |
6 | RDEPENDS_${PN}-ptest = "bash make" | ||
6 | 7 | ||
7 | require qemu-targets.inc | 8 | require qemu-targets.inc |
8 | inherit autotools | 9 | inherit autotools ptest |
9 | BBCLASSEXTEND = "native nativesdk" | 10 | BBCLASSEXTEND = "native nativesdk" |
10 | 11 | ||
11 | PR = "r1" | 12 | PR = "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 | ||
23 | SRC_URI_append_class-native = "\ | 26 | SRC_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 | ||
60 | do_compile_ptest() { | ||
61 | make buildtest-TESTS | ||
62 | } | ||
63 | |||
64 | do_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 | |||
57 | do_install () { | 71 | do_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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Add subpackage -ptest which runs all unit test cases for qemu. | ||
4 | |||
5 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
6 | --- | ||
7 | tests/Makefile | 10 ++++++++++ | ||
8 | 1 file changed, 10 insertions(+) | ||
9 | |||
10 | diff --git a/tests/Makefile b/tests/Makefile | ||
11 | index 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 | -- | ||
28 | 1.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 | ||
4 | ptestdir=$(pwd) | ||
5 | cd tests | ||
6 | |||
7 | export SRC_PATH=$ptestdir | ||
8 | make -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g' | ||