Skip to contentSkip to conversation

python3-flexcache: enable ptest

PATCH New alperak 1 participant 1 message Apr 11, 2024

lore
Share & tools
lore

alperak

author
#0 lore raw

PATCH 1/1 python3-flexcache: enable ptest

* Ptest tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_FAST_META_PYTHON

Ptest result:
=============

qemux86-64:

Testsuite summary
TOTAL: 19
PASS: 19
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 9
END: /usr/lib/python3-flexcache/ptest
2024-04-11T10:48
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 19
PASS: 19
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 9
END: /usr/lib/python3-flexcache/ptest
2024-04-11T10:51
STOP: ptest-runner
TOTAL: 1 FAIL: 0

---
 .../include/ptest-packagelists-meta-python.inc  |  1 +
 .../python/python3-flexcache/run-ptest          |  3 +++
 .../python/python3-flexcache_0.3.bb             | 17 ++++++++++++++++-
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-flexcache/run-ptest
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 19566e466..acb09aaca 100644
@@ -19,6 +19,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-click \
     python3-dominate \
     python3-execnet \
+    python3-flexcache \
     python3-freezegun \
     python3-geojson \
     python3-google-auth-oauthlib \
meta-python/recipes-devtools/python/python3-flexcache/run-ptest new file +3 -0
new file mode 100644
index 000000000..8d2017d39
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
meta-python/recipes-devtools/python/python3-flexcache_0.3.bb +16 -1
index 509a6a42e..165783c9f 100644
@@ -5,6 +5,21 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=32f547dac365c355d2cdbcd7ebea9144"
 DEPENDS += "python3-setuptools-scm-native"
 SRC_URI[sha256sum] = "18743bd5a0621bfe2cf8d519e4c3bfdf57a269c15d1ced3fb4b64e0ff4600656"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_setuptools_build_meta ptest
 PYPI_PACKAGE = "flexcache"
+
+SRC_URI += " \
+        file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+        python3-pytest \
+        python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/testsuite
+        cp -rf ${S}/flexcache/testsuite/* ${D}${PTEST_PATH}/testsuite/
+}
+
 RDEPENDS:${PN} = "python3-typing-extensions"
Signature · 1 line
2.25.1