Inherit ptest, update runtime dependencies and include the tests
for pycurl.

Signed-off-by: Leon Anavi <[email protected]>
---
 .../python/python3-pycurl/run-ptest           |  3 +++
 .../python/python3-pycurl_7.47.0.bb           | 21 ++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-pycurl/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-pycurl/run-ptest 
b/meta-python/recipes-devtools/python/python3-pycurl/run-ptest
new file mode 100644
index 0000000000..8d2017d39c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pycurl/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-pycurl_7.47.0.bb 
b/meta-python/recipes-devtools/python/python3-pycurl_7.47.0.bb
index 7259957174..5ed7b8e30d 100644
--- a/meta-python/recipes-devtools/python/python3-pycurl_7.47.0.bb
+++ b/meta-python/recipes-devtools/python/python3-pycurl_7.47.0.bb
@@ -14,8 +14,27 @@ LIC_FILES_CHKSUM = 
"file://COPYING-LGPL;md5=4fbd65380cdd255951079008b364516c \
 
 SRC_URI[sha256sum] = 
"5e3cf357939da8d4ceefe3c7f305afcf9b47cba66cfd95e7768ca43b38445e14"
 
+SRC_URI += " file://run-ptest"
+
 DEPENDS = "curl"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_setuptools_build_meta ptest
+
+RDEPENDS:${PN}-ptest += " \
+    python3-pytest \
+    python3-core \
+    python3-flask \
+    python3-numpy \
+    python3-flaky \
+    python3-setuptools \
+    python3-unittest \
+    python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+    cp -f ${S}/setup.py ${D}${PTEST_PATH}
+}
 
 BBCLASSEXTEND  += "native nativesdk"
-- 
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#128064): 
https://lists.openembedded.org/g/openembedded-devel/message/128064
Mute This Topic: https://lists.openembedded.org/mt/120155631/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to