python3-pyconnman: add ptest support

It takes about a second to execute. Sample output:

root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-16T16:32
BEGIN: /usr/lib/python3-pyconnman/ptest
PASS: test_agent.AgentTest.test_simple_wifi_agent
PASS: test_manager.ConnManagerTest.test_agent_registration
dbus.Dictionary({dbus.String('State'): dbus.String('online...
[SNIP... debug log... SNIP]
dbus.Dictionary({dbus.String('Connected'): dbus.Boolean(...
=========================================================
PASS: test_technology.ConnTechnologyTest.test_scan

============================================================================
Testsuite summary
DURATION: 0
END: /usr/lib/python3-pyconnman/ptest
2025-12-16T16:32
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Gyorgy Sarvari 2025-12-16 18:58:38 +01:00 committed by Khem Raj
parent 8fc1b929d8
commit 069f1827d0
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 12 additions and 2 deletions

View File

@ -20,6 +20,7 @@ PTESTS_FAST_META_PYTHON = "\
python3-cachetools \ python3-cachetools \
python3-cbor2 \ python3-cbor2 \
python3-configobj \ python3-configobj \
python3-pyconnman \
python3-click \ python3-click \
python3-dasbus \ python3-dasbus \
python3-dominate \ python3-dominate \

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd tests
python3 -mputao.unittest

View File

@ -4,8 +4,14 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
inherit pypi setuptools3 ptest
SRC_URI += "file://run-ptest"
SRC_URI[sha256sum] = "d3a63a039c82b08a1171b003eafa62c6f128aa4eaa1ce7a55a9401b48f9ad926" SRC_URI[sha256sum] = "d3a63a039c82b08a1171b003eafa62c6f128aa4eaa1ce7a55a9401b48f9ad926"
inherit pypi setuptools3
RDEPENDS:${PN} = "connman python3-dbus python3-pprint python3-future" RDEPENDS:${PN} = "connman python3-dbus python3-pprint python3-future"
RDEPENDS:${PN}-ptest += "python3-mock python3-unittest-automake-output"
do_install_ptest(){
cp -r ${S}/tests ${D}${PTEST_PATH}/
}