python3-pyyaml: enable ptest

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.

a98fd6088e

(From OE-Core rev: b0fdf0688109ba6b87840a0837bebee3d9a27089)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Tim Orling 2024-02-08 18:18:59 -08:00 committed by Richard Purdie
parent 21be9d1a4b
commit 38657590e7
3 changed files with 21 additions and 0 deletions

View File

@ -69,6 +69,7 @@ PTESTS_FAST = "\
python3-pluggy \
python3-pyasn1 \
python3-pytz \
python3-pyyaml \
python3-trove-classifiers \
python3-wcwidth \
python3-webcolors \

View File

@ -0,0 +1,3 @@
#!/bin/sh
pytest --automake

View 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"