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

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


Signed-off-by: Zang Ruochen <zangrc.fnst at cn.fujitsu.com>
---
 .../recipes-devtools/python/python-webcolors.inc   | 14 ++++++++++++++
 .../python/python3-webcolors/run-ptest             |  2 ++
 2 files changed, 16 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-webcolors/run-ptest

diff --git a/meta-python/recipes-devtools/python/python-webcolors.inc b/meta-python/recipes-devtools/python/python-webcolors.inc
index ef254e33b..ad012c979 100644
--- a/meta-python/recipes-devtools/python/python-webcolors.inc
+++ b/meta-python/recipes-devtools/python/python-webcolors.inc
@@ -10,3 +10,17 @@ RDEPENDS_${PN}_class-target = "\
 "
 
 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/
+}
diff --git a/meta-python/recipes-devtools/python/python3-webcolors/run-ptest b/meta-python/recipes-devtools/python/python3-webcolors/run-ptest
new file mode 100644
index 000000000..40c284799
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-webcolors/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+pytest
-- 
2.20.1





More information about the Openembedded-devel mailing list