diff mbox series

[v2,2/2] python3-hypothesis: Update to use the new ptest-python-pytest class

Message ID 20250418013404.869-2-leimaohui@fujitsu.com
State New
Headers show
Series [v2,1/2] python3-hypothesis: upgrade 6.129.2 -> 6.131.0 | expand

Commit Message

Maohui Lei (Fujitsu) April 18, 2025, 1:34 a.m. UTC
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
---
 .../python/python3-hypothesis/run-ptest          | 10 ----------
 .../python/python3-hypothesis_6.131.0.bb         | 16 ++++++----------
 2 files changed, 6 insertions(+), 20 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python3-hypothesis/run-ptest
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-hypothesis/run-ptest b/meta/recipes-devtools/python/python3-hypothesis/run-ptest
deleted file mode 100644
index 54f6e7930f..0000000000
--- a/meta/recipes-devtools/python/python3-hypothesis/run-ptest
+++ /dev/null
@@ -1,10 +0,0 @@ 
-#!/bin/sh
-
-# Upstream "fast" tests take about 5 minutes and currently do not run cleanly
-# (tests/cover and tests/pytest)
-# https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/tests
-# https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-python/scripts/basic-test.sh#L18
-#
-# Instead we run two test suites imported from examples/
-
-pytest --automake
diff --git a/meta/recipes-devtools/python/python3-hypothesis_6.131.0.bb b/meta/recipes-devtools/python/python3-hypothesis_6.131.0.bb
index 0542a9d188..d7656dc1d8 100644
--- a/meta/recipes-devtools/python/python3-hypothesis_6.131.0.bb
+++ b/meta/recipes-devtools/python/python3-hypothesis_6.131.0.bb
@@ -4,11 +4,11 @@  LICENSE = "MPL-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c"
 
 PYPI_PACKAGE = "hypothesis"
+PTEST_PYTEST_DIR ?= "examples"
 
-inherit pypi python_setuptools_build_meta ptest
+inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 SRC_URI += " \
-    file://run-ptest \
     file://test_binary_search.py \
     file://test_rle.py \
     "
@@ -27,14 +27,10 @@  RDEPENDS:${PN} += " \
     python3-zoneinfo \
     "
 
-RDEPENDS:${PN}-ptest += " \
-    python3-unittest-automake-output \
-    "
-
-do_install_ptest() {
-    install -d ${D}${PTEST_PATH}/examples
-    install -m 0755 ${UNPACKDIR}/test_binary_search.py ${D}${PTEST_PATH}/examples/
-    install -m 0755 ${UNPACKDIR}/test_rle.py ${D}${PTEST_PATH}/examples/
+do_install_ptest:append() {
+    install -d ${D}${PTEST_PATH}/${PTEST_PYTEST_DIR}
+    install -m 0755 ${UNPACKDIR}/test_binary_search.py ${D}${PTEST_PATH}/${PTEST_PYTEST_DIR}/
+    install -m 0755 ${UNPACKDIR}/test_rle.py ${D}${PTEST_PATH}/${PTEST_PYTEST_DIR}/
 }
 
 BBCLASSEXTEND = "native nativesdk"