python3-attrs: enable ptest

The conftest.py file is needed to define the "slots" and "frozen" fixtures
for pytest

(From OE-Core rev: c27ddbe1dcfae564e93593c90517c2b4502d1709)

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>
This commit is contained in:
Tim Orling 2024-01-05 10:14:55 -08:00 committed by Richard Purdie
parent 64a737df5f
commit d04ed37fa7
3 changed files with 21 additions and 1 deletions

View File

@ -57,6 +57,7 @@ PTESTS_FAST = "\
pango \
popt \
python3-atomicwrites \
python3-attrs \
python3-bcrypt \
python3-calver \
python3-hypothesis \

View File

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

View File

@ -5,7 +5,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5e55731824cf9205cfabeab9a0600887"
SRC_URI[sha256sum] = "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"
inherit pypi python_hatchling
inherit pypi ptest python_hatchling
SRC_URI += " \
file://run-ptest \
"
DEPENDS += " \
python3-hatch-vcs-native \
@ -18,4 +22,16 @@ RDEPENDS:${PN}+= " \
python3-crypt \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-hypothesis \
${PYTHON_PN}-pytest \
${PYTHON_PN}-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
install ${S}/conftest.py ${D}${PTEST_PATH}/
}
BBCLASSEXTEND = "native nativesdk"