From 446124784bfdaf3d3c955e760f7354ebaba5f1ef Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Thu, 7 Dec 2023 15:23:55 -0800 Subject: [PATCH] python3-pydantic-core: enable ptest * Add to ptest-packagelists-meta-python.inc "FAST" under 30 seconds Signed-off-by: Tim Orling Signed-off-by: Khem Raj --- .../include/ptest-packagelists-meta-python.inc | 1 + .../python/python3-pydantic-core/run-ptest | 3 +++ .../python/python3-pydantic-core_2.14.5.bb | 15 +++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc index 3272d98192..13dcb621d7 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-core \ python3-pylint \ python3-ptyprocess \ python3-py-cpuinfo \ diff --git a/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest b/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb b/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb index 8221de80b6..01f180c8cb 100644 --- a/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb +++ b/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb @@ -23,3 +23,18 @@ PYPI_ARCHIVE_NAME = "pydantic_core-${PV}.${PYPI_PACKAGE_EXT}" RDEPENDS:${PN} += "python3-typing-extensions" INSANE_SKIP:${PN} = "already-stripped" + +inherit ptest +SRC_URI += "file://run-ptest" +RDEPENDS:${PN}-ptest += "\ + python3-dirty-equals \ + python3-hypothesis \ + python3-pytest \ + python3-pytest-mock \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + rm -rf ${D}${PTEST_PATH}/tests/benchmarks +}