Signed-off-by: Zang Ruochen <[email protected]>
---
 .../python/python3-pyroute2/run-ptest            |  3 +++
 .../python/python3-pyroute2_0.5.11.bb            | 16 +++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 
meta-python/recipes-devtools/python/python3-pyroute2/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-pyroute2/run-ptest 
b/meta-python/recipes-devtools/python/python3-pyroute2/run-ptest
new file mode 100644
index 000000000..5cec71169
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pyroute2/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest
diff --git a/meta-python/recipes-devtools/python/python3-pyroute2_0.5.11.bb 
b/meta-python/recipes-devtools/python/python3-pyroute2_0.5.11.bb
index 58b538a45..a4b8aa398 100644
--- a/meta-python/recipes-devtools/python/python3-pyroute2_0.5.11.bb
+++ b/meta-python/recipes-devtools/python/python3-pyroute2_0.5.11.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.GPL.v2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI[md5sum] = "7005db01604663fc2ecc089925980e05"
 SRC_URI[sha256sum] = 
"05e959f1a89d715158b91fe83b67946a4441e5e098cc225f4df78a3765ac4af2"
 
-inherit setuptools3 pypi
+inherit setuptools3 pypi ptest
 
 RDEPENDS_${PN} += " \
     ${PYTHON_PN}-ctypes \
@@ -21,3 +21,17 @@ RDEPENDS_${PN} += " \
     ${PYTHON_PN}-shell \
     ${PYTHON_PN}-unixadmin \
 "
+
+SRC_URI += " \
+       file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+       ${PYTHON_PN}-pytest \
+       ${PYTHON_PN}-fcntl \
+"
+
+do_install_ptest() {
+       install -d ${D}${PTEST_PATH}/tests
+       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
-- 
2.20.1



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

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

Reply via email to