python3-outcome: enable ptest

- Tested on qemux86-64 and qemuarm64

- Added ptest into PTESTS_FAST_META_PYTHON

- The PyPi package name defaults to PN without the python3- prefix, so there is no need to set PYPI_PACKAGE as outcome, it is by default.

Ptest result:
=============

qemux86-64:

Testsuite summary
TOTAL: 10
PASS: 10
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 7
END: /usr/lib/python3-outcome/ptest
2024-10-11T09:27
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 10
PASS: 10
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 6
END: /usr/lib/python3-outcome/ptest
2024-10-11T09:24
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: alperak <alperyasinak1@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
alperak 2024-10-11 16:04:39 +03:00 committed by Khem Raj
parent e3815d18dd
commit 9cbe55d465
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 26 additions and 4 deletions

View File

@ -42,6 +42,7 @@ PTESTS_FAST_META_PYTHON = "\
python3-multidict \
python3-netaddr \
python3-ordered-set \
python3-outcome \
python3-parse \
python3-parse-type \
python3-platformdirs \

View File

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

View File

@ -7,10 +7,28 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fa7b86389e58dd4087a8d2b833e5fe96 \
SRC_URI[sha256sum] = "9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8"
inherit pypi setuptools3
inherit pypi setuptools3 ptest
RDEPENDS:${PN} += "python3-attrs"
SRC_URI += " \
file://run-ptest \
"
RDEPENDS:${PN} += "python3-asyncio python3-core python3-pytest python3-typing-extensions"
RDEPENDS:${PN}-ptest += " \
python3-pytest \
python3-pytest-asyncio \
python3-unittest-automake-output \
python3-outcome \
"
PYPI_PACKAGE = "outcome"
RDEPENDS:${PN} += " \
python3-asyncio \
python3-attrs \
python3-core \
python3-pytest \
python3-typing-extensions \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
}