Skip to contentSkip to conversation

python3-flask: add ptest

PATCH jan vermaete 2 participants 2 messages May 30, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Question: should I add to the list in conf/include/ptest-packagelists-meta-python.inc? Or will the maintainer do this?
It took about 60sec in qemu on a slow machine.

Quoted 58 lines · Jan Vermaete via lists.openembedded.org
---
 .../recipes-devtools/python/python3-flask/run-ptest   |  3 +++
 .../recipes-devtools/python/python3-flask_3.0.2.bb    | 11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-flask/run-ptest
meta-python/recipes-devtools/python/python3-flask/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-flask_3.0.2.bb +10 -2
index 300ca99dd..99524b437 100644
@@ -8,10 +8,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
 
 SRC_URI[sha256sum] = "822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d"
 
+SRC_URI += " \
+        file://run-ptest \
+"
+
 UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask"
 UPSTREAM_CHECK_REGEX = "/Flask/(?P<pver>(\d+[\.\-_]*)+)"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_setuptools_build_meta ptest
 
 CLEANBROKEN = "1"
 
@@ -23,3 +27,8 @@ RDEPENDS:${PN} = " \
     python3-profile \
     python3-werkzeug \
 "
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
--

2.39.2

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

Signature · 2 lines
Jan Vermaete
“Success is a self-correcting phenomenom.” -- Gary Hamel
#2 lore raw
Quoted 5 lines · Jan Vermaete via lists.openembedded.org

Question: should I add to the list in conf/include/ptest-packagelists-meta-python.inc? Or will the maintainer do this?
It took about 60sec in qemu on a slow machine.

yes please add it to fast section,

Quoted 70 lines
Quoted 47 lines · Jan Vermaete via lists.openembedded.org
---
 .../recipes-devtools/python/python3-flask/run-ptest   |  3 +++
 .../recipes-devtools/python/python3-flask_3.0.2.bb    | 11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-flask/run-ptest
meta-python/recipes-devtools/python/python3-flask/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-flask_3.0.2.bb +10 -2
index 300ca99dd..99524b437 100644
@@ -8,10 +8,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
 
 SRC_URI[sha256sum] = "822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d"
 
+SRC_URI += " \
+        file://run-ptest \
+"
+
 UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask"
 UPSTREAM_CHECK_REGEX = "/Flask/(?P<pver>(\d+[\.\-_]*)+)"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_setuptools_build_meta ptest
 
 CLEANBROKEN = "1"
 
@@ -23,3 +27,8 @@ RDEPENDS:${PN} = " \
     python3-profile \
     python3-werkzeug \
 "
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
--
Quoted 5 lines

2.39.2

--
Jan Vermaete
“Success is a self-correcting phenomenom.” -- Gary Hamel

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