Acked-by: Trevor Gamblin <trevor.gamblin@windriver.com>Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
--- .../python/python3-soupsieve/run-ptest | 3 +++ .../python/python3-soupsieve_2.0.1.bb | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-soupsieve/run-ptest 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"