summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYue Tao <Yue.Tao@windriver.com>2023-03-20 10:59:58 +0800
committerKhem Raj <raj.khem@gmail.com>2023-03-22 09:10:39 -0700
commita4b6e3ee894047cd13c5d2b7bfc67f0093899537 (patch)
tree521fca69529b760c34904a0b237cf9187f749351
parentedea484f2dee3e4d7101b14f4a22d28be0291aa0 (diff)
downloadmeta-openembedded-a4b6e3ee894047cd13c5d2b7bfc67f0093899537.tar.gz
Introduce python3-trustme to fix ptest error of python3-requests-toolbelt
The ptest fails after python3-requests-toolbelt is upgraded to 0.10.1. ======================================================= Hint: make sure your test modules/packages have valid Python names. Traceback: ../../python3.11/importlib/{}init{}.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_x509_adapter.py:20: in <module> import trustme E ModuleNotFoundError: No module named 'trustme' ======================================================= The commit b93b4067ea "Fix x509 tests by using trustme" of python3-requests-toolbelt introduces the trustme in test_x509_adapter.py. Introducing python3-trustme to fix ptest error of python3-requests-toolbelt, also introducing python3-service-identity, which is requested by python3-trustme's ptest. The ptest passes of all the three packages. Signed-off-by: Yue Tao <Yue.Tao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb1
-rw-r--r--meta-python/recipes-devtools/python/python3-service-identity/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb25
-rw-r--r--meta-python/recipes-devtools/python/python3-trustme/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb27
6 files changed, 61 insertions, 0 deletions
diff --git a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
index 2428674c42..4965e69e02 100644
--- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
@@ -394,6 +394,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
394 python3-send2trash \ 394 python3-send2trash \
395 python3-sentry-sdk \ 395 python3-sentry-sdk \
396 python3-serpent \ 396 python3-serpent \
397 python3-service-identity \
397 python3-setuptools-declarative-requirements \ 398 python3-setuptools-declarative-requirements \
398 python3-setuptools-scm-git-archive \ 399 python3-setuptools-scm-git-archive \
399 python3-sh \ 400 python3-sh \
@@ -431,6 +432,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
431 python3-trafaret-config \ 432 python3-trafaret-config \
432 python3-traitlets \ 433 python3-traitlets \
433 python3-transitions \ 434 python3-transitions \
435 python3-trustme \
434 python3-twine \ 436 python3-twine \
435 python3-twisted \ 437 python3-twisted \
436 python3-twitter \ 438 python3-twitter \
diff --git a/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb b/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb
index b2678952cd..b1399c3ed5 100644
--- a/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb
+++ b/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.10.1.bb
@@ -21,6 +21,7 @@ RDEPENDS:${PN}-ptest += " \
21 ${PYTHON_PN}-betamax \ 21 ${PYTHON_PN}-betamax \
22 ${PYTHON_PN}-mock \ 22 ${PYTHON_PN}-mock \
23 ${PYTHON_PN}-multiprocessing \ 23 ${PYTHON_PN}-multiprocessing \
24 ${PYTHON_PN}-trustme \
24" 25"
25 26
26do_install_ptest() { 27do_install_ptest() {
diff --git a/meta-python/recipes-devtools/python/python3-service-identity/run-ptest b/meta-python/recipes-devtools/python/python3-service-identity/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-service-identity/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/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-service-identity_21.1.0.bb b/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb
new file mode 100644
index 0000000000..0210a5de22
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-service-identity_21.1.0.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "The tools for verifying whether a certificate is valid for the intended purposes."
2HOMEPAGE = "https://pypi.org/project/service-identity"
3AUTHOR = "Hynek Schlawack"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=8a0f079f4e6a215d6bd6f9d97cab4d5f"
7
8SRC_URI[md5sum] = "5e5c195d8fcedc72f9068be2ad9b5a13"
9SRC_URI[sha256sum] = "6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34"
10
11inherit pypi setuptools3 ptest
12
13SRC_URI += " \
14 file://run-ptest \
15"
16
17RDEPENDS:${PN}-ptest += " \
18 ${PYTHON_PN}-pytest \
19"
20
21do_install_ptest() {
22 install -d ${D}${PTEST_PATH}/tests
23 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
24 cp -rf ${S}/setup.py ${D}${PTEST_PATH}
25}
diff --git a/meta-python/recipes-devtools/python/python3-trustme/run-ptest b/meta-python/recipes-devtools/python/python3-trustme/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-trustme/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/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-trustme_0.9.0.bb b/meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb
new file mode 100644
index 0000000000..641512c46c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-trustme_0.9.0.bb
@@ -0,0 +1,27 @@
1DESCRIPTION = "A utility provides a fake certificate authority (CA)"
2HOMEPAGE = "https://pypi.org/project/trustme"
3AUTHOR = "Nathaniel J. Smith"
4
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=d5a7af1a4b73e57431e25d15a2da745a"
7
8SRC_URI[md5sum] = "0e4d698e5aecaf8306cf440bf3dcbbe0"
9SRC_URI[sha256sum] = "5e07b23d70ceed64f3bb36ae4b9abc52354c16c98d45ab037bee2b5fbffe586c"
10
11inherit pypi setuptools3 ptest
12
13SRC_URI += " \
14 file://run-ptest \
15"
16
17RDEPENDS:${PN}-ptest += " \
18 ${PYTHON_PN}-pytest \
19 ${PYTHON_PN}-service-identity \
20 ${PYTHON_PN}-pyasn1-modules \
21"
22
23do_install_ptest() {
24 install -d ${D}${PTEST_PATH}/tests
25 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
26 cp -rf ${S}/setup.py ${D}${PTEST_PATH}
27}