Signed-off-by: Zang Ruochen <[email protected]>
---
 .../recipes-devtools/python/python-jinja2.inc    | 16 ++++++++++++++++
 .../python/python3-jinja2/run-ptest              |  3 +++
 2 files changed, 19 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-jinja2/run-ptest

diff --git a/meta-python/recipes-devtools/python/python-jinja2.inc 
b/meta-python/recipes-devtools/python/python-jinja2.inc
index 6a95b953f..927230515 100644
--- a/meta-python/recipes-devtools/python/python-jinja2.inc
+++ b/meta-python/recipes-devtools/python/python-jinja2.inc
@@ -15,3 +15,19 @@ RDEPENDS_${PN} += "${PYTHON_PN}-io ${PYTHON_PN}-pickle 
${PYTHON_PN}-crypt \
 CLEANBROKEN = "1"
 
 BBCLASSEXTEND = "native nativesdk"
+
+inherit ptest
+
+SRC_URI += " \
+       file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+       ${PYTHON_PN}-pytest \
+       ${PYTHON_PN}-unixadmin \
+"
+
+do_install_ptest() {
+       install -d ${D}${PTEST_PATH}/tests
+       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
diff --git a/meta-python/recipes-devtools/python/python3-jinja2/run-ptest 
b/meta-python/recipes-devtools/python/python3-jinja2/run-ptest
new file mode 100644
index 000000000..5cec71169
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-jinja2/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest
-- 
2.20.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84005): 
https://lists.openembedded.org/g/openembedded-devel/message/84005
Mute This Topic: https://lists.openembedded.org/mt/73164558/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to