Skip to contentSkip to conversation

python3-semver: update recipe to use the ptest-python-pytest class

PATCH New Derek Straka 1 participant 10 messages Jan 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 python3-semver: update recipe to use the ptest-python-pytest class

---
 .../python/python3-semver/run-ptest                |  3 ---
 .../python/python3-semver_3.0.2.bb                 | 14 +-------------
 2 files changed, 1 insertion(+), 16 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-semver/run-ptest
meta-python/recipes-devtools/python/python3-semver/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-semver_3.0.2.bb +1 -13
index 25222bb5f..b329d65e1 100644
@@ -6,21 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d9da679db3bdce30a1b4328d5c474f98"
 
 SRC_URI[sha256sum] = "6253adb39c70f6e51afed2fa7152bcd414c411286088fb4b9effb133885ab4cc"
 
-inherit pypi python_setuptools_build_meta ptest
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += " \
-        file://run-ptest \
-"
-
 DEPENDS += " python3-setuptools-scm-native"
 
-RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
-"
-
-do_install_ptest() {
-        cp -rf ${S}/tests ${D}${PTEST_PATH}/
-}
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/10 python3-scrypt: update recipe to use the ptest-python-pytest class

---
 .../python/python3-scrypt/run-ptest                 |  3 ---
 .../python/python3-scrypt_0.8.27.bb                 | 13 ++-----------
 2 files changed, 2 insertions(+), 14 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-scrypt/run-ptest
meta-python/recipes-devtools/python/python3-scrypt/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-scrypt_0.8.27.bb +2 -11
index a3254de07..02f1da8f5 100644
@@ -7,22 +7,13 @@ SRC_URI += "file://0001-py-scrypt-remove-the-hard-coded-include-paths.patch"
 
 SRC_URI[sha256sum] = "a7b637848ed518c1ea2b31a9ecaaa3f49616598d8442de8706cf1f01fbabf0a7"
 
-inherit pypi ptest setuptools3 dos2unix
-
-SRC_URI += " \
-    file://run-ptest \
-"
-
-RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
-"
+inherit pypi ptest-python-pytest setuptools3 dos2unix
 
 RDEPENDS:${PN} += " \
     python3-ctypes \
 "
 
