Inherit ptest and include tests for jsbeautifier. This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <[email protected]> --- .../python/python3-jsbeautifier/run-ptest | 3 +++ .../python/python3-jsbeautifier_2.0.3.bb | 23 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-jsbeautifier/run-ptest diff --git a/meta-python/recipes-devtools/python/python3-jsbeautifier/run-ptest b/meta-python/recipes-devtools/python/python3-jsbeautifier/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-jsbeautifier/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-python/recipes-devtools/python/python3-jsbeautifier_2.0.3.bb b/meta-python/recipes-devtools/python/python3-jsbeautifier_2.0.3.bb index 635dc69a13..05de25c3fc 100644 --- a/meta-python/recipes-devtools/python/python3-jsbeautifier_2.0.3.bb +++ b/meta-python/recipes-devtools/python/python3-jsbeautifier_2.0.3.bb @@ -4,11 +4,11 @@ LICENSE = "MIT" SECTION = "devel/python" LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" -inherit pypi setuptools3 +inherit pypi setuptools3 ptest -SRC_URI[sha256sum] = "9579d4e9dbaa00383f3efdff4c98c8140bb85ba319398e8b97cdaba27abd6ba3" +SRC_URI += "file://run-ptest" -PYPI_PACKAGE = "jsbeautifier" +SRC_URI[sha256sum] = "9579d4e9dbaa00383f3efdff4c98c8140bb85ba319398e8b97cdaba27abd6ba3" RDEPENDS:${PN} += "\ python3-core \ @@ -16,4 +16,21 @@ RDEPENDS:${PN} += "\ python3-shell \ " +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-core \ + python3-unittest \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/${PYPI_PACKAGE}/tests/* ${D}${PTEST_PATH}/tests/ + + cat > ${D}${PTEST_PATH}/pytest.ini <<EOF +[pytest] +python_files = test*.py +EOF +} + BBCLASSEXTEND = "native nativesdk" -- 2.47.3
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#128121): https://lists.openembedded.org/g/openembedded-devel/message/128121 Mute This Topic: https://lists.openembedded.org/mt/120189506/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
