summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorZheng Qiu <zheng.qiu@windriver.com>2022-11-28 10:44:57 -0500
committerKhem Raj <raj.khem@gmail.com>2022-11-29 14:07:51 -0800
commit4091a12ef94a5ede27d4c303d0eb2741499bb00f (patch)
tree091290208162da10c577ae284a26b6beaf1f1ad5 /meta-python
parentf5cc539e40ef55f92258153135b337adf045e4a3 (diff)
downloadmeta-openembedded-4091a12ef94a5ede27d4c303d0eb2741499bb00f.tar.gz
python3-inotify: add ptest
Add ptest provided from the source code, and run it using pytest. Since the tarball provided with pypi does not include ptest, switch the source to be its git repo. ptest result: PASS FAIL SKIP qemux86-64 5 3 1 qemuarm64 5 3 1 This issue exists since inotify adds unit test support, and it is reported here: https://github.com/dsoprea/PyInotify/issues/95 Signed-off-by: Zheng Qiu <zheng.qiu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-inotify/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-inotify_0.2.10.bb14
-rw-r--r--meta-python/recipes-devtools/python/python3-inotify_git.bb35
3 files changed, 38 insertions, 14 deletions
diff --git a/meta-python/recipes-devtools/python/python3-inotify/run-ptest b/meta-python/recipes-devtools/python/python3-inotify/run-ptest
new file mode 100644
index 000000000..3385d6893
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-inotify/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
diff --git a/meta-python/recipes-devtools/python/python3-inotify_0.2.10.bb b/meta-python/recipes-devtools/python/python3-inotify_0.2.10.bb
deleted file mode 100644
index 524c3a0d2..000000000
--- a/meta-python/recipes-devtools/python/python3-inotify_0.2.10.bb
+++ /dev/null
@@ -1,14 +0,0 @@
1SUMMARY = "An adapter to Linux kernel support for inotify directory-watching."
2AUTHOR = "Dustin Oprea"
3HOMEPAGE = "https://pypi.org/project/inotify/"
4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://setup.py;md5=79b7ec72aa0d446a552d3cceb5799e41;beginline=28;endline=28"
6
7SRC_URI[sha256sum] = "974a623a338482b62e16d4eb705fb863ed33ec178680fc3e96ccdf0df6c02a07"
8
9inherit pypi setuptools3
10
11RDEPENDS:${PN} += " \
12 python3-ctypes \
13 python3-logging \
14"
diff --git a/meta-python/recipes-devtools/python/python3-inotify_git.bb b/meta-python/recipes-devtools/python/python3-inotify_git.bb
new file mode 100644
index 000000000..15fb92eed
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-inotify_git.bb
@@ -0,0 +1,35 @@
1SUMMARY = "An adapter to Linux kernel support for inotify directory-watching."
2AUTHOR = "Dustin Oprea"
3HOMEPAGE = "https://pypi.org/project/inotify/"
4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://setup.py;md5=79b7ec72aa0d446a552d3cceb5799e41;beginline=28;endline=28"
6
7SRC_URI[sha256sum] = "974a623a338482b62e16d4eb705fb863ed33ec178680fc3e96ccdf0df6c02a07"
8
9SRC_URI = " \
10 git://github.com/dsoprea/pyinotify.git;branch=master;protocol=https \
11 file://run-ptest \
12"
13
14SRCREV = "9be6a51d1660991562eefaaddefa757ca0e0e00f"
15
16S = "${WORKDIR}/git"
17
18inherit setuptools3 ptest
19PIP_INSTALL_PACKAGE = "inotify"
20PIP_INSTALL_DIST_PATH = "${S}/dist"
21
22
23RDEPENDS:${PN} += " \
24 python3-ctypes \
25 python3-logging \
26"
27
28RDEPENDS:${PN}-ptest += " \
29 ${PYTHON_PN}-pytest \
30"
31
32do_install_ptest() {
33 install -d ${D}${PTEST_PATH}/tests
34 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
35}