-do_install_ptest() {
+do_install_ptest:append() {
     install -d ${D}${PTEST_PATH}/tests
     cp -rf ${S}/scrypt/tests/* ${D}${PTEST_PATH}/tests/
 }
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/10 python3-requests-toolbelt: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-requests-toolbelt/run-ptest            | 3 ---
 .../python/python3-requests-toolbelt_1.0.0.bb             | 8 +++-----
 2 files changed, 3 insertions(+), 8 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-requests-toolbelt/run-ptest
meta-python/recipes-devtools/python/python3-requests-toolbelt/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-requests-toolbelt_1.0.0.bb +3 -5
index 9cbe4927a..8956dee1f 100644
@@ -4,14 +4,14 @@ HOMEPAGE = "https://toolbelt.readthedocs.org"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=6f14302a4b4099009ab38b4dde5f1075"
 
-SRC_URI = "file://run-ptest \
+SRC_URI = " \
 	   file://090856f4159c40a2927fb88546419f2e1697ad5f.patch \
 	   file://720240501dca0b4eacc3295665d7ced8719e11d2.patch \
           "
 
 SRC_URI[sha256sum] = "7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"
 
-inherit pypi setuptools3 ptest
+inherit pypi setuptools3 ptest-python-pytest
 
 RDEPENDS:${PN} += " \
     python3-requests (>=2.0.1) \
@@ -21,12 +21,10 @@ RDEPENDS:${PN}-ptest += " \
     python3-betamax \
     python3-mock \
     python3-multiprocessing \
-    python3-pytest \
     python3-trustme \
-    python3-unittest-automake-output \
 "
 
-do_install_ptest() {
+do_install_ptest:append() {
 	install -d ${D}${PTEST_PATH}/tests
 	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
 	cp -rf ${S}/setup.py ${D}${PTEST_PATH}
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/10 python3-requests-file: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-requests-file/run-ptest       |  3 ---
 .../python/python3-requests-file_2.1.0.bb        | 16 +---------------
 2 files changed, 1 insertion(+), 18 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-requests-file/run-ptest
meta-python/recipes-devtools/python/python3-requests-file/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-requests-file_2.1.0.bb +1 -15
index 670a36a64..6e20a10f4 100644
@@ -8,24 +8,10 @@ SRC_URI[sha256sum] = "0f549a3f3b0699415ac04d167e9cb39bccfb730cb832b4d20be3d98673
 PYPI_PACKAGE = "requests_file"
 UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
 
-inherit pypi python_setuptools_build_meta ptest
-
-SRC_URI += " \
-        file://run-ptest \
-"
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 DEPENDS += "python3-setuptools-scm-native"
 
-RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
-"
-
-do_install_ptest() {
-        install -d ${D}${PTEST_PATH}/tests
-        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-}
-
 RDEPENDS:${PN} += " \
     python3-requests \
 "
Signature · 1 line
2.34.1
#4 lore raw

PATCH 5/10 python3-rapidjson: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-rapidjson/run-ptest             |  3 ---
 .../python/python3-rapidjson_1.19.bb               | 14 +-------------
 2 files changed, 1 insertion(+), 16 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-rapidjson/run-ptest
meta-python/recipes-devtools/python/python3-rapidjson/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb +1 -13
index bfc05a735..5c47e0691 100644
@@ -7,25 +7,18 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=6fe0b2465366662d7cfa6793ccbab563"
 SRC_URI[sha256sum] = "81e7260f6297cad564389b700783c0a33de71310b9eb01fd013faec5e7ed4eff"
 
 # Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe
-inherit setuptools3 pypi ptest
+inherit setuptools3 pypi ptest-python-pytest
 
 PYPI_PACKAGE = "python-rapidjson"
 
 SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}"
 
-# run-ptest is a shell script that starts the test suite
-SRC_URI += " \
-    file://run-ptest \
-"
-
 DEPENDS += " \
     rapidjson \
 "
 
 # Adding required python package for the ptest (pytest and pytest->automake report translation)
 RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
     python3-pytz \
 "
 
@@ -33,8 +26,3 @@ RDEPENDS:${PN} += " \
     python3-core \
 "
 
-# Installing the test suite on the target
-do_install_ptest() {
-    install -d ${D}${PTEST_PATH}/tests
-    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-}
Signature · 1 line
2.34.1
#5 lore raw

PATCH 6/10 python3-pyyaml-include: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-pyyaml-include/run-ptest            |  3 ---
 .../python/python3-pyyaml-include_2.2.bb               | 10 +---------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100755 meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest
meta-python/recipes-devtools/python/python3-pyyaml-include/run-ptest deleted +0 -3
deleted file mode 100755
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-pyyaml-include_2.2.bb +1 -9
index a93a2391d..49e643c71 100644
@@ -7,17 +7,11 @@ SRCREV = "c5be2b7dfc4aaa91e44dbeb6fa42adc80936ef9d"
 
 SRC_URI = " \
             git://github.com/tanbro/pyyaml-include;protocol=https;branch=main \
-            file://run-ptest \
           "
 
 S = "${WORKDIR}/git"
 
-inherit python_setuptools_build_meta ptest
-
-do_install_ptest() {
-    install -d ${D}${PTEST_PATH}/tests
-    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-}
+inherit python_setuptools_build_meta ptest-python-pytest
 
 RDEPENDS:${PN} += " \
     python3-pyyaml \
@@ -27,7 +21,5 @@ RDEPENDS:${PN}-ptest += " \
     python3-fsspec \
     python3-aiohttp \
     python3-requests \
-    python3-pytest \
-    python3-unittest-automake-output \
 "
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.34.1
#6 lore raw

PATCH 7/10 python3-pytoml: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-pytoml/run-ptest             |  3 ---
 .../python/python3-pytoml_0.1.21.bb             | 17 +++--------------
 2 files changed, 3 insertions(+), 17 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-pytoml/run-ptest
meta-python/recipes-devtools/python/python3-pytoml/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-pytoml_0.1.21.bb +3 -14
index 49390df83..15dc2f2c4 100644
@@ -6,25 +6,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cfff423699bdaef24331933ac4f56078"
 
 SRC_URI[sha256sum] = "8eecf7c8d0adcff3b375b09fe403407aa9b645c499e5ab8cac670ac4a35f61e7"
 
-inherit pypi setuptools3 ptest
+inherit pypi setuptools3 ptest-python-pytest
 
-BBCLASSEXTEND = "native nativesdk"
+PTEST_PYTEST_DIR = "test"
 
-SRC_URI += " \
-	file://run-ptest \
-"
+BBCLASSEXTEND = "native nativesdk"
 
 RDEPENDS:${PN} += " \
     python3-datetime \
     python3-stringold \
     "
 
-RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
-"
-
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/test
-	cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
-}
Signature · 1 line
2.34.1
#7 lore raw

PATCH 8/10 python3-python-multipart: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-python-multipart/run-ptest        |  3 ---
 .../python/python3-python-multipart_0.0.20.bb        | 12 +-----------
 2 files changed, 1 insertion(+), 14 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-python-multipart/run-ptest
meta-python/recipes-devtools/python/python3-python-multipart/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-python-multipart_0.0.20.bb +1 -11
index db5e7bb45..71f9674ec 100644
@@ -4,22 +4,12 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3d98f0d58b28321924a89ab60c82410e"
 
 SRC_URI[sha256sum] = "8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13"
 
-inherit pypi python_hatchling ptest
+inherit pypi python_hatchling ptest-python-pytest
 
 PYPI_PACKAGE = "python_multipart"
 UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
 
-SRC_URI += " \
-	file://run-ptest \
-"
-
 RDEPENDS:${PN}-ptest += " \
-	python3-pytest \
 	python3-pyyaml \
-	python3-unittest-automake-output \
 "
 
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/tests
-	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-}
Signature · 1 line
2.34.1
#8 lore raw

PATCH 9/10 python3-pytest-localserver: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-pytest-localserver/run-ptest     |  3 ---
 .../python/python3-pytest-localserver_0.8.1.bb      | 13 +------------
 2 files changed, 1 insertion(+), 15 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-pytest-localserver/run-ptest
meta-python/recipes-devtools/python/python3-pytest-localserver/run-ptest deleted +0 -3
deleted file mode 100644
index 8d2017d39..000000000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-pytest --automake
meta-python/recipes-devtools/python/python3-pytest-localserver_0.8.1.bb +1 -12
index 669817829..e9500bd3d 100644
@@ -5,25 +5,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b8da7a541d738b054dcbf70c31530432"
 
 DEPENDS += "python3-setuptools-scm-native"
 
-inherit pypi python_setuptools_build_meta ptest
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 SRC_URI[sha256sum] = "66569c34fef31a5750b16effd1cd1288a7a90b59155d005e7f916accd3dee4f1"
 
-SRC_URI += " \
-        file://run-ptest \
-"
-
 RDEPENDS:${PN}-ptest += " \
-	python3-pytest \
 	python3-requests \
-	python3-unittest-automake-output \
 "
 
-do_install_ptest() {
-        install -d ${D}${PTEST_PATH}/tests
-        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
-}
-
 RDEPENDS:${PN} += " \
 	python3-werkzeug \
 "
Signature · 1 line
2.34.1
#9 lore raw

PATCH 10/10 python3-pyserial: update recipe to use the ptest-python-pytest class

In reply to Derek Straka
---
 .../python/python3-pyserial/run-ptest           |  4 ----
 .../python/python3-pyserial_3.5.bb              | 17 +++--------------
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-pyserial/run-ptest
meta-python/recipes-devtools/python/python3-pyserial/run-ptest deleted +0 -4
deleted file mode 100644
index b651411db..000000000
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-
-pytest --automake
meta-python/recipes-devtools/python/python3-pyserial_3.5.bb +3 -14
index ade137a38..93a81568c 100644
@@ -4,7 +4,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=520e45e59fc2cf94aa53850f46b86436"
 
 SRC_URI[sha256sum] = "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb"
 
-inherit pypi setuptools3 ptest
+inherit pypi setuptools3 ptest-python-pytest
+
+PTEST_PYTEST_DIR = "test"
 
 do_install:append() {
     rm -f ${D}${bindir}/pyserial-miniterm
@@ -49,16 +51,3 @@ RDEPENDS:${PN} = "\
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += " \
-	file://run-ptest \
-"
-
-RDEPENDS:${PN}-ptest += " \
-    python3-pytest \
-    python3-unittest-automake-output \
-"
-
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/test
-	cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
-}
Signature · 1 line
2.34.1