Message ID | 20240105181452.1488396-2-tim.orling@konsulko.com |
---|---|
State | Accepted, archived |
Commit | c27ddbe1dcfae564e93593c90517c2b4502d1709 |
Headers | show |
Series | [1/2] python3-attrs: upgrade 23.1.0 -> 23.2.0 | expand |
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 9057c12b091..ef6f471e7bd 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -57,6 +57,7 @@ PTESTS_FAST = "\ pango \ popt \ python3-atomicwrites \ + python3-attrs \ python3-bcrypt \ python3-calver \ python3-hypothesis \ diff --git a/meta/recipes-devtools/python/python3-attrs/run-ptest b/meta/recipes-devtools/python/python3-attrs/run-ptest new file mode 100644 index 00000000000..8d2017d39ce --- /dev/null +++ b/meta/recipes-devtools/python/python3-attrs/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta/recipes-devtools/python/python3-attrs_23.2.0.bb b/meta/recipes-devtools/python/python3-attrs_23.2.0.bb index e00e1520156..7b6a6bd94c9 100644 --- a/meta/recipes-devtools/python/python3-attrs_23.2.0.bb +++ b/meta/recipes-devtools/python/python3-attrs_23.2.0.bb @@ -5,7 +5,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5e55731824cf9205cfabeab9a0600887" SRC_URI[sha256sum] = "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30" -inherit pypi python_hatchling +inherit pypi ptest python_hatchling + +SRC_URI += " \ + file://run-ptest \ +" DEPENDS += " \ python3-hatch-vcs-native \ @@ -18,4 +22,16 @@ RDEPENDS:${PN}+= " \ python3-crypt \ " +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-hypothesis \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + install ${S}/conftest.py ${D}${PTEST_PATH}/ +} + BBCLASSEXTEND = "native nativesdk"
The conftest.py file is needed to define the "slots" and "frozen" fixtures for pytest Signed-off-by: Tim Orling <tim.orling@konsulko.com> --- All ptests passed on core-image-ptest-python3-attrs in about 19 seconds on qemux86-64 .../conf/distro/include/ptest-packagelists.inc | 1 + .../python/python3-attrs/run-ptest | 3 +++ .../python/python3-attrs_23.2.0.bb | 18 +++++++++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-attrs/run-ptest