diff options
author | Tim Orling <ticotimo@gmail.com> | 2023-11-29 10:59:06 -0800 |
---|---|---|
committer | Tim Orling <ticotimo@gmail.com> | 2023-12-05 11:42:58 -0800 |
commit | 7d6f92c65d843ad7f4db15a43be065759fe8e7eb (patch) | |
tree | 16c286e064b1e04f40a271d0365cc71592ca0592 | |
parent | da9af2cf72b017ca4d06523c3d3839dd9e19ec43 (diff) | |
download | meta-openembedded-contrib-timo/pydantic_refactor.tar.gz |
python3-pydantic: enable ptesttimo/pydantic_refactor
* Add to ptest-packelists-meta-python.inc "FAST" under 30 s
Signed-off-by: Tim Orling <ticotimo@gmail.com>
3 files changed, 26 insertions, 0 deletions
diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc index 13dcb621d7..f6ae86a1fa 100644 --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -27,6 +27,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-polyline \ python3-precise-runner \ python3-prettytable \ + python3-pydantic \ python3-pydantic-core \ python3-pylint \ python3-ptyprocess \ diff --git a/meta-python/recipes-devtools/python/python3-pydantic/run-ptest b/meta-python/recipes-devtools/python/python3-pydantic/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pydantic/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb b/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb index 226c58e876..8fc59aa937 100644 --- a/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb +++ b/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb @@ -29,3 +29,25 @@ RDEPENDS:${PN} += "\ python3-pydantic-core \ python3-typing-extensions \ " + +inherit ptest +SRC_URI += "file://run-ptest" +RDEPENDS:${PN}-ptest += "\ + python3-cloudpickle \ + python3-dirty-equals \ + python3-pytest \ + python3-pytest-mock \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + # Requires 'ruff' (python3-ruff) which we cannot build + # until we have Rust 1.71+ in oe-core + rm -f ${D}${PTEST_PATH}/tests/test_docs.py + # We are not trying to support mypy + rm -f ${D}${PTEST_PATH}/tests/test_mypy.py + # We are not trying to run benchmarks + rm -rf ${D}${PTEST_PATH}/tests/benchmarks +} + |