All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-python][PATCH 1/4] python3-process-tests: Add recipe
@ 2021-06-23  4:13 Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 2/4] python3-aspectlib: Add ptests Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Khem Raj @ 2021-06-23  4:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Needed by ptests of other modules

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../packagegroups/packagegroup-meta-python.bb     |  1 +
 .../python/python3-process-tests_2.1.2.bb         | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-process-tests_2.1.2.bb

diff --git a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
index 090b9802db..9c44d38ceb 100644
--- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
@@ -278,6 +278,7 @@ RDEPENDS_packagegroup-meta-python3 = "\
     python3-pretend \
     python3-prettytable \
     python3-priority \
+    python3-process-tests \
     python3-progress \
     python3-prompt-toolkit \
     python3-protobuf \
diff --git a/meta-python/recipes-devtools/python/python3-process-tests_2.1.2.bb b/meta-python/recipes-devtools/python/python3-process-tests_2.1.2.bb
new file mode 100644
index 0000000000..dccdeb7a00
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-process-tests_2.1.2.bb
@@ -0,0 +1,15 @@
+# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Tools for testing processes."
+HOMEPAGE = "https://github.com/ionelmc/python-process-tests"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=37031056aff37e4b3310872a9a3d0b1e"
+
+SRC_URI[sha256sum] = "a3747ad947bdfc93e5c986bdb17a6d718f3f26e8577a0807a00962f29e26deba"
+
+inherit pypi setuptools3
+
+RDEPENDS_${PN} += "python3-core"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-python][PATCH 2/4] python3-aspectlib: Add ptests
  2021-06-23  4:13 [meta-python][PATCH 1/4] python3-process-tests: Add recipe Khem Raj
@ 2021-06-23  4:13 ` Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 3/4] python3-execnet: " Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 4/4] python3-py-cpuinfo: " Khem Raj
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2021-06-23  4:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ve-tornado-6-test-constraint.-Ref-15.patch | 45 +++++++++++++++++++
 .../python/python3-aspectlib/run-ptest        |  3 ++
 .../python/python3-aspectlib_1.5.2.bb         | 16 ++++++-
 3 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-aspectlib/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch b/meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
new file mode 100644
index 0000000000..174f088e9e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
@@ -0,0 +1,45 @@
+From d3ae6ac951cc5bbce29b9c987741e0a557c9b777 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
+Date: Sun, 2 May 2021 09:50:43 +0300
+Subject: [PATCH] Remove tornado<6 test constraint. Ref #15.
+
+Upstream-Status: Backport [https://github.com/ionelmc/python-aspectlib/commit/7dccb198dfb426f529b81a28a755f3c02f8b50cb]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/test_integrations_py3.py | 5 ++++-
+ tox.ini                        | 3 ++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_integrations_py3.py b/tests/test_integrations_py3.py
+index e025eac..596589d 100644
+--- a/tests/test_integrations_py3.py
++++ b/tests/test_integrations_py3.py
+@@ -36,7 +36,10 @@ def test_decorate_tornado_coroutine():
+     @gen.coroutine
+     @debug.log(print_to=buf, module=False, stacktrace=2, result_repr=repr)
+     def coro():
+-        yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
++        if hasattr(gen, 'Task'):
++            yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
++        else:
++            yield gen.sleep(0.01)
+         return "result"
+ 
+     loop = ioloop.IOLoop.current()
+diff --git a/tox.ini b/tox.ini
+index 8c607de..08c31b3 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -55,7 +55,8 @@ deps =
+     pytest-clarity
+     pytest-cov
+     pytest-travis-fold
+-    tornado<6.0
++    six
++    tornado
+ commands =
+     {posargs:pytest --cov --cov-report=term-missing -vv --ignore=src}
+ 
+-- 
+2.32.0
+
diff --git a/meta-python/recipes-devtools/python/python3-aspectlib/run-ptest b/meta-python/recipes-devtools/python/python3-aspectlib/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-aspectlib/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -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/SKIPPED/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-aspectlib_1.5.2.bb b/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb
index 415a430672..2dc57a6bb0 100644
--- a/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb
+++ b/meta-python/recipes-devtools/python/python3-aspectlib_1.5.2.bb
@@ -8,7 +8,21 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d58b3f20fd10347a9458b8a03793b62e"
 
 SRC_URI[sha256sum] = "d275ec82c4c2712e564bb760e4accff8f061f648e38774feabeb8b241cf3a4aa"
 
-inherit pypi setuptools3
+inherit ptest pypi setuptools3
+
+SRC_URI += "file://run-ptest \
+            file://0001-Remove-tornado-6-test-constraint.-Ref-15.patch \
+           "
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS_${PN}-ptest += "\
+    python3-tornado \
+    python3-process-tests \
+"
 
 RDEPENDS_${PN} += "python3-core python3-fields"
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-python][PATCH 3/4] python3-execnet: Add ptests
  2021-06-23  4:13 [meta-python][PATCH 1/4] python3-process-tests: Add recipe Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 2/4] python3-aspectlib: Add ptests Khem Raj
@ 2021-06-23  4:13 ` Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 4/4] python3-py-cpuinfo: " Khem Raj
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2021-06-23  4:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python3-execnet/run-ptest              |  3 +++
 .../python/python3-execnet_1.9.0.bb               | 15 ++++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-execnet/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-execnet/run-ptest b/meta-python/recipes-devtools/python/python3-execnet/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-execnet/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -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/SKIPPED/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-execnet_1.9.0.bb b/meta-python/recipes-devtools/python/python3-execnet_1.9.0.bb
