diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2021-02-04 17:07:14 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-05 08:16:32 +0000 |
commit | 03bf6b3ec0aaa24e9f81b3b0024c59f7cc77b410 (patch) | |
tree | 7eabda26432abde9b6d8136cf911498dab046d0b /meta/recipes-devtools/qemu/qemu | |
parent | c05385c88746b8e969d79b6140f5916c4a8bac86 (diff) | |
download | poky-03bf6b3ec0aaa24e9f81b3b0024c59f7cc77b410.tar.gz |
qemu: make ptest rework
After qemu upgrades to 5.2.0 in commit [1], if also switches
to meson and the previous logic which introduces the testsuites
changes in [2] and results in below error when run ptest test:
# ./run-ptest
for f in ; do \
nf=$(echo $f | sed 's/tests\//\.\//g'); \
$nf; \
done
So refactor the ptest part code to make it work again.
[1] https://git.openembedded.org/openembedded-core/commit/?id=181c635567aafb9b4787d8d6d0bcd4a615ceae80
[2] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=279588d4deea2694ebe9ceb29dfdc5c08a7c4e27
(From OE-Core rev: a5c1290e8a24b844f0ba62df270f976096394d87)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch | 35 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/run-ptest | 5 |
2 files changed, 4 insertions, 36 deletions
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 | ||