On 2023-07-07 09:26, Alexander Kanavin wrote:
There are several issues handled here:
- a number of tests were failing due to missing dependencies, which
are added (thanks Trevor Gamblin for identifying the fixes)
- worse, these failures were not reported due to a combination
of regressed sed processing that relies on brittle, unstable verbose
output of python's test module, and shell pipeline obscuring a non-zero
exit code from python itself. This is changed to a direct handling
of python's exit code into a single PASS or FAIL, and changing full verbosity
(-v)
into verbose output only for items that did fail (-W).
- bonus improvement: python can run its tests in parallel, so take advantage
of that, and indeed that makes a complete ptest run four times faster (just over
five minutes). There's also extra memory required for that.
Thanks Alex. This is a huge improvement on the run time!
Signed-off-by: Alexander Kanavin <[email protected]>
---
meta/recipes-core/images/core-image-ptest.bb | 1 +
meta/recipes-devtools/python/python3/run-ptest | 2 +-
meta/recipes-devtools/python/python3_3.11.4.bb | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/images/core-image-ptest.bb
b/meta/recipes-core/images/core-image-ptest.bb
index 90c26641ba3..563fdb4731f 100644
--- a/meta/recipes-core/images/core-image-ptest.bb
+++ b/meta/recipes-core/images/core-image-ptest.bb
@@ -25,6 +25,7 @@ IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-lttng-tools =
"1524288"
# ptests need more memory than standard to avoid the OOM killer
QB_MEM = "-m 1024"
QB_MEM:virtclass-mcextend-lttng-tools = "-m 4096"
+QB_MEM:virtclass-mcextend-python3 = "-m 2048"
QB_MEM:virtclass-mcextend-python3-cryptography = "-m 4096"
TEST_SUITES = "ping ssh parselogs ptest"
diff --git a/meta/recipes-devtools/python/python3/run-ptest
b/meta/recipes-devtools/python/python3/run-ptest
index 05396e91abb..4271a7c94ea 100644
--- a/meta/recipes-devtools/python/python3/run-ptest
+++ b/meta/recipes-devtools/python/python3/run-ptest
@@ -1,3 +1,3 @@
#!/bin/sh
-SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test -v | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test -W -j 4 && echo "PASS: python3" ||
echo "FAIL: python3"
diff --git a/meta/recipes-devtools/python/python3_3.11.4.bb
b/meta/recipes-devtools/python/python3_3.11.4.bb
index 6b074c48cf2..bc03986e175 100644
--- a/meta/recipes-devtools/python/python3_3.11.4.bb
+++ b/meta/recipes-devtools/python/python3_3.11.4.bb
@@ -426,7 +426,7 @@ FILES:${PN}-man = "${datadir}/man"
# See https://bugs.python.org/issue18748 and
https://bugs.python.org/issue37395
RDEPENDS:libpython3:append:libc-glibc = " libgcc"
RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig"
-RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc
tzdata coreutils sed"
+RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb
${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed gcc g++ binutils"
RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-fr-fr locale-base-en-us
locale-base-tr-tr locale-base-de-de"
RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk',
'${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}"
RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter
${MLPREFIX}tcl', '', d)}"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184012):
https://lists.openembedded.org/g/openembedded-core/message/184012
Mute This Topic: https://lists.openembedded.org/mt/100005852/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-