diff mbox series

[meta-python,2/5] python3-tzdata: enable ptest

Message ID 771bd809df2cccb45e6553aa7c60bd476ea2a3a0.1723134758.git.tim.orling@konsulko.com
State Accepted
Headers show
Series [meta-python,1/5] python3-tzdata: add recipe for v2024.1 | expand

Commit Message

Tim Orling Aug. 8, 2024, 4:38 p.m. UTC
From: Tim Orling <tim.orling@konsulko.com>

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>
---
 .../include/ptest-packagelists-meta-python.inc     |  1 +
 .../python/python3-tzdata/run-ptest                |  3 +++
 .../python/python3-tzdata_2024.1.bb                | 14 ++++++++++++++
 3 files changed, 18 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-tzdata/run-ptest
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 56a5cf2f09..aa918aa89c 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/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 \
diff --git a/meta-python/recipes-devtools/python/python3-tzdata/run-ptest b/meta-python/recipes-devtools/python/python3-tzdata/run-ptest
new file mode 100644
index 0000000000..8d2017d39c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-tzdata/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb b/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb
index d73b27a4f6..f4454f6dff 100644
--- a/meta-python/recipes-devtools/python/python3-tzdata_2024.1.bb
+++ b/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}/
+}