diff options
| author | Tim Orling <ticotimo@gmail.com> | 2024-01-05 10:14:55 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-09 22:59:28 +0000 |
| commit | d04ed37fa7491f2eadeca4e1cba536d2c76bdca4 (patch) | |
| tree | b67ae1f28b0d6d3850802a057622c610ddd78d50 /meta/recipes-devtools/python | |
| parent | 64a737df5f77024c4279eaad74cb6ee0c0958d1b (diff) | |
| download | poky-d04ed37fa7491f2eadeca4e1cba536d2c76bdca4.tar.gz | |
python3-attrs: enable ptest
The conftest.py file is needed to define the "slots" and "frozen" fixtures
for pytest
(From OE-Core rev: c27ddbe1dcfae564e93593c90517c2b4502d1709)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
| -rw-r--r-- | meta/recipes-devtools/python/python3-attrs/run-ptest | 3 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python3-attrs_23.2.0.bb | 18 |
2 files changed, 20 insertions, 1 deletions
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 0000000000..8d2017d39c --- /dev/null +++ b/meta/recipes-devtools/python/python3-attrs/run-ptest | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | 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 e00e152015..7b6a6bd94c 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" | |||
| 5 | 5 | ||
| 6 | SRC_URI[sha256sum] = "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30" | 6 | SRC_URI[sha256sum] = "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30" |
| 7 | 7 | ||
| 8 | inherit pypi python_hatchling | 8 | inherit pypi ptest python_hatchling |
| 9 | |||
| 10 | SRC_URI += " \ | ||
| 11 | file://run-ptest \ | ||
| 12 | " | ||
| 9 | 13 | ||
| 10 | DEPENDS += " \ | 14 | DEPENDS += " \ |
| 11 | python3-hatch-vcs-native \ | 15 | python3-hatch-vcs-native \ |
| @@ -18,4 +22,16 @@ RDEPENDS:${PN}+= " \ | |||
| 18 | python3-crypt \ | 22 | python3-crypt \ |
| 19 | " | 23 | " |
| 20 | 24 | ||
| 25 | RDEPENDS:${PN}-ptest += " \ | ||
| 26 | ${PYTHON_PN}-hypothesis \ | ||
| 27 | ${PYTHON_PN}-pytest \ | ||
| 28 | ${PYTHON_PN}-unittest-automake-output \ | ||
| 29 | " | ||
| 30 | |||
| 31 | do_install_ptest() { | ||
| 32 | install -d ${D}${PTEST_PATH}/tests | ||
| 33 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ | ||
| 34 | install ${S}/conftest.py ${D}${PTEST_PATH}/ | ||
| 35 | } | ||
| 36 | |||
| 21 | BBCLASSEXTEND = "native nativesdk" | 37 | BBCLASSEXTEND = "native nativesdk" |
