diff mbox series

[meta-python,10/10] python3-portion: update recipe to use the ptest-python-pytest class

Message ID 20250117203030.3648575-10-derek@asterius.io
State Accepted
Headers show
Series [meta-python,01/10] python3-pyroute2: update recipe to use the ptest-python-pytest class | expand

Commit Message

Derek Straka Jan. 17, 2025, 8:30 p.m. UTC
Signed-off-by: Derek Straka <derek@asterius.io>
---
 .../python/python3-portion/run-ptest            |  3 ---
 .../python/python3-portion_2.6.0.bb             | 17 +++--------------
 2 files changed, 3 insertions(+), 17 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-portion/run-ptest

Comments

Khem Raj Jan. 24, 2025, 4:16 a.m. UTC | #1
On Fri, Jan 17, 2025 at 12:30 PM Derek Straka via
lists.openembedded.org <derek=asterius.io@lists.openembedded.org>
wrote:
>
> Signed-off-by: Derek Straka <derek@asterius.io>
> ---
>  .../python/python3-portion/run-ptest            |  3 ---
>  .../python/python3-portion_2.6.0.bb             | 17 +++--------------
>  2 files changed, 3 insertions(+), 17 deletions(-)
>  delete mode 100644 meta-python/recipes-devtools/python/python3-portion/run-ptest
>
> diff --git a/meta-python/recipes-devtools/python/python3-portion/run-ptest b/meta-python/recipes-devtools/python/python3-portion/run-ptest
> deleted file mode 100644
> index 8d2017d39..000000000
> --- a/meta-python/recipes-devtools/python/python3-portion/run-ptest
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -#!/bin/sh
> -
> -pytest --automake
> diff --git a/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb b/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb
> index 31c6f0731..8bdbc032c 100644
> --- a/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb
> +++ b/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb
> @@ -5,28 +5,17 @@ SECTION = "devel/python"
>  LICENSE = "LGPL-3.0-only"
>  LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000208d539ec061b899bce1d9ce9404"
>
> -inherit pypi python_setuptools_build_meta ptest
> +inherit pypi python_setuptools_build_meta ptest-python-pytest
>
>  SRC_URI[sha256sum] = "6fb538b57a92058f0edd360667694448aa3fc028ab97e41e3091359d14ba4dd5"
>
> -SRC_URI += " \
> -       file://run-ptest \
> -"
> -
>  RDEPENDS:${PN} += "\
>         python3-sortedcontainers \
>  "
>
> -RDEPENDS:${PN}-ptest += " \
> -       python3-pytest \
> -       python3-unittest-automake-output \
> -"
> -
> -do_install_ptest() {
> -       install -d ${D}${PTEST_PATH}/tests
> +do_install_ptest:append () {
>         # This file tests README.md and deleted as redundant.
> -       rm -f ${S}/tests/test_doc.py
> -       cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
> +       rm -f ${D}/tests/test_doc.py
>  }
>

It causes a ptest failure.

Failed ptests:
{'python3-portion': ['tests/test_doc.py:test_readme']}

I think removing test_doc.py needs to be fixed to work as it was, or
perhaps package README.md so it can pass.

>  BBCLASSEXTEND = "native"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#114943): https://lists.openembedded.org/g/openembedded-devel/message/114943
> Mute This Topic: https://lists.openembedded.org/mt/110673713/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-portion/run-ptest b/meta-python/recipes-devtools/python/python3-portion/run-ptest
deleted file mode 100644
index 8d2017d39..000000000
--- a/meta-python/recipes-devtools/python/python3-portion/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@ 
-#!/bin/sh
-
-pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb b/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb
index 31c6f0731..8bdbc032c 100644
--- a/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb
+++ b/meta-python/recipes-devtools/python/python3-portion_2.6.0.bb
@@ -5,28 +5,17 @@  SECTION = "devel/python"
 LICENSE = "LGPL-3.0-only"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3000208d539ec061b899bce1d9ce9404"
 
-inherit pypi python_setuptools_build_meta ptest
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 SRC_URI[sha256sum] = "6fb538b57a92058f0edd360667694448aa3fc028ab97e41e3091359d14ba4dd5"
 
-SRC_URI += " \
-	file://run-ptest \
-"
-
 RDEPENDS:${PN} += "\
 	python3-sortedcontainers \
 "
 
-RDEPENDS:${PN}-ptest += " \
-	python3-pytest \
-	python3-unittest-automake-output \
-"
-
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/tests
+do_install_ptest:append () {
 	# This file tests README.md and deleted as redundant.
-	rm -f ${S}/tests/test_doc.py
-	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	rm -f ${D}/tests/test_doc.py
 }
 
 BBCLASSEXTEND = "native"