diff mbox series

[meta-python,2/2] python3-zeroconf: Enable tests

Message ID 20260622102247.3370957-2-leon.anavi@konsulko.com
State Under Review
Headers show
Series [meta-python,1/2] python3-zeroconf: Upgrade 0.149.16 -> 0.149.17 | expand

Commit Message

Leon Anavi June 22, 2026, 10:22 a.m. UTC
Inherit ptest and includes tests for python3-zeroconf.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 .../python/python3-zeroconf/run-ptest            |  3 +++
 .../python/python3-zeroconf_0.149.17.bb          | 16 +++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-zeroconf/run-ptest
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-zeroconf/run-ptest b/meta-python/recipes-devtools/python/python3-zeroconf/run-ptest
new file mode 100644
index 0000000000..8d2017d39c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-zeroconf/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-zeroconf_0.149.17.bb b/meta-python/recipes-devtools/python/python3-zeroconf_0.149.17.bb
index 165ea63dda..e0ab47d3aa 100644
--- a/meta-python/recipes-devtools/python/python3-zeroconf_0.149.17.bb
+++ b/meta-python/recipes-devtools/python/python3-zeroconf_0.149.17.bb
@@ -5,9 +5,23 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=9fe712b1bc27c5c4e9ecd7f31d208900"
 
 SRC_URI[sha256sum] = "f10e58071bc5e749176b8dc8d7e7ed4d2e6b507dde20fd8169b760cf4f7f4c5a"
 
-inherit pypi python_poetry_core cython
+SRC_URI += "file://run-ptest"
+
+inherit pypi python_poetry_core cython ptest
 
 RDEPENDS:${PN} += " \
     python3-ifaddr (>=0.1.7) \
     python3-async-timeout \
 "
+
+RDEPENDS:${PN}-ptest += " \
+    python3-pytest \
+    python3-pytest-asyncio \
+    python3-pytest-codspeed \
+    python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}