mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
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>
This commit is contained in:
@@ -3,9 +3,10 @@ HOMEPAGE = "http://qemu.org"
|
|||||||
LICENSE = "GPLv2 & LGPLv2.1"
|
LICENSE = "GPLv2 & LGPLv2.1"
|
||||||
DEPENDS = "glib-2.0 zlib pixman"
|
DEPENDS = "glib-2.0 zlib pixman"
|
||||||
RDEPENDS_${PN}_class-target += "bash python"
|
RDEPENDS_${PN}_class-target += "bash python"
|
||||||
|
RDEPENDS_${PN}-ptest = "bash make"
|
||||||
|
|
||||||
require qemu-targets.inc
|
require qemu-targets.inc
|
||||||
inherit autotools
|
inherit autotools ptest
|
||||||
BBCLASSEXTEND = "native nativesdk"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r1"
|
||||||
@@ -18,6 +19,8 @@ SRC_URI = "\
|
|||||||
file://disable-grabs.patch \
|
file://disable-grabs.patch \
|
||||||
file://exclude-some-arm-EABI-obsolete-syscalls.patch \
|
file://exclude-some-arm-EABI-obsolete-syscalls.patch \
|
||||||
file://wacom.patch \
|
file://wacom.patch \
|
||||||
|
file://add-ptest-in-makefile.patch \
|
||||||
|
file://run-ptest \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI_append_class-native = "\
|
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
|
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 () {
|
do_install () {
|
||||||
export STRIP="true"
|
export STRIP="true"
|
||||||
autotools_do_install
|
autotools_do_install
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -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'
|
||||||
Reference in New Issue
Block a user