aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZang Ruochen <zangrc.fnst@cn.fujitsu.com>2020-06-30 09:17:32 +0800
committerKhem Raj <raj.khem@gmail.com>2020-07-03 18:07:12 -0700
commit82a485c6114464ed2d3b4ff20074b657bf64c380 (patch)
tree22f4d085ccc9b7084886a3632f648ff041eb48ae
parenta77cafb0f7947d014832b43eb20cb9c3d4b00f91 (diff)
downloadmeta-openembedded-82a485c6114464ed2d3b4ff20074b657bf64c380.tar.gz
meta-openembedded-82a485c6114464ed2d3b4ff20074b657bf64c380.tar.bz2
meta-openembedded-82a485c6114464ed2d3b4ff20074b657bf64c380.zip
python3-u-msgpack-python: Enable ptest
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Acked-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-u-msgpack-python/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-u-msgpack-python_2.6.0.bb14
2 files changed, 16 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-u-msgpack-python/run-ptest b/meta-python/recipes-devtools/python/python3-u-msgpack-python/run-ptest
new file mode 100644
index 000000000..7110f6bc4
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-u-msgpack-python/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO test_umsgpack.py| sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
diff --git a/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.6.0.bb b/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.6.0.bb
index 6d2e0e0c3..f3f321e18 100644
--- a/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.6.0.bb
+++ b/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.6.0.bb
@@ -5,7 +5,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9eb4691bcb66360acee473a8cf75f594"
SRC_URI[sha256sum] = "754edb07eaee39a9686a99823892e3a1be4e0948d9cc5c717946750c27643c9c"
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+ cp -f ${S}/test_umsgpack.py ${D}${PTEST_PATH}/
+}
RDEPENDS_${PN} += " \
${PYTHON_PN}-datetime \