mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-06 15:20:12 +00:00
python3-filelock: add ptest support
The tests take <15s to execute. Sample output: root@qemux86-64:~# ptest-runner START: ptest-runner 2026-01-09T18:00 BEGIN: /usr/lib/python3-filelock/ptest PASS: tests/test_async_filelock.py:test_simple[a-str-AsyncUnixFileLock] PASS: tests/test_async_filelock.py:test_simple[a-str-AsyncSoftFileLock] PASS: tests/test_async_filelock.py:test_simple[a-PurePath-AsyncUnixFileLock] PASS: tests/test_async_filelock.py:test_simple[a-PurePath-AsyncSoftFileLock] PASS: tests/test_async_filelock.py:test_simple[a-Path-AsyncUnixFileLock] PASS: tests/test_async_filelock.py:test_simple[a-Path-AsyncSoftFileLock] [...many lines...] PASS: tests/test_filelock.py:test_mtime_zero_exit_branch[SoftFileLock-TimeoutError] PASS: tests/test_filelock.py:test_mtime_zero_exit_branch[UnixFileLock-PermissionError] PASS: tests/test_virtualenv.py:test_virtualenv ============================================================================ Testsuite summary DURATION: 10 END: /usr/lib/python3-filelock/ptest 2026-01-09T18:00 STOP: ptest-runner TOTAL: 1 FAIL: 0 (There are 20 Windows-only tests, which are skipped) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@ PTESTS_FAST_META_PYTHON = "\
|
|||||||
python3-execnet \
|
python3-execnet \
|
||||||
python3-fastjsonschema \
|
python3-fastjsonschema \
|
||||||
python3-fastnumbers \
|
python3-fastnumbers \
|
||||||
|
python3-filelock \
|
||||||
python3-flask \
|
python3-flask \
|
||||||
python3-flexcache \
|
python3-flexcache \
|
||||||
python3-flexparser \
|
python3-flexparser \
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Some tests require non-root
|
||||||
|
useradd tester || echo test user exists already
|
||||||
|
|
||||||
|
su tester -c "pytest --automake"
|
||||||
@@ -5,11 +5,12 @@ HOMEPAGE = "https://py-filelock.readthedocs.io/"
|
|||||||
LICENSE = "Unlicense"
|
LICENSE = "Unlicense"
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f"
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f"
|
||||||
|
|
||||||
|
SRC_URI += "file://run-ptest"
|
||||||
SRC_URI[sha256sum] = "a2241ff4ddde2a7cebddf78e39832509cb045d18ec1a09d7248d6bfc6bfbbe64"
|
SRC_URI[sha256sum] = "a2241ff4ddde2a7cebddf78e39832509cb045d18ec1a09d7248d6bfc6bfbbe64"
|
||||||
|
|
||||||
BBCLASSEXTEND = "native nativesdk"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
||||||
inherit pypi python_hatchling
|
inherit pypi python_hatchling ptest-python-pytest
|
||||||
|
|
||||||
DEPENDS += "\
|
DEPENDS += "\
|
||||||
python3-hatch-vcs-native \
|
python3-hatch-vcs-native \
|
||||||
@@ -20,3 +21,9 @@ RDEPENDS:${PN} += " \
|
|||||||
python3-logging \
|
python3-logging \
|
||||||
python3-asyncio \
|
python3-asyncio \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
RDEPENDS:${PN}-ptest += " \
|
||||||
|
python3-pytest-asyncio \
|
||||||
|
python3-pytest-mock \
|
||||||
|
python3-virtualenv \
|
||||||
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user