Skip to contentSkip to conversation

python3-h2: add ptest support

PATCH New Gyorgy Sarvari 1 participant 7 messages Dec 16, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 python3-h2: add ptest support

It takes around 10s to execute the suite.

Sample output:

root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-16T15:36
BEGIN: /usr/lib/python3-h2/ptest
PASS: tests/test_basic_logic.py:TestBasicClient.test_begin_connection
PASS: tests/test_basic_logic.py:TestBasicClient.test_sending_headers
PASS: tests/test_basic_logic.py:TestBasicClient.test_sending_data
[...many lines...]
PASS: tests/test_utility_functions.py:test_size_limit_dict_limit
PASS: tests/test_utility_functions.py:test_size_limit_dict_limit_init
PASS: tests/test_utility_functions.py:test_size_limit_dict_no_limit
============================================================================
Testsuite summary
DURATION: 10
END: /usr/lib/python3-h2/ptest
2025-12-16T15:36
STOP: ptest-runner
TOTAL: 1 FAIL: 0
---
 meta-python/conf/include/ptest-packagelists-meta-python.inc    | 1 +
 meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index e17d5ef46d..4cbdec70a3 100644
@@ -38,6 +38,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-gpiod \
     python3-gpt-image \
     python3-gunicorn \
+    python3-h2 \
     python3-html2text \
     python3-httptools \
     python3-inflection \
meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb +2 -1
index 11ee118831..db181dc0b4 100644
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aa3b9b4395563dd427be5f022ec321c1"
 
 SRC_URI[sha256sum] = "6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1"
 
-inherit pypi python_setuptools_build_meta
+inherit ptest-python-pytest pypi python_setuptools_build_meta
 
 RDEPENDS:${PN} += "python3-hpack python3-hyperframe"
+RDEPENDS:${PN}-ptest += "python3-hypothesis"
#1 lore raw

PATCH 2/7 python3-hpack: add ptest support

The tests need about 3s to execute.

Sample output:

root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-16T15:48
BEGIN: /usr/lib/python3-hpack/ptest
PASS: tests/test_encode_decode.py:TestIntegerEncoding.test_encoding_10_with_5_bit_prefix
PASS: tests/test_encode_decode.py:TestIntegerEncoding.test_encoding_1337_with_5_bit_prefix
PASS: tests/test_encode_decode.py:TestIntegerEncoding.test_encoding_42_with_8_bit_prefix
[...many lines...]
PASS: tests/test_table.py:TestHeaderTable.test_size
PASS: tests/test_table.py:TestHeaderTable.test_shrink_maxsize_is_zero
PASS: tests/test_table.py:TestHeaderTable.test_shrink_maxsize
============================================================================
Testsuite summary
DURATION: 3
END: /usr/lib/python3-hpack/ptest
2025-12-16T15:48
STOP: ptest-runner
TOTAL: 1 FAIL: 0
---
 .../conf/include/ptest-packagelists-meta-python.inc    |  1 +
 .../python-hpack/python3-hpack_4.1.0.bb                | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 4cbdec70a3..2a7be4f331 100644
@@ -39,6 +39,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-gpt-image \
     python3-gunicorn \
     python3-h2 \
+    python3-hpack \
     python3-html2text \
     python3-httptools \
     python3-inflection \
meta-python/recipes-connectivity/python-hpack/python3-hpack_4.1.0.bb +9 -1
index a5b9130d00..4ecbd583f3 100644
@@ -6,6 +6,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5bf1c68e73fbaec2b1687b7e71514393"
 
 SRC_URI[sha256sum] = "ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca"
 
-inherit pypi python_setuptools_build_meta
+inherit ptest-python-pytest pypi python_setuptools_build_meta
 
 RDEPENDS:${PN} += "python3-logging"
+RDEPENDS:${PN}-ptest += "python3-hypothesis"
+
+do_install_ptest:append(){
+    # One test is failing due to missing fixtures, upstream's recommended
+    # solution is to delete this file (as of v4.1.0):
+    # https://github.com/python-hyper/hpack/issues/272
+    rm -f ${D}${PTEST_PATH}/${PTEST_PYTEST_DIR}/conftest.py
+}
#2 lore raw

PATCH 3/7 python3-hyperframe: add ptest support

In reply to Gyorgy Sarvari

It takes about a second to execute. Sample output:

root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-16T15:55
BEGIN: /usr/lib/python3-hyperframe/ptest
SKIP: tests/test_external_collection.py:TestExternalCollection.test[NOTSET] # SKIP got empty parameter set for (tc_filepath)
PASS: tests/test_flags.py:TestFlags.test_add
PASS: tests/test_flags.py:TestFlags.test_remove
[...many lines...]
PASS: tests/test_frames.py:TestAltSvcFrame.test_altsvc_with_unicode_origin_fails
PASS: tests/test_frames.py:TestAltSvcFrame.test_altsvc_with_unicode_field_fails
PASS: tests/test_frames.py:TestExtensionFrame.test_repr
============================================================================
Testsuite summary
DURATION: 0
END: /usr/lib/python3-hyperframe/ptest
2025-12-16T15:55
STOP: ptest-runner
TOTAL: 1 FAIL: 0
---
 meta-python/conf/include/ptest-packagelists-meta-python.inc     | 1 +
 .../python-hyperframe/python3-hyperframe_6.1.0.bb               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 2a7be4f331..18f31a7c6f 100644
