Hi Gyorgy, On Tue, Jan 13, 2026 at 2:36 PM Gyorgy Sarvari <[email protected]> wrote:
> Small simplification: if you inherit the ptest-python-ptest[1] class > instead of ptest, it takes care of all other test boilerplate (test > installation, run-ptest creation, RDEPENDS...) > > Though I wouldn't submit a v2 because of this - but for next time it > might be useful. > Thanks for the recommendation! Noted down. It sounds like a very practical approach and I will definitely apply it the next time I am working on ptests. Thanks, Leon > > [1]: > > https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/ptest-python-pytest.bbclass > > On 1/13/26 11:34, Leon Anavi via lists.openembedded.org wrote: > > Add ptest and upgrade to release 0.13.1: > > > > - pyproject.toml: add pytest as dev dependency > > - Import Self from type_checking if needed to be compat with 3.9 > > - CI: run pytest via uv > > - CI: test against multiple python versions > > > > Signed-off-by: Leon Anavi <[email protected]> > > --- > > .../python/python3-libevdev/run-ptest | 3 +++ > > ...vdev_0.12.bb => python3-libevdev_0.13.1.bb} | 18 ++++++++++++++++-- > > 2 files changed, 19 insertions(+), 2 deletions(-) > > create mode 100644 > meta-python/recipes-devtools/python/python3-libevdev/run-ptest > > rename meta-python/recipes-devtools/python/{python3-libevdev_0.12.bb > => python3-libevdev_0.13.1.bb} (52%) > > > > diff --git > a/meta-python/recipes-devtools/python/python3-libevdev/run-ptest > b/meta-python/recipes-devtools/python/python3-libevdev/run-ptest > > new file mode 100644 > > index 0000000000..8d2017d39c > > --- /dev/null > > +++ b/meta-python/recipes-devtools/python/python3-libevdev/run-ptest > > @@ -0,0 +1,3 @@ > > +#!/bin/sh > > + > > +pytest --automake > > diff --git a/meta-python/recipes-devtools/python/ > python3-libevdev_0.12.bb b/meta-python/recipes-devtools/python/ > python3-libevdev_0.13.1.bb > > similarity index 52% > > rename from meta-python/recipes-devtools/python/python3-libevdev_0.12.bb > > rename to meta-python/recipes-devtools/python/python3-libevdev_0.13.1.bb > > index cabcfd8df6..1c8a99eb33 100644 > > --- a/meta-python/recipes-devtools/python/python3-libevdev_0.12.bb > > +++ b/meta-python/recipes-devtools/python/python3-libevdev_0.13.1.bb > > @@ -5,13 +5,27 @@ SECTION = "devel/python" > > LICENSE = "MIT" > > LIC_FILES_CHKSUM = "file://COPYING;md5=d94c10c546b419eddc6296157ec40747" > > > > -SRC_URI[sha256sum] = > "02e952632ec6c249cbb9c66f6fa00012ea448b06606c77cd139133bc2fe46b08" > > +SRC_URI[sha256sum] = > "dc3369cd1401767b9ecb1117cd6b73faba9038e3bd9e1695a710a9e9d9415e8d" > > > > -inherit pypi setuptools3 > > +inherit pypi python_hatchling ptest > > > > PYPI_PACKAGE = "libevdev" > > > > +SRC_URI += " \ > > + file://run-ptest \ > > +" > > + > > RDEPENDS:${PN} += " \ > > libevdev \ > > python3-ctypes \ > > " > > + > > +RDEPENDS:${PN}-ptest += " \ > > + python3-pytest \ > > +" > > + > > +do_install_ptest() { > > + install -d ${D}${PTEST_PATH}/test > > + cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/ > > +} > > + > > > > > > > > -- Leon Anavi Software Engineer Mob : +359 88 527 7901 konsulko.com
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#123503): https://lists.openembedded.org/g/openembedded-devel/message/123503 Mute This Topic: https://lists.openembedded.org/mt/117241112/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
