($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: alperak <alperyasinak1@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: alperak <alperyasinak1@gmail.com>
Subject: [meta-python][PATCH] python3-ecdsa: enable ptest and add missing runtime dependency
Date: Fri, 12 Apr 2024 12:33:43 +0300	[thread overview]
Message-ID: <20240412093343.110800-1-alperyasinak1@gmail.com> (raw)

* Ptest and library example tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_SLOW_META_PYTHON

Ptest result:
=============

qemux86-64:

Testsuite summary
TOTAL: 1976
PASS: 1972
SKIP: 4
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 292
END: /usr/lib/python3-ecdsa/ptest
2024-04-12T09:18
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 1976
PASS: 1972
SKIP: 4
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 236
END: /usr/lib/python3-ecdsa/ptest
2024-04-12T09:05
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-ecdsa/run-ptest            |  3 +++
 .../python/python3-ecdsa_0.19.0.bb            | 27 ++++++++++++++++---
 3 files changed, 27 insertions(+), 4 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-ecdsa/run-ptest

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 6bd48156d..c54df5090 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -87,6 +87,7 @@ PTESTS_FAST_META_PYTHON = "\
 
 PTESTS_SLOW_META_PYTHON = "\
     python3-arrow \
+    python3-ecdsa \
     python3-google-auth \
     python3-lz4 \
     python3-marshmallow \
diff --git a/meta-python/recipes-devtools/python/python3-ecdsa/run-ptest b/meta-python/recipes-devtools/python/python3-ecdsa/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-ecdsa/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-ecdsa_0.19.0.bb b/meta-python/recipes-devtools/python/python3-ecdsa_0.19.0.bb
index 5b4f7eb93..8e967f925 100644
--- a/meta-python/recipes-devtools/python/python3-ecdsa_0.19.0.bb
+++ b/meta-python/recipes-devtools/python/python3-ecdsa_0.19.0.bb
@@ -6,12 +6,31 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=66ffc5e30f76cbb5358fe54b645e5a1d"
 PYPI_PACKAGE = "ecdsa"
 SRC_URI[sha256sum] = "60eaad1199659900dd0af521ed462b793bbdf867432b3948e87416ae4caf6bf8"
 
-inherit pypi setuptools3 python3native
+inherit pypi setuptools3 python3native ptest
 
-RDEPENDS:${PN} += "python3-six python3-gmpy2"
+SRC_URI += " \
+	file://run-ptest \
+"
 
-BBCLASSEXTEND = "native nativesdk"
+RDEPENDS:${PN}-ptest += " \
+	python3-hypothesis \
+	python3-pytest \
+	python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/src/ecdsa/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS:${PN} += " \
+	python3-gmpy2 \
+	python3-json \
+	python3-six \
+"
 
 do_install:append() {
-    rm ${D}${PYTHON_SITEPACKAGES_DIR}/ecdsa/test_*.py
+	rm ${D}${PYTHON_SITEPACKAGES_DIR}/ecdsa/test_*.py
 }
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1



                 reply	other threads:[~2024-04-12  9:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240412093343.110800-1-alperyasinak1@gmail.com \
    --to=alperyasinak1@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).