@@ -42,6 +42,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-hpack \
     python3-html2text \
     python3-httptools \
+    python3-hyperframe \
     python3-inflection \
     python3-inotify \
     python3-intervals \
meta-python/recipes-connectivity/python-hyperframe/python3-hyperframe_6.1.0.bb +1 -1
index 0d4bfcc584..0e15dd0d67 100644
@@ -6,4 +6,4 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5bf1c68e73fbaec2b1687b7e71514393"
 
 SRC_URI[sha256sum] = "f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_setuptools_build_meta ptest-python-pytest
#3 lore raw

PATCH 4/7 python3-priority: add ptest support

In reply to Gyorgy Sarvari

It takes under 5s to execute. Sample output:

qemux86-64 login: root

root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-16T16:00
BEGIN: /usr/lib/python3-priority/ptest
PASS: test/test_priority.py:TestStream.test_stream_repr
PASS: test/test_priority.py:TestStream.test_streams_are_well_ordered
PASS: test/test_priority.py:TestStream.test_stream_ordering
[...many lines...]
PASS: test/test_priority.py:TestPriorityTreeManual.test_maximum_streams_with_bad_int_is_error[-50]
PASS: test/test_priority.py:TestPriorityTreeOutput.test_period_of_repetition
PASS: test/test_priority.py:TestPriorityTreeOutput.test_priority_tree_distribution
PASS: ../../python3.13/site-packages/hypothesis/stateful.py:TestPriorityTreeStateful.runTest
============================================================================
Testsuite summary
DURATION: 4
END: /usr/lib/python3-priority/ptest
2025-12-16T16:00
STOP: ptest-runner
TOTAL: 1 FAIL: 0
---
 meta-python/conf/include/ptest-packagelists-meta-python.inc  | 1 +
 .../python-priority/python3-priority_2.0.0.bb                | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 18f31a7c6f..7bc6b6575f 100644
@@ -65,6 +65,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-portion \
     python3-precise-runner \
     python3-prettytable \
+    python3-priority \
     python3-propcache \
     python3-pyais \
     python3-pydantic \
meta-python/recipes-connectivity/python-priority/python3-priority_2.0.0.bb +4 -1
index 93b694c8b8..26620a3a39 100644
@@ -6,4 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ae57d8a09fc8b6b164d7357339619045"
 
 SRC_URI[sha256sum] = "c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0"
 
-inherit pypi setuptools3
+PTEST_PYTEST_DIR = "test"
+inherit pypi setuptools3 ptest-python-pytest
+
+RDEPENDS:${PN}-ptest += "python3-hypothesis"
#4 lore raw

PATCH 5/7 python3-pyconnman: add ptest support

In reply to Gyorgy Sarvari

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

---
 .../conf/include/ptest-packagelists-meta-python.inc    |  1 +
 .../python-pyconnman/files/run-ptest                   |  3 +++
 .../python-pyconnman/python3-pyconnman_0.2.0.bb        | 10 ++++++++--
 3 files changed, 12 insertions(+), 2 deletions(-)
 create mode 100644 meta-python/recipes-connectivity/python-pyconnman/files/run-ptest
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 7bc6b6575f..e575b372b5 100644
@@ -20,6 +20,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-cachetools \
     python3-cbor2 \
     python3-configobj \
+    python3-pyconnman \
     python3-click \
     python3-dasbus \
     python3-dominate \
meta-python/recipes-connectivity/python-pyconnman/files/run-ptest new file +3 -0
new file mode 100644
index 0000000000..aafa0f731d
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd tests
+python3 -mputao.unittest
meta-python/recipes-connectivity/python-pyconnman/python3-pyconnman_0.2.0.bb +8 -2
index 040f1acc92..52fc1dac55 100644
@@ -4,8 +4,14 @@ LICENSE = "Apache-2.0"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI[sha256sum] = "d3a63a039c82b08a1171b003eafa62c6f128aa4eaa1ce7a55a9401b48f9ad926"
+inherit pypi setuptools3 ptest
 
-inherit pypi setuptools3
+SRC_URI += "file://run-ptest"
+SRC_URI[sha256sum] = "d3a63a039c82b08a1171b003eafa62c6f128aa4eaa1ce7a55a9401b48f9ad926"
 
 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}/
+}
#5 lore raw

PATCH 6/7 python3-pyro4: drop recipe

