diff mbox series

[meta-python] python3-google-auth-oauthlib: add ptest

Message ID 20240307155826.363179-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-python] python3-google-auth-oauthlib: add ptest | expand

Commit Message

Alper Ak March 7, 2024, 3:58 p.m. UTC
* Tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_FAST_META_PYTHON

Ptest result:
==============
qemux86-64:

Testsuite summary
TOTAL: 37
PASS: 37
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 15
END: /usr/lib/python3-google-auth-oauthlib/ptest
2024-03-07T15:48
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 37
PASS: 37
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 15
END: /usr/lib/python3-google-auth-oauthlib/ptest
2024-03-07T15:54
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python3-google-auth-oauthlib/run-ptest    |  4 +++
 .../python3-google-auth-oauthlib_1.2.0.bb     | 25 ++++++++++++++++---
 3 files changed, 26 insertions(+), 4 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-google-auth-oauthlib/run-ptest
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index d3096039b..0cb3046cf 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -19,6 +19,7 @@  PTESTS_FAST_META_PYTHON = "\
     python3-execnet \
     python3-freezegun \
     python3-geojson \
+    python3-google-auth-oauthlib \
     python3-gpiod \
     python3-gunicorn \
     python3-html2text \
diff --git a/meta-python/recipes-devtools/python/python3-google-auth-oauthlib/run-ptest b/meta-python/recipes-devtools/python/python3-google-auth-oauthlib/run-ptest
new file mode 100644
index 000000000..f1c8729f0
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-google-auth-oauthlib/run-ptest
@@ -0,0 +1,4 @@ 
+#!/bin/sh
+
+pytest --automake
+
diff --git a/meta-python/recipes-devtools/python/python3-google-auth-oauthlib_1.2.0.bb b/meta-python/recipes-devtools/python/python3-google-auth-oauthlib_1.2.0.bb
index 5c071ac41..70e843a09 100644
--- a/meta-python/recipes-devtools/python/python3-google-auth-oauthlib_1.2.0.bb
+++ b/meta-python/recipes-devtools/python/python3-google-auth-oauthlib_1.2.0.bb
@@ -6,9 +6,26 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
 SRC_URI[sha256sum] = "292d2d3783349f2b0734a0a0207b1e1e322ac193c2c09d8f7c613fb7cc501ea8"
 
-inherit pypi setuptools3
+inherit pypi setuptools3 ptest
 
-RDEPENDS:${PN} = " \
-    python3-google-auth \
-    python3-requests-oauthlib \
+SRC_URI += " \
+        file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+        python3-click \
+        python3-mock \
+        python3-pytest \
+        python3-unittest-automake-output \
+        python3-unixadmin \
+"
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS:${PN} += " \
+        python3-google-auth \
+        python3-requests-oauthlib \
 "