diff mbox series

[meta-python,04/16] python3-orjson: skip OOM-prone/unrelated tests on memory-constrained target

Message ID 20260829001108.559544-4-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-python,01/16] python3-bleak: fetch git tag with tests/ for ptest instead of PyPI sdist | expand

Commit Message

Khem Raj Aug. 29, 2026, 12:10 a.m. UTC
From: Khem Raj <raj.khem@gmail.com>

test_dict_empty round-trips a 4096x4096 nested structure through JSON,
materializing ~16.7M real dict objects on loads() (~900MB+ RSS), which
gets OOM-killed on the memory-constrained qemu ptest target.

test_fake.py instantiates Faker with 9 locales at once, pulling in a
similarly large amount of locale provider data, for what is a
Unicode-robustness smoke test rather than core JSON logic.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-devtools/python/python3-orjson_3.11.9.bb     | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-orjson_3.11.9.bb b/meta-python/recipes-devtools/python/python3-orjson_3.11.9.bb
index 2e9392fab9..1b49a76b9f 100644
--- a/meta-python/recipes-devtools/python/python3-orjson_3.11.9.bb
+++ b/meta-python/recipes-devtools/python/python3-orjson_3.11.9.bb
@@ -29,6 +29,15 @@  do_install_ptest:append() {
     cp -rf ${S}/data/* ${D}${PTEST_PATH}/data/
     install -d ${D}${PTEST_PATH}/test
     cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
+    # test_dict_empty round-trips a 4096x4096 nested structure through JSON,
+    # materializing ~16.7M real dict objects on loads() (~900MB+ RSS) which
+    # gets OOM-killed on the memory-constrained qemu ptest target.
+    # test_fake.py instantiates Faker with 9 locales at once, pulling in a
+    # similarly large amount of locale provider data, for what is a
+    # Unicode-robustness smoke test rather than core JSON logic.
+    sed -i \
+        -e "/--automake/ s/$/ --ignore=test\/test_fake.py -k 'not test_dict_empty'/" \
+        ${D}${PTEST_PATH}/run-ptest
 }
 
 RDEPENDS:${PN}-ptest += "\