From 6eacd028544602fcb4f458c72c317cd815106b33 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Sat, 25 Oct 2025 22:36:59 +0200 Subject: python3-pyasyncore: fix ptests The tests are using only Python's unittest module, not pytest - so adapt the run-ptest script to invoke unittest instead pytest. Signed-off-by: Gyorgy Sarvari Signed-off-by: Khem Raj --- meta-python/recipes-devtools/python/python3-pyasyncore/run-ptest | 9 +++++++++ meta-python/recipes-devtools/python/python3-pyasyncore_1.0.4.bb | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-pyasyncore/run-ptest (limited to 'meta-python/recipes-devtools/python') diff --git a/meta-python/recipes-devtools/python/python3-pyasyncore/run-ptest b/meta-python/recipes-devtools/python/python3-pyasyncore/run-ptest new file mode 100644 index 0000000000..52f069c3b9 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pyasyncore/run-ptest @@ -0,0 +1,9 @@ +#!/bin/sh + +cd $(dirname $0)/tests + +# Failing cases are not transformed, only passing and skipped ones. +# Unitttest will output a summary at the end for each failing testcase, +# starting each line with "FAIL: " followed by the testcase name. + +python3 -m unittest -v 2>&1 | sed -e 's/\(test_[^ ]*\).*ok$/PASS: \1/' -e 's/\(test_[^ ]*\).*skipped.*/SKIP: \1/' diff --git a/meta-python/recipes-devtools/python/python3-pyasyncore_1.0.4.bb b/meta-python/recipes-devtools/python/python3-pyasyncore_1.0.4.bb index 47906cea0b..ecd24c95cf 100644 --- a/meta-python/recipes-devtools/python/python3-pyasyncore_1.0.4.bb +++ b/meta-python/recipes-devtools/python/python3-pyasyncore_1.0.4.bb @@ -3,11 +3,16 @@ HOMEPAGE = "https://github.com/simonrob/pyasyncore" LICENSE = "Python-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=d5605fc335ce1bab614032468d0a1e00" -inherit pypi setuptools3 ptest-python-pytest +inherit pypi setuptools3 ptest +SRC_URI += "file://run-ptest" SRC_URI[sha256sum] = "2c7a8b9b750ba6260f1e5a061456d61320a80579c6a43d42183417da89c7d5d6" RDEPENDS:${PN} += "python3-core python3-io" RDEPENDS:${PN}-ptest += "python3-tests" +do_install_ptest:append(){ + cp -r ${S}/tests ${D}${PTEST_PATH} +} + BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf