| Message ID | 20260609014110.3859502-1-Shilong.Jiao@windriver.com |
|---|---|
| State | Changes Requested |
| Headers | show |
| Series | python3-six: Add ptest support | expand |
On Tue Jun 9, 2026 at 3:41 AM CEST, Shilong via lists.openembedded.org Jiao wrote: > From: Shilong Jiao <Shilong.Jiao@windriver.com> > > Add ptest for python3-six using pytest to run the test_six.py > test suite included in the source package. > Hi, Thanks for your patch. It looks like some tests are failing on the autobuilder: Failed ptests: {'python3-six': ['test_six.py::test_lazy', 'test_six.py::test_move_items[html_entities]', 'test_six.py::test_move_items[html_parser]', 'test_six.py::test_move_items[BaseHTTPServer]', 'test_six.py::test_move_items[CGIHTTPServer]', 'test_six.py::test_move_items[SimpleHTTPServer]', 'test_six.py::test_move_items[xmlrpc_client]', 'test_six.py::test_move_items[xmlrpc_server]']} https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/3794 https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/522 https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/505 Can you have a look at the issue? Thanks, Mathieu
Hi, Thanks for the feedback. I'll investigate the failing tests and work on fixing them. Looking at the failed tests, they seem to be related to: - test_lazy: Module lazy loading functionality - test_move_items: Python 2 to 3 module renaming/moving tests (html_entities, html_parser, HTTP servers, xmlrpc modules) I'll analyze the test failures from the autobuilder logs and send an updated patch soon. Best regards, Shilong Jiao Best regards, shilong Tel:84778559 cellphone:15910943969
Hi, Quick update on my investigation: I've tested these failing cases locally in my build environment, and interestingly all 8 tests pass: - test_lazy: PASS - test_move_items[html_entities]: PASS - test_move_items[html_parser]: PASS - test_move_items[BaseHTTPServer]: PASS - test_move_items[CGIHTTPServer]: PASS - test_move_items[SimpleHTTPServer]: PASS - test_move_items[xmlrpc_client]: PASS - test_move_items[xmlrpc_server]: PASS This suggests the failures might be specific to the autobuilder environment or related to test execution order. The test_lazy failure in particular looks like it could be caused by html.parser already being imported when the test runs. Could you help me access the detailed error messages from the autobuilder logs? This would help me understand the actual failure mode and create an appropriate fix. Thanks, Shilong Jiao
On Tue Jun 9, 2026 at 12:09 PM CEST, Shilong via lists.openembedded.org Jiao wrote: > Hi, > > Quick update on my investigation: > > I've tested these failing cases locally in my build environment, and > interestingly all 8 tests pass: > - test_lazy: PASS > - test_move_items[html_entities]: PASS > - test_move_items[html_parser]: PASS > - test_move_items[BaseHTTPServer]: PASS > - test_move_items[CGIHTTPServer]: PASS > - test_move_items[SimpleHTTPServer]: PASS > - test_move_items[xmlrpc_client]: PASS > - test_move_items[xmlrpc_server]: PASS > > This suggests the failures might be specific to the autobuilder environment > or related to test execution order. The test_lazy failure in particular > looks like it could be caused by html.parser already being imported when > the test runs. > > Could you help me access the detailed error messages from the autobuilder > logs? This would help me understand the actual failure mode and create an > appropriate fix. > > Thanks, > Shilong Jiao > ________________________________ Hi, The autobuilder configuration is described in the "Write config" step of the build. I did reproduce this issue locally with following layers: BBLAYERS ?= " \ .../openembedded-core/meta \ .../meta-yocto/meta-poky \ .../meta-yocto/meta-yocto-bsp \ .../openembedded-core/meta-selftest \ " And following lines in my local.conf: SDKMACHINE = "x86_64" PACKAGE_CLASSES = "package_rpm package_deb package_ipk" INHERIT += 'image-buildinfo' IMAGE_BUILDINFO_VARS:append = ' IMAGE_BASENAME IMAGE_NAME' TEST_SUITES = 'ping ssh ptest' SANITY_TESTED_DISTROS = '' OEQA_TESTDISPLAY = ':1' OE_FRAGMENTS += 'core/yocto-autobuilder/autobuilder core/yocto-autobuilder/autobuilder-resource-constraints' EXTRA_IMAGE_FEATURES ?= 'allow-empty-password empty-root-password allow-root-login' OE_FRAGMENTS += 'machine/qemux86-64 distro/poky' Thanks, Mathieu
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 0eaa09eb33..a340418211 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -88,6 +88,7 @@ PTESTS_FAST = "\ python3-pytz \ python3-pyyaml \ python3-rpds-py \ + python3-six \ python3-trove-classifiers \ python3-vcs-versioning \ python3-uritools \ diff --git a/meta/recipes-devtools/python/python3-six/run-ptest b/meta/recipes-devtools/python/python3-six/run-ptest new file mode 100755 index 0000000000..285c442b3c --- /dev/null +++ b/meta/recipes-devtools/python/python3-six/run-ptest @@ -0,0 +1,8 @@ +#!/bin/bash + +PTEST_DIR=$(dirname $(readlink -f $0)) +python3 -m pytest -v --tb=short $PTEST_DIR/test_six.py 2>&1 | \ + sed -n -e 's/^\(.*::[^ ]*\) PASSED.*/PASS: \1/p' \ + -e 's/^\(.*::[^ ]*\) FAILED.*/FAIL: \1/p' \ + -e 's/^\(.*::[^ ]*\) SKIPPED.*/SKIP: \1/p' \ + -e 's/^\(.*::[^ ]*\) ERROR.*/FAIL: \1/p' diff --git a/meta/recipes-devtools/python/python3-six_1.17.0.bb b/meta/recipes-devtools/python/python3-six_1.17.0.bb index 693f1818d3..213b3dc593 100644 --- a/meta/recipes-devtools/python/python3-six_1.17.0.bb +++ b/meta/recipes-devtools/python/python3-six_1.17.0.bb @@ -1,4 +1,17 @@ -inherit setuptools3 +inherit setuptools3 ptest require python-six.inc SRC_URI[sha256sum] = "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" + +SRC_URI += "file://run-ptest" + +RDEPENDS:${PN}-ptest += " \ + bash \ + python3-pytest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH} + install -m 0644 ${S}/test_six.py ${D}${PTEST_PATH}/ +}