In reply to Gyorgy Sarvari

pyro4 is not maintained anymore, and it doesn't work with Python 3.11 fully either - and sure enough, when I tried to set up ptests with Python 3.13, I got many failures.

Drop the recipe.

(There is an actively maintained successor, Pyro5 - new recipe should be somewhere next to this patch.)

---
 .../python-pyro4/python3-pyro4_4.82.bb           | 16 ----------------
 .../packagegroups/packagegroup-meta-python.bb    |  1 -
 2 files changed, 17 deletions(-)
 delete mode 100644 meta-python/recipes-connectivity/python-pyro4/python3-pyro4_4.82.bb
meta-python/recipes-connectivity/python-pyro4/python3-pyro4_4.82.bb deleted +0 -16
deleted file mode 100644
index 9f5e6d6dba..0000000000
@@ -1,16 +0,0 @@
-SUMMARY = "Python Remote Objects"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cd13dafd4eeb0802bb6efea6b4a4bdbc"
-
-SRC_URI[sha256sum] = "511f5b0804e92dd77dc33adf9c947787e3f9e9c5a96b12162f0557a7c4ce21fb"
-
-PYPI_PACKAGE = "Pyro4"
-UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
-
-inherit pypi setuptools3
-
-RDEPENDS:${PN} += " \
-    python3-logging \
-    python3-serpent \
-    python3-threading \
-    "
meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +0 -1
index d3abc0761f..37c8e868d3 100644
@@ -335,7 +335,6 @@ RDEPENDS:packagegroup-meta-python3 = "\
     python3-pyperclip \
     python3-pyperf \
     python3-pyrad \
-    python3-pyro4 \
     python3-pyroute2 \
     python3-pyrsistent \
     python3-pyscaffold \
#6 lore raw

PATCH 7/7 python3-pyro5: add recipe

In reply to Gyorgy Sarvari

Pyro enables you to build applications in which objects can talk to each other over the network, with minimal programming effort.

Successor to the python3-pyro4 package - but this supports modern Python, and still maintained (under the same umbrella that developed pyro4 also).

Ptest takes around a minute to execute. Sample output:

root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-16T17:48
BEGIN: /usr/lib/python3-pyro5/ptest
PASS: tests/test_api.py:test_api
PASS: tests/test_client.py:TestProxy.testBasics
PASS: tests/test_client.py:TestProxy.testProxyCopy
[...many lines...]
PASS: tests/test_threadpool.py:TestThreadPool.testClose
PASS: tests/test_threadpool.py:TestThreadPool.testScaling
PASS: tests/test_threadpool.py:TestThreadPoolServer.testServerPoolFull
============================================================================
Testsuite summary
# TOTAL: 415
# PASS: 410
# SKIP: 5
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
DURATION: 60
END: /usr/lib/python3-pyro5/ptest
2025-12-16T17:49
STOP: ptest-runner
TOTAL: 1 FAIL: 0
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python-pyro5/python3-pyro5_5.15.bb        | 27 +++++++++++++++++++
 .../packagegroups/packagegroup-meta-python.bb |  1 +
 3 files changed, 29 insertions(+)
 create mode 100644 meta-python/recipes-connectivity/python-pyro5/python3-pyro5_5.15.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index e575b372b5..cef905a528 100644
@@ -134,6 +134,7 @@ PTESTS_SLOW_META_PYTHON = "\
     python3-pillow \
     python3-pint \
     python3-pykickstart \
+    python3-pyro5 \
     python3-pytest-localserver \
     python3-scrypt \
     python3-traitlets \
meta-python/recipes-connectivity/python-pyro5/python3-pyro5_5.15.bb new file +27 -0
new file mode 100644
index 0000000000..eb6fab27cb
@@ -0,0 +1,27 @@
+SUMMARY = "Python Remote Objects"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c1c9ccd5f4ca5d0f5057c0e690a0153d"
+
+SRC_URI[sha256sum] = "82c3dfc9860b49f897b28ff24fe6716c841672c600af8fe40d0e3a7fac9a3f5e"
+
+PYPI_PACKAGE = "Pyro5"
+UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
+
+inherit pypi setuptools3 ptest-python-pytest
+
+RDEPENDS:${PN} += " \
+    python3-json \
+    python3-logging \
+    python3-serpent \
+    python3-threading \
+    "
+
+RDEPENDS:${PN}-ptest += " \
+    python3-html \
+    python3-misc \
+    python3-sqlite3 \
+    "
+
+do_install_ptest:append(){
+    cp -r ${S}/certs ${D}${PTEST_PATH}/
+}
meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +1 -0
index 37c8e868d3..2ff88e6264 100644
@@ -335,6 +335,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
     python3-pyperclip \
     python3-pyperf \
     python3-pyrad \
+    python3-pyro5 \
     python3-pyroute2 \
     python3-pyrsistent \
     python3-pyscaffold \