[oe] [meta-python] [PATCH] python3-xmltodict: Enable ptest

Zang Ruochen zangrc.fnst at cn.fujitsu.com
Fri Mar 20 02:21:33 UTC 2020


Signed-off-by: Zang Ruochen <zangrc.fnst at cn.fujitsu.com>
---
 .../python/python3-xmltodict/run-ptest            |  3 +++
 .../python/python3-xmltodict_0.12.0.bb            | 15 ++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-xmltodict/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-xmltodict/run-ptest b/meta-python/recipes-devtools/python/python3-xmltodict/run-ptest
new file mode 100644
index 000000000..5cec71169
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-xmltodict/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest
diff --git a/meta-python/recipes-devtools/python/python3-xmltodict_0.12.0.bb b/meta-python/recipes-devtools/python/python3-xmltodict_0.12.0.bb
index 00aa81809..d07888324 100644
--- a/meta-python/recipes-devtools/python/python3-xmltodict_0.12.0.bb
+++ b/meta-python/recipes-devtools/python/python3-xmltodict_0.12.0.bb
@@ -9,4 +9,17 @@ SRC_URI[sha256sum] = "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d16
 
 PYPI_PACKAGE = "xmltodict"
 
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+	file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
-- 
2.20.1





More information about the Openembedded-devel mailing list