summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-10-25 22:36:59 +0200
committerKhem Raj <raj.khem@gmail.com>2025-10-25 14:20:38 -0700
commit6eacd028544602fcb4f458c72c317cd815106b33 (patch)
tree1a1abcc62c0ac1a0d27a9ba794705c3b1b37bef7 /meta-python
parent8fa97bdc1fda46a3bed78c034fae73f24dbbb77f (diff)
downloadmeta-openembedded-6eacd028544602fcb4f458c72c317cd815106b33.tar.gz
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 <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/conf/include/ptest-packagelists-meta-python.inc2
-rw-r--r--meta-python/recipes-devtools/python/python3-pyasyncore/run-ptest9
-rw-r--r--meta-python/recipes-devtools/python/python3-pyasyncore_1.0.4.bb7
3 files changed, 16 insertions, 2 deletions
diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 0f56c3e300..f0411f269f 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -69,6 +69,7 @@ PTESTS_FAST_META_PYTHON = "\
69 python3-ptyprocess \ 69 python3-ptyprocess \
70 python3-py-cpuinfo \ 70 python3-py-cpuinfo \
71 python3-pyasn1-modules \ 71 python3-pyasn1-modules \
72 python3-pyasyncore \
72 python3-pyroute2 \ 73 python3-pyroute2 \
73 python3-pyserial \ 74 python3-pyserial \
74 python3-pytest-mock \ 75 python3-pytest-mock \
@@ -128,5 +129,4 @@ PTESTS_SLOW_META_PYTHON = "\
128" 129"
129 130
130PTESTS_PROBLEMS_META_PYTHON = "\ 131PTESTS_PROBLEMS_META_PYTHON = "\
131 python3-pyasyncore \
132" 132"
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 @@
1#!/bin/sh
2
3cd $(dirname $0)/tests
4
5# Failing cases are not transformed, only passing and skipped ones.
6# Unitttest will output a summary at the end for each failing testcase,
7# starting each line with "FAIL: " followed by the testcase name.
8
9python3 -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"
3LICENSE = "Python-2.0" 3LICENSE = "Python-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=d5605fc335ce1bab614032468d0a1e00" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=d5605fc335ce1bab614032468d0a1e00"
5 5
6inherit pypi setuptools3 ptest-python-pytest 6inherit pypi setuptools3 ptest
7SRC_URI += "file://run-ptest"
7 8
8SRC_URI[sha256sum] = "2c7a8b9b750ba6260f1e5a061456d61320a80579c6a43d42183417da89c7d5d6" 9SRC_URI[sha256sum] = "2c7a8b9b750ba6260f1e5a061456d61320a80579c6a43d42183417da89c7d5d6"
9 10
10RDEPENDS:${PN} += "python3-core python3-io" 11RDEPENDS:${PN} += "python3-core python3-io"
11RDEPENDS:${PN}-ptest += "python3-tests" 12RDEPENDS:${PN}-ptest += "python3-tests"
12 13
14do_install_ptest:append(){
15 cp -r ${S}/tests ${D}${PTEST_PATH}
16}
17
13BBCLASSEXTEND = "native nativesdk" 18BBCLASSEXTEND = "native nativesdk"