diff mbox series

[2/2] python3-chardet: Enable tests

Message ID 20260722103621.1810876-2-leon.anavi@konsulko.com
State Rejected
Headers show
Series [1/2] python3-chardet: Upgrade 6.0.0.post1 -> 7.4.3.bb | expand

Commit Message

Leon Anavi July 22, 2026, 10:36 a.m. UTC
Inherit ptest-python-pytest, include tests and scripts for chardet.
Add chardet to PTESTS_SLOW in ptest-packagelists.inc.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 meta/conf/distro/include/ptest-packagelists.inc      |  1 +
 .../recipes-devtools/python/python3-chardet_7.4.3.bb | 12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 3297b5a645..c83c1b5e0f 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -141,6 +141,7 @@  PTESTS_SLOW = "\
     perl \
     python3 \
     python3-cffi \
+    python3-chardet \
     python3-click \
     python3-cryptography \
     python3-numpy \
diff --git a/meta/recipes-devtools/python/python3-chardet_7.4.3.bb b/meta/recipes-devtools/python/python3-chardet_7.4.3.bb
index 30c44c6d7c..994ccdd5d6 100644
--- a/meta/recipes-devtools/python/python3-chardet_7.4.3.bb
+++ b/meta/recipes-devtools/python/python3-chardet_7.4.3.bb
@@ -6,7 +6,7 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=bd0753b9dc12e5e3da3047778fcf1dca"
 SRC_URI[sha256sum] = "cc1d4eb92a4ec1c2df3b490836ffa46922e599d34ce0bb75cf41fd2bf6303d56"
 UPSTREAM_CHECK_REGEX = "chardet-(?P<pver>6\..*)\.tar"
 
-inherit pypi python_hatchling
+inherit pypi python_hatchling ptest-python-pytest
 
 DEPENDS += "python3-hatch-vcs-native"
 
@@ -21,4 +21,14 @@  RDEPENDS:${PN}:class-target += " \
     python3-logging \
 "
 
+RDEPENDS:${PN}-ptest += " \
+    python3-core \
+    git \
+"
+
+do_install_ptest:append() {
+    install -d ${D}${PTEST_PATH}/scripts
+    cp -r ${S}/scripts/*.py ${D}${PTEST_PATH}/scripts/
+}
+
 BBCLASSEXTEND = "native nativesdk"