On 6/15/20 10:39 AM, zangrc wrote:
-Consolidate into a single file.

Signed-off-by: Zang Ruochen <zangrc.f...@cn.fujitsu.com>
Acked-by: Trevor Gamblin <trevor.gamb...@windriver.com>
---
  .../python/python3-iso3166/run-ptest              |  3 +++
  .../python/python3-iso3166_1.0.1.bb               | 15 ++++++++++++++-
  2 files changed, 17 insertions(+), 1 deletion(-)
  create mode 100644 
meta-python/recipes-devtools/python/python3-iso3166/run-ptest

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 000000000..b63c4de0d
--- /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 23fc4eb75..36f9c911b 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"

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#85172): 
https://lists.openembedded.org/g/openembedded-devel/message/85172
Mute This Topic: https://lists.openembedded.org/mt/74887517/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to