python3-rarfile: Enable tests

Inherit ptest, include tests for rarfile and run the relevant
test cases.

This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Leon Anavi
2026-07-11 00:28:22 +03:00
committed by Khem Raj
parent b7904a8439
commit 86154d51da
2 changed files with 31 additions and 3 deletions
@@ -0,0 +1,13 @@
#!/bin/sh
pytest --automake \
--deselect "test/test_api.py::test_not_rar" \
--deselect "test/test_extract.py::test_readonly[test/files/rar3-readonly-unix.rar]" \
--deselect "test/test_extract.py::test_readonly[test/files/rar3-readonly-win.rar]" \
--deselect "test/test_extract.py::test_readonly[test/files/rar5-readonly-unix.rar]" \
--deselect "test/test_extract.py::test_readonly[test/files/rar5-readonly-win.rar]" \
--deselect "test/test_reading.py::test_reading[test/files/rar15-comment-lock.rar]" \
--deselect "test/test_reading.py::test_reading[test/files/rar15-comment.rar]" \
--deselect "test/test_reading.py::test_reading[test/files/rar202-comment-nopsw.rar]" \
--deselect "test/test_reading.py::test_reading[test/files/rar202-comment-psw.rar]" \
--deselect "test/test_tool.py::test_unrar_tool"
@@ -6,11 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1916695551f7eec48dfd97db9467b831"
inherit setuptools3
SRC_URI += "file://run-ptest"
SRC_URI[sha256sum] = "0d8b5a7ffb9f8e9a7b002f2398905e4420c0cb373e799b48e48f418db9c8816a"
inherit pypi
PYPI_PACKAGE = "rarfile"
inherit pypi ptest
RDEPENDS:${PN} += "\
7zip \
@@ -20,4 +20,19 @@ RDEPENDS:${PN} += "\
python3-io \
"
RDEPENDS:${PN}-ptest += " \
python3-pytest \
python3-core \
python3-datetime \
python3-crypt \
python3-compression \
python3-unittest \
python3-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/test
cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
}
BBCLASSEXTEND = "native nativesdk"