Skip to contentSkip to conversation

python3-xlrd: Enable ptest

PATCH New Zang Ruochen 1 participant 1 message Mar 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-xlrd: Enable ptest

---
 .../recipes-devtools/python/python-xlrd.inc      | 16 ++++++++++++++++
 .../python/python3-xlrd/run-ptest                |  3 +++
 2 files changed, 19 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-xlrd/run-ptest
meta-python/recipes-devtools/python/python-xlrd.inc +16 -0
index f87d2ab7c..ee73e76b9 100644
@@ -12,3 +12,19 @@ SRC_URI[sha256sum] = "546eb36cee8db40c3eaa46c351e67ffee6eeb5fa2650b71bc4c758a29a
 RDEPENDS_${PN} += "${PYTHON_PN}-compression ${PYTHON_PN}-io ${PYTHON_PN}-pprint ${PYTHON_PN}-shell"
 
 BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += " \
+	file://run-ptest \
+"
+inherit ptest
+
+RDEPENDS_${PN}-ptest += " \
+	${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	install -d ${D}${PTEST_PATH}/examples
+	cp -rf ${S}/examples/* ${D}${PTEST_PATH}/examples/
+}
meta-python/recipes-devtools/python/python3-xlrd/run-ptest new file +3 -0
new file mode 100644
index 000000000..5cec71169
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest
Signature · 1 line
2.20.1