]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
pythonn3-rpds-py: enable ptest
authorTim Orling <tim.orling@konsulko.com>
Fri, 24 May 2024 02:51:40 +0000 (19:51 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 May 2024 08:38:20 +0000 (09:38 +0100)
* Add RDEPENDS for ptest from tests/requirements.txt
* Tests take ~14 seconds, so add to PTEST_FAST

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-devtools/python/python3-rpds-py/run-ptest [new file with mode: 0644]
meta/recipes-devtools/python/python3-rpds-py_0.18.1.bb

index 5975db25ccca3bf0a4d65076e64fa951cd882794..da6fa6ee9723330311b95a5666028a2194ec40a0 100644 (file)
@@ -69,6 +69,7 @@ PTESTS_FAST = "\
     python3-pyasn1 \
     python3-pytz \
     python3-pyyaml \
+    python3-rpds-py \
     python3-trove-classifiers \
     python3-wcwidth \
     python3-webcolors \
diff --git a/meta/recipes-devtools/python/python3-rpds-py/run-ptest b/meta/recipes-devtools/python/python3-rpds-py/run-ptest
new file mode 100644 (file)
index 0000000..8d2017d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
index c6e88d88d7650eacde14aca24760b2b75c1f421f..f46df1115c803d21cf0144b6efb4e220e801de4b 100644 (file)
@@ -4,12 +4,27 @@ HOMEPAGE = "https://pypi.org/project/rpds-py/"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=7767fa537c4596c54141f32882c4a984"
 
+SRC_URI += "file://run-ptest"
+
 SRC_URI[sha256sum] = "dc48b479d540770c811fbd1eb9ba2bb66951863e448efec2e2c102625328e92f"
 
 require ${BPN}-crates.inc
 
-inherit pypi cargo-update-recipe-crates python_maturin
+inherit pypi cargo-update-recipe-crates python_maturin ptest
 
 PYPI_PACKAGE = "rpds_py"
 
+RDEPENDS:${PN}-ptest += " \
+    python3-iniconfig \
+    python3-packaging \
+    python3-pluggy \
+    python3-pytest \
+    python3-unittest-automake-output \
+    "
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
 BBCLASSEXTEND = "native nativesdk"