Browse Source

python3-tzdata: enable ptest

Add to ptest-packagelists-meta-python.inc META_PYTHON_PTESTS_FAST

Install ${S}/VERSION to PTEST_PATH for test_version

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Tim Orling 10 months ago
parent
commit
447369b01e

+ 1 - 0
meta-python/conf/include/ptest-packagelists-meta-python.inc

@@ -74,6 +74,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-tomlkit \
     python3-trustme \
     python3-typeguard \
+    python3-tzdata \
     python3-ujson \
     python3-u-msgpack-python \
     python3-unidiff \

+ 3 - 0
meta-python/recipes-devtools/python/python3-tzdata/run-ptest

@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake

+ 14 - 0
meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb

@@ -8,3 +8,17 @@ SRC_URI[sha256sum] = "2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5cea
 
 inherit pypi python_setuptools_build_meta
 
+inherit ptest
+
+SRC_URI += "file://run-ptest"
+
+RDEPENDS:${PN}-ptest += "\
+    python3-pytest \
+    python3-pytest-subtests \
+    python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+    cp -rf ${S}/tests/ ${D}${PTEST_PATH}/
+	install ${S}/VERSION ${D}${PTEST_PATH}/
+}