diff options
3 files changed, 6 insertions, 46 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index c894b81b10..cb854914b2 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
| @@ -6,7 +6,7 @@ a variety of guest operating systems" | |||
| 6 | HOMEPAGE = "http://qemu.org" | 6 | HOMEPAGE = "http://qemu.org" |
| 7 | LICENSE = "GPLv2 & LGPLv2.1" | 7 | LICENSE = "GPLv2 & LGPLv2.1" |
| 8 | 8 | ||
| 9 | RDEPENDS_${PN}-ptest = "bash make" | 9 | RDEPENDS_${PN}-ptest = "bash" |
| 10 | 10 | ||
| 11 | require qemu-targets.inc | 11 | require qemu-targets.inc |
| 12 | inherit pkgconfig ptest | 12 | inherit pkgconfig ptest |
| @@ -18,7 +18,6 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
| 18 | file://powerpc_rom.bin \ | 18 | file://powerpc_rom.bin \ |
| 19 | file://run-ptest \ | 19 | file://run-ptest \ |
| 20 | file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \ | 20 | file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \ |
| 21 | file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ | ||
| 22 | file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | 21 | file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ |
| 23 | file://0004-qemu-disable-Valgrind.patch \ | 22 | file://0004-qemu-disable-Valgrind.patch \ |
| 24 | file://0006-chardev-connect-socket-to-a-spawned-command.patch \ | 23 | file://0006-chardev-connect-socket-to-a-spawned-command.patch \ |
| @@ -50,18 +49,11 @@ do_install_append() { | |||
| 50 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | 49 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi |
| 51 | } | 50 | } |
| 52 | 51 | ||
| 53 | do_compile_ptest() { | ||
| 54 | make buildtest-TESTS | ||
| 55 | } | ||
| 56 | |||
| 57 | do_install_ptest() { | 52 | do_install_ptest() { |
| 58 | cp -rL ${B}/tests ${D}${PTEST_PATH} | 53 | cp -rL ${B}/tests ${D}${PTEST_PATH} |
| 59 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} | 54 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} |
| 60 | 55 | ||
| 61 | cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests | ||
| 62 | # Don't check the file genreated by configure | 56 | # Don't check the file genreated by configure |
| 63 | sed -i -e '/wildcard config-host.mak/d' \ | ||
| 64 | -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include | ||
| 65 | sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \ | 57 | sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \ |
| 66 | ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env | 58 | ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env |
| 67 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh | 59 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh |
diff --git a/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch b/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch deleted file mode 100644 index 3cb1dac9c3..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | From 5da6cef7761157a003e7ebde74fb3cf90ab396d9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Juro Bystricky <juro.bystricky@intel.com> | ||
| 3 | Date: Thu, 31 Aug 2017 11:06:56 -0700 | ||
| 4 | Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for | ||
| 5 | qemu. | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | |||
| 9 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 10 | |||
| 11 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | ||
| 12 | |||
| 13 | [update patch context] | ||
| 14 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
| 15 | --- | ||
| 16 | tests/Makefile.include | 8 ++++++++ | ||
| 17 | 1 file changed, 8 insertions(+) | ||
| 18 | |||
| 19 | Index: qemu-5.2.0/tests/Makefile.include | ||
| 20 | =================================================================== | ||
| 21 | --- qemu-5.2.0.orig/tests/Makefile.include | ||
| 22 | +++ qemu-5.2.0/tests/Makefile.include | ||
| 23 | @@ -155,4 +155,12 @@ clean: check-clean | ||
| 24 | |||
| 25 | check-speed: bench-speed | ||
| 26 | |||
| 27 | +buildtest-TESTS: $(check-unit-y) | ||
| 28 | + | ||
| 29 | +runtest-TESTS: | ||
| 30 | + for f in $(check-unit-y); do \ | ||
| 31 | + nf=$$(echo $$f | sed 's/tests\//\.\//g'); \ | ||
| 32 | + $$nf; \ | ||
| 33 | + done | ||
| 34 | + | ||
| 35 | endif | ||
diff --git a/meta/recipes-devtools/qemu/qemu/run-ptest b/meta/recipes-devtools/qemu/qemu/run-ptest index b25a792d4f..f9a4e8fb2b 100644 --- a/meta/recipes-devtools/qemu/qemu/run-ptest +++ b/meta/recipes-devtools/qemu/qemu/run-ptest | |||
| @@ -7,4 +7,7 @@ ptestdir=$(dirname "$(readlink -f "$0")") | |||
| 7 | export SRC_PATH=$ptestdir | 7 | export SRC_PATH=$ptestdir |
| 8 | 8 | ||
| 9 | cd $ptestdir/tests | 9 | cd $ptestdir/tests |
| 10 | make -f Makefile.include -k runtest-TESTS | sed '/^ok /s/ok /PASS: /g' | 10 | tests=$(find . -name "test-*" ! -name "*.p") |
| 11 | for f in $tests; do | ||
| 12 | $f | sed '/^ok/ s/ok/PASS:/g' | ||
| 13 | done | ||
