diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc index 8f40bb20a8..d83ac85f1b 100644 --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -29,6 +29,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-execnet \ python3-fastjsonschema \ python3-fastnumbers \ + python3-filelock \ python3-flask \ python3-flexcache \ python3-flexparser \ diff --git a/meta-python/recipes-devtools/python/python3-filelock/run-ptest b/meta-python/recipes-devtools/python/python3-filelock/run-ptest new file mode 100644 index 0000000000..88654deb70 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-filelock/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh + +# Some tests require non-root +useradd tester || echo test user exists already + +su tester -c "pytest --automake" diff --git a/meta-python/recipes-devtools/python/python3-filelock_3.20.2.bb b/meta-python/recipes-devtools/python/python3-filelock_3.20.2.bb index 75eb16635c..2a0af552b6 100644 --- a/meta-python/recipes-devtools/python/python3-filelock_3.20.2.bb +++ b/meta-python/recipes-devtools/python/python3-filelock_3.20.2.bb @@ -5,11 +5,12 @@ HOMEPAGE = "https://py-filelock.readthedocs.io/" LICENSE = "Unlicense" LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" +SRC_URI += "file://run-ptest" SRC_URI[sha256sum] = "a2241ff4ddde2a7cebddf78e39832509cb045d18ec1a09d7248d6bfc6bfbbe64" BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling +inherit pypi python_hatchling ptest-python-pytest DEPENDS += "\ python3-hatch-vcs-native \ @@ -20,3 +21,9 @@ RDEPENDS:${PN} += " \ python3-logging \ python3-asyncio \ " + +RDEPENDS:${PN}-ptest += " \ + python3-pytest-asyncio \ + python3-pytest-mock \ + python3-virtualenv \ +"