summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python
diff options
context:
space:
mode:
authorSakib Sajal <sakib.sajal@windriver.com>2020-07-10 14:15:55 -0400
committerKhem Raj <raj.khem@gmail.com>2020-07-12 19:04:17 -0700
commited2e3e44fd3bb739d30583ee968232dccf0a1217 (patch)
treeeb48bb815aec0fd4ab4c9f6aa83e8c71d91c6a9b /meta-python/recipes-devtools/python
parent0e38dbd16625773bbde31a049fedbb30b89f0ffa (diff)
downloadmeta-openembedded-ed2e3e44fd3bb739d30583ee968232dccf0a1217.tar.gz
python3-requests-toolbelt: add ptest
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Acked-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r--meta-python/recipes-devtools/python/python3-requests-toolbelt/run-ptest3
-rw-r--r--meta-python/recipes-devtools/python/python3-requests-toolbelt_0.9.1.bb22
2 files changed, 23 insertions, 2 deletions
diff --git a/meta-python/recipes-devtools/python/python3-requests-toolbelt/run-ptest b/meta-python/recipes-devtools/python/python3-requests-toolbelt/run-ptest
new file mode 100644
index 000000000..b63c4de0d
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-requests-toolbelt/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-requests-toolbelt_0.9.1.bb b/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.9.1.bb
index 3beb39718..cb1bc607b 100644
--- a/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.9.1.bb
+++ b/meta-python/recipes-devtools/python/python3-requests-toolbelt_0.9.1.bb
@@ -5,12 +5,30 @@ AUTHOR = "Ian Cordasco, Cory Benfield"
5LICENSE = "Apache-2.0" 5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=71760e0f1dda8cff91b0bc9246caf571" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=71760e0f1dda8cff91b0bc9246caf571"
7 7
8SRC_URI = "file://run-ptest \
9 "
10
8SRC_URI[md5sum] = "b1509735c4b4cf95df2619facbc3672e" 11SRC_URI[md5sum] = "b1509735c4b4cf95df2619facbc3672e"
9SRC_URI[sha256sum] = "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" 12SRC_URI[sha256sum] = "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"
10 13
11inherit setuptools3 14inherit pypi setuptools3 ptest
12inherit pypi
13 15
14RDEPENDS_${PN} += " \ 16RDEPENDS_${PN} += " \
15 ${PYTHON_PN}-requests (>=2.0.1) \ 17 ${PYTHON_PN}-requests (>=2.0.1) \
16" 18"
19
20RDEPENDS_${PN}-ptest += " \
21 ${PYTHON_PN}-pytest \
22 ${PYTHON_PN}-betamax \
23 ${PYTHON_PN}-mock \
24 ${PYTHON_PN}-multiprocessing \
25"
26
27do_install_ptest() {
28 install -d ${D}${PTEST_PATH}/tests
29 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
30 cp -rf ${S}/setup.py ${D}${PTEST_PATH}
31 # remove test test_multipart_encoder.py as it fails,
32 # downloaded file is not supported
33 rm -f ${D}${PTEST_PATH}/tests/test_multipart_encoder.py
34}