aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZang Ruochen <zangrc.fnst@cn.fujitsu.com>2020-04-21 09:58:55 +0800
committerKhem Raj <raj.khem@gmail.com>2020-04-20 21:45:13 -0700
commit6ca376e8118bb8f0eae26a3a9fca05b67cdc8143 (patch)
tree8d9963a4e46e1fc2c846f295166dc8900d2c92eb
parentc96af8320a0c114f3074aaea318f027331397d27 (diff)
downloadmeta-openembedded-contrib-6ca376e8118bb8f0eae26a3a9fca05b67cdc8143.tar.gz
python3-msgpack: Enable ptest
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-msgpack/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-msgpack_0.6.2.bb15
2 files changed, 17 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-msgpack/run-ptest b/meta-python/recipes-devtools/python/python3-msgpack/run-ptest
new file mode 100644
index 0000000000..5cec711696
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-msgpack/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest
diff --git a/meta-python/recipes-devtools/python/python3-msgpack_0.6.2.bb b/meta-python/recipes-devtools/python/python3-msgpack_0.6.2.bb
index 7cfaf1c513..6d7e7a0dcd 100644
--- a/meta-python/recipes-devtools/python/python3-msgpack_0.6.2.bb
+++ b/meta-python/recipes-devtools/python/python3-msgpack_0.6.2.bb
@@ -3,7 +3,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=cd9523181d9d4fbf7ffca52eaa2a5751"
PYPI_PACKAGE = "msgpack"
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
SRC_URI[md5sum] = "ba46fdee995565f40e332bd7eea882f1"
SRC_URI[sha256sum] = "ea3c2f859346fcd55fc46e96885301d9c2f7a36d453f5d8f2967840efa1e1830"
@@ -13,3 +13,16 @@ RDEPENDS_${PN}_class-target += "\
"
BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
+}