index ec16e8884e..a7b156535d 100644
--- a/meta-python/recipes-devtools/python/python3-execnet_1.9.0.bb
+++ b/meta-python/recipes-devtools/python/python3-execnet_1.9.0.bb
@@ -6,13 +6,22 @@ HOMEPAGE = "https://execnet.readthedocs.io/en/latest/"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=772fcdaca14b378878d05c7d857e6c3e"
 
+DEPENDS += "python3-pip-native"
+
+SRC_URI += "file://run-ptest \
+           "
 SRC_URI[sha256sum] = "8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"
 
-DEPENDS += "python3-pip-native"
+inherit ptest pypi setuptools3
 
-inherit pypi setuptools3
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/testing/* ${D}${PTEST_PATH}/tests/
+}
 
-PACKAGECONFIG[testing] = ",,,python3-pre-commit"
+RDEPENDS_${PN}-ptest += "\
+    python3-pytest \
+"
 
 RDEPENDS_${PN} += "python3-core python3-crypt python3-ctypes python3-fcntl python3-io python3-shell python3-threading"
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-python][PATCH 4/4] python3-py-cpuinfo: Add ptests
  2021-06-23  4:13 [meta-python][PATCH 1/4] python3-process-tests: Add recipe Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 2/4] python3-aspectlib: Add ptests Khem Raj
  2021-06-23  4:13 ` [meta-python][PATCH 3/4] python3-execnet: " Khem Raj
@ 2021-06-23  4:13 ` Khem Raj
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2021-06-23  4:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Add missing dependency on python3-io for cStringIO
Remove comment about missing modules since _winreg is windows specific
and cStringIO is addressed

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python3-py-cpuinfo/run-ptest       |  3 +++
 .../python/python3-py-cpuinfo_8.0.0.bb        | 21 ++++++++++++-------
 2 files changed, 17 insertions(+), 7 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-py-cpuinfo/run-ptest

diff --git a/meta-python/recipes-devtools/python/python3-py-cpuinfo/run-ptest b/meta-python/recipes-devtools/python/python3-py-cpuinfo/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-py-cpuinfo/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -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/SKIPPED/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-py-cpuinfo_8.0.0.bb b/meta-python/recipes-devtools/python/python3-py-cpuinfo_8.0.0.bb
index 1f81a83230..1b62a7611f 100644
--- a/meta-python/recipes-devtools/python/python3-py-cpuinfo_8.0.0.bb
+++ b/meta-python/recipes-devtools/python/python3-py-cpuinfo_8.0.0.bb
@@ -8,13 +8,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b0b97c022f12b14d9e02de0b283ee9e9"
 
 SRC_URI[sha256sum] = "5f269be0e08e33fd959de96b34cd4aeeeacac014dd8305f70eb28d06de2345c5"
 
-inherit pypi setuptools3
+inherit ptest pypi setuptools3
 
-RDEPENDS_${PN} += "python3-core python3-ctypes python3-datetime python3-json python3-mmap python3-multiprocessing python3-netclient python3-pickle python3-pprint python3-shell"
+SRC_URI += "file://run-ptest \
+           "
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS_${PN}-ptest += "\
+    python3-pytest \
+"
+
+RDEPENDS_${PN} += "python3-core python3-ctypes python3-datetime python3-json python3-io python3-mmap python3-multiprocessing python3-netclient python3-pickle python3-pprint python3-shell"
 
-# WARNING: We were unable to map the following python package/module
-# dependencies to the bitbake packages which include them:
-#    _winreg
-#    cStringIO
-#    winreg
 BBCLASSEXTEND = "native nativesdk"
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-23  4:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  4:13 [meta-python][PATCH 1/4] python3-process-tests: Add recipe Khem Raj
2021-06-23  4:13 ` [meta-python][PATCH 2/4] python3-aspectlib: Add ptests Khem Raj
2021-06-23  4:13 ` [meta-python][PATCH 3/4] python3-execnet: " Khem Raj
2021-06-23  4:13 ` [meta-python][PATCH 4/4] python3-py-cpuinfo: " Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.