aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python
diff options
context:
space:
mode:
authorZang Ruochen <zangrc.fnst@cn.fujitsu.com>2020-07-17 03:43:19 +0800
committerKhem Raj <raj.khem@gmail.com>2020-07-16 12:10:39 -0700
commit2c2c5ea042be2a453984c7bd456b2e4e97b7ac33 (patch)
tree384cb80b0786d911b7255ecafc323744949b4d9f /meta-python/recipes-devtools/python
parent5589e39dbe4f19e8cecd0a55d5f5130e953c3b08 (diff)
downloadmeta-openembedded-contrib-2c2c5ea042be2a453984c7bd456b2e4e97b7ac33.tar.gz
python3-soupsieve: 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>
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r--meta-python/recipes-devtools/python/python3-soupsieve/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-soupsieve_2.0.1.bb16
2 files changed, 18 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-soupsieve/run-ptest b/meta-python/recipes-devtools/python/python3-soupsieve/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-soupsieve/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-soupsieve_2.0.1.bb b/meta-python/recipes-devtools/python/python3-soupsieve_2.0.1.bb
index aa087c9200..ae242af562 100644
--- a/meta-python/recipes-devtools/python/python3-soupsieve_2.0.1.bb
+++ b/meta-python/recipes-devtools/python/python3-soupsieve_2.0.1.bb
@@ -7,6 +7,20 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5a6fd3b0c24fc5a041a3d1bbb22c81b5"
SRC_URI[md5sum] = "62a7481c7dbf6d8cc21e4e3a79c72034"
SRC_URI[sha256sum] = "a59dc181727e95d25f781f0eb4fd1825ff45590ec8ff49eadfd7f1a537cc0232"
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+ file://run-ptest \
+"
+
+RDEPENDS_${PN}-ptest += " \
+ ${PYTHON_PN}-pytest \
+ ${PYTHON_PN}-beautifulsoup4 \
+"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
BBCLASSEXTEND = "native nativesdk"