aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools
diff options
context:
space:
mode:
authorZang Ruochen <zangrc.fnst@cn.fujitsu.com>2020-04-11 08:42:01 +0800
committerKhem Raj <raj.khem@gmail.com>2020-04-10 17:48:38 -0700
commit8a078a9d619f68a6563eba72823fe7398a295dd6 (patch)
tree9f26493cbc9d221959a598817b7bd286898094e6 /meta-python/recipes-devtools
parent1ec13d7d9516039db6374f38f39b57f67905ee6b (diff)
downloadmeta-openembedded-contrib-8a078a9d619f68a6563eba72823fe7398a295dd6.tar.gz
python3-prettytable: Enable ptest
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools')
-rw-r--r--meta-python/recipes-devtools/python/python-prettytable.inc13
-rw-r--r--meta-python/recipes-devtools/python/python3-prettytable/run-ptest3
2 files changed, 16 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-prettytable.inc b/meta-python/recipes-devtools/python/python-prettytable.inc
index 07e896d2d1..09384dae17 100644
--- a/meta-python/recipes-devtools/python/python-prettytable.inc
+++ b/meta-python/recipes-devtools/python/python-prettytable.inc
@@ -23,3 +23,16 @@ UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/PrettyTable/"
UPSTREAM_CHECK_REGEX = "/PrettyTable/(?P<pver>(\d+[\.\-_]*)+)"
BBCLASSEXTEND = "native nativesdk"
+inherit ptest
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+ cp -f ${S}/prettytable_test.py ${D}${PTEST_PATH}/
+}
diff --git a/meta-python/recipes-devtools/python/python3-prettytable/run-ptest b/meta-python/recipes-devtools/python/python3-prettytable/run-ptest
new file mode 100644
index 0000000000..5cec711696
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-prettytable/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest