From 0fdee019fd5c90abd057b9c47f6a6d6786caec5c Mon Sep 17 00:00:00 2001 From: Zang Ruochen Date: Fri, 17 Jul 2020 03:43:17 +0800 Subject: python3-semver: Enable ptest Signed-off-by: Zang Ruochen Acked-by: Trevor Gamblin Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-semver/run-ptest | 3 +++ .../recipes-devtools/python/python3-semver_2.10.2.bb | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-semver/run-ptest diff --git a/meta-python/recipes-devtools/python/python3-semver/run-ptest b/meta-python/recipes-devtools/python/python3-semver/run-ptest new file mode 100644 index 0000000000..43c03b594b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-semver/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO test_semver.py --disable-warnings| 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-semver_2.10.2.bb b/meta-python/recipes-devtools/python/python3-semver_2.10.2.bb index b41ef5ddc7..71cb1acec3 100644 --- a/meta-python/recipes-devtools/python/python3-semver_2.10.2.bb +++ b/meta-python/recipes-devtools/python/python3-semver_2.10.2.bb @@ -7,6 +7,18 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665 SRC_URI[md5sum] = "3e11ae9782121e8ffe9f8a8b763a8cb5" SRC_URI[sha256sum] = "c0a4a9d1e45557297a722ee9bac3de2ec2ea79016b6ffcaca609b0bc62cf4276" -inherit pypi setuptools3 +inherit pypi setuptools3 ptest BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + cp -f ${S}/test_semver.py ${D}${PTEST_PATH}/ +} -- cgit 1.2.3-korg