diff options
author | Zang Ruochen <zangrc.fnst@cn.fujitsu.com> | 2020-06-15 22:37:24 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-06-17 08:56:34 -0700 |
commit | 3bfde64d32c89579e9eb93bd048044907105d354 (patch) | |
tree | e9ae1ebb9c270a9522665242c67ed0555dd241df | |
parent | 3a05a4e325d72cbf36d28675537a955f34af9d2a (diff) | |
download | meta-openembedded-3bfde64d32c89579e9eb93bd048044907105d354.tar.gz |
python3-intervals: Enable ptest
-Consolidate into a single file.
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>
3 files changed, 31 insertions, 17 deletions
diff --git a/meta-python/recipes-devtools/python/python-intervals.inc b/meta-python/recipes-devtools/python/python-intervals.inc deleted file mode 100644 index 4489aa59d5..0000000000 --- a/meta-python/recipes-devtools/python/python-intervals.inc +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "Interval arithmetic for Python" -HOMEPAGE = "https://github.com/AlexandreDecan/python-intervals" -SECTION = "devel/python" - -LICENSE = "LGPLv3" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05f1e16a8e59ce3e9a979e881816c2ab" - -PYPI_PACKAGE := "python-intervals" - -inherit pypi - -SRC_URI[md5sum] = "8955317ff4e42590c90ba6247b1caaed" -SRC_URI[sha256sum] = "0d26746eaed0be78a61dd289bb7a10721b08770bb3e807614835f490d514f2a5" - -BBCLASSEXTEND = "native" diff --git a/meta-python/recipes-devtools/python/python3-intervals/run-ptest b/meta-python/recipes-devtools/python/python3-intervals/run-ptest new file mode 100644 index 0000000000..357d8cb987 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-intervals/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest -o log_cli=true -o log_cli_level=INFO test_intervals.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-intervals_1.10.0.bb b/meta-python/recipes-devtools/python/python3-intervals_1.10.0.bb index 8cbe1090f3..2e8276ec72 100644 --- a/meta-python/recipes-devtools/python/python3-intervals_1.10.0.bb +++ b/meta-python/recipes-devtools/python/python3-intervals_1.10.0.bb @@ -1,2 +1,28 @@ -inherit setuptools3 -require python-intervals.inc +DESCRIPTION = "Interval arithmetic for Python" +HOMEPAGE = "https://github.com/AlexandreDecan/python-intervals" +SECTION = "devel/python" + +LICENSE = "LGPLv3" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05f1e16a8e59ce3e9a979e881816c2ab" + +PYPI_PACKAGE := "python-intervals" + +SRC_URI += " \ + file://run-ptest \ +" + +inherit pypi setuptools3 ptest + +RDEPENDS_${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + cp -f ${S}/test_intervals.py ${D}${PTEST_PATH} + cp -f ${S}/README.md ${D}${PTEST_PATH} +} + +SRC_URI[md5sum] = "8955317ff4e42590c90ba6247b1caaed" +SRC_URI[sha256sum] = "0d26746eaed0be78a61dd289bb7a10721b08770bb3e807614835f490d514f2a5" + +BBCLASSEXTEND = "native" |