aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorZang Ruochen <zangrc.fnst@cn.fujitsu.com>2020-06-15 22:39:09 +0800
committerKhem Raj <raj.khem@gmail.com>2020-06-17 08:56:47 -0700
commit9b318ba90bcce48f4a87a71a4e05df14d5b6294b (patch)
treed8f88d773bbbc7c931a228c8acd831b5b2ffd9c7 /meta-python
parentcefcd956607ddb0c93003eda979b6cf81137b78d (diff)
downloadmeta-openembedded-9b318ba90bcce48f4a87a71a4e05df14d5b6294b.tar.gz
python3-iso3166: Enable ptest
-Consolidate into a single file. 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>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-iso3166/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-iso3166_1.0.1.bb15
2 files changed, 17 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-iso3166/run-ptest b/meta-python/recipes-devtools/python/python3-iso3166/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-iso3166/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | 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-iso3166_1.0.1.bb b/meta-python/recipes-devtools/python/python3-iso3166_1.0.1.bb
index 23fc4eb75c..36f9c911b8 100644
--- a/meta-python/recipes-devtools/python/python3-iso3166_1.0.1.bb
+++ b/meta-python/recipes-devtools/python/python3-iso3166_1.0.1.bb
@@ -6,7 +6,20 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5e2f4edc7e7408a82e4a1d05f229b695"
SRC_URI[md5sum] = "53c313c7ae8721e40ddd5e7a01bbcb7e"
SRC_URI[sha256sum] = "b1e58dbcf50fbb2c9c418ec7a6057f0cdb30b8f822ac852f72e71ba769dae8c5"
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
RDEPENDS_${PN} += "python3-numbers"