On 6/28/20 4:45 AM, zangrc wrote:
Signed-off-by: Zang Ruochen <[email protected]>
Acked-by: Trevor Gamblin <[email protected]>
--- .../python/python3-ansicolors/run-ptest | 3 +++ .../python/python3-ansicolors_1.1.8.bb | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-ansicolors/run-ptestdiff --git a/meta-python/recipes-devtools/python/python3-ansicolors/run-ptest b/meta-python/recipes-devtools/python/python3-ansicolors/run-ptest new file mode 100644 index 000000000..7dc3ef32b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-ansicolors/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO test.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-ansicolors_1.1.8.bb b/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb index 9ba710cb7..a9ebebeef 100644 --- a/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb +++ b/meta-python/recipes-devtools/python/python3-ansicolors_1.1.8.bb @@ -7,6 +7,18 @@ SRC_URI[sha256sum] = "99f94f5e3348a0bcd43c82e5fc4414013ccc19d70bd939ad71e0133ce9PYPI_PACKAGE_EXT = "zip" -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/test.py ${D}${PTEST_PATH}/ +}BBCLASSEXTEND = "native nativesdk"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#85444): https://lists.openembedded.org/g/openembedded-devel/message/85444 Mute This Topic: https://lists.openembedded.org/mt/75167356/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
