]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3-pyyaml: enable ptest
authorTim Orling <ticotimo@gmail.com>
Fri, 9 Feb 2024 02:18:59 +0000 (18:18 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 10 Feb 2024 14:12:54 +0000 (14:12 +0000)
Upstream is in the process of migrating testing to pytest, backport
test_dump_load.py (the legacy_tests were throwing Errors and Failures).
We don't really need to run upstream's test suite, but we do need to verify
that our runtime is functional.

https://github.com/yaml/pyyaml/commit/a98fd6088e81d7aca571220c966bbfe2ac43c335

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-devtools/python/python3-pyyaml/run-ptest [new file with mode: 0644]
meta/recipes-devtools/python/python3-pyyaml_6.0.1.bb

index b590640edc2213e323babc7de650c6548b30549c..0192146dbd09eaab307f0ff0f28921e82aa8da80 100644 (file)
@@ -69,6 +69,7 @@ PTESTS_FAST = "\
     python3-pluggy \
     python3-pyasn1 \
     python3-pytz \
+    python3-pyyaml \
     python3-trove-classifiers \
     python3-wcwidth \
     python3-webcolors \
diff --git a/meta/recipes-devtools/python/python3-pyyaml/run-ptest b/meta/recipes-devtools/python/python3-pyyaml/run-ptest
new file mode 100644 (file)
index 0000000..8d2017d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
index 102e2f2498b2bd697abf73e87199b4e13106b164..62be059df524dfd08b70105fd9d57b83814d8aba 100644 (file)
@@ -20,4 +20,21 @@ RDEPENDS:${PN} += "\
     ${PYTHON_PN}-netclient \
 "
 
+inherit ptest
+SRC_URI += "\
+    https://raw.githubusercontent.com/yaml/pyyaml/a98fd6088e81d7aca571220c966bbfe2ac43c335/tests/test_dump_load.py;name=test \
+    file://run-ptest \
+"
+SRC_URI[test.sha256sum] = "b6a8a2825d89fdc8aee226560f66b8196e872012a0ea7118cbef1a832359434a"
+
+RDEPENDS:${PN}-ptest += " \
+       ${PYTHON_PN}-pytest \
+       ${PYTHON_PN}-unittest-automake-output \
+"
+
+do_install_ptest() {
+       install -d ${D}${PTEST_PATH}/tests
+       cp -rf ${WORKDIR}/test_dump_load.py ${D}${PTEST_PATH}/tests/
+}
+
 BBCLASSEXTEND = "native nativesdk"