diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-01-09 19:03:22 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-01-12 08:53:50 -0800 |
| commit | b891bc7cacaa3b80974affc1fafd02121c7079bb (patch) | |
| tree | d53a7f266404d03afb78b50e4ecf4d8aabea3008 /meta-python | |
| parent | 9291faa9192e70ff1f05d6551a562960bdc99630 (diff) | |
| download | meta-openembedded-b891bc7cacaa3b80974affc1fafd02121c7079bb.tar.gz | |
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>
Diffstat (limited to 'meta-python')
3 files changed, 15 insertions, 1 deletions
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 = "\ | |||
| 29 | python3-execnet \ | 29 | python3-execnet \ |
| 30 | python3-fastjsonschema \ | 30 | python3-fastjsonschema \ |
| 31 | python3-fastnumbers \ | 31 | python3-fastnumbers \ |
| 32 | python3-filelock \ | ||
| 32 | python3-flask \ | 33 | python3-flask \ |
| 33 | python3-flexcache \ | 34 | python3-flexcache \ |
| 34 | python3-flexparser \ | 35 | 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 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Some tests require non-root | ||
| 4 | useradd tester || echo test user exists already | ||
| 5 | |||
| 6 | 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/" | |||
| 5 | LICENSE = "Unlicense" | 5 | LICENSE = "Unlicense" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" |
| 7 | 7 | ||
| 8 | SRC_URI += "file://run-ptest" | ||
| 8 | SRC_URI[sha256sum] = "a2241ff4ddde2a7cebddf78e39832509cb045d18ec1a09d7248d6bfc6bfbbe64" | 9 | SRC_URI[sha256sum] = "a2241ff4ddde2a7cebddf78e39832509cb045d18ec1a09d7248d6bfc6bfbbe64" |
| 9 | 10 | ||
| 10 | BBCLASSEXTEND = "native nativesdk" | 11 | BBCLASSEXTEND = "native nativesdk" |
| 11 | 12 | ||
| 12 | inherit pypi python_hatchling | 13 | inherit pypi python_hatchling ptest-python-pytest |
| 13 | 14 | ||
| 14 | DEPENDS += "\ | 15 | DEPENDS += "\ |
| 15 | python3-hatch-vcs-native \ | 16 | python3-hatch-vcs-native \ |
| @@ -20,3 +21,9 @@ RDEPENDS:${PN} += " \ | |||
| 20 | python3-logging \ | 21 | python3-logging \ |
| 21 | python3-asyncio \ | 22 | python3-asyncio \ |
| 22 | " | 23 | " |
| 24 | |||
| 25 | RDEPENDS:${PN}-ptest += " \ | ||
| 26 | python3-pytest-asyncio \ | ||
| 27 | python3-pytest-mock \ | ||
| 28 | python3-virtualenv \ | ||
| 29 | " | ||
