Repository navigation
ci: Port the private-PipeWire-dir harness to Python (#962) - #2620
Conversation
|
Lint fix pushed ( |
|
Handed off to the coordinator. The |
|
Fixed the Tier 2 red ( It is Refs #962. |
RED: ci/test_pipewire_cursor_hdr.py drives test/cmocka/test_pipewire_cursor_hdr.py by path with stub Xvfb-style stubs (a stub pipewire that binds the socket, one that dies at once, and a test-binary stub that captures its env/cwd/argv) and pins the wiring: the shell gone, its GEN-005 exception gone, the ctest callers running the Python through uv run --script. It fails on master (the module does not exist and the shell is still there).
03111ec to
acf3661
Compare
GREEN: port test/cmocka/test_pipewire_cursor_hdr.sh (the private PipeWire daemon wrapper the camera/screencast cmocka tests and the wrapper test run through) to test/cmocka/test_pipewire_cursor_hdr.py, and delete the shell. - the twelve ctest callers in test/cmocka/tests.d/*.cmake run it through `uv run --script` (the shell's callers all reach Python: they are ctest entries on the Linux runners and the Tier 2 image, both of which carry uv); - test/cmocka/test_pipewire_wrapper.sh runs the Python wrapper the same way, with uv by absolute path so its stub PATH still reaches it; - the stub-skip messages in the camera/screencast tests name the .py now; - the GEN-005 exception for the .sh is removed (ci-lint precheck: 560 -> 559 approved exceptions, 23 violations unchanged).
The lint lane (ci/local_gate.py --lane lint) runs gersemi over the changed .cmake files and the multi-line COMMAND in the ten ported PipeWire test entries needed wrapping; `./lint --fix` produced this. Refs #962.
|
Rebased onto master ( What I resolved
One real defect fixed while resolvingThe loop built its runner as Gates on the rebased tip (
|
acf3661 to
6145768
Compare
…2619 rebase (#962) #2619 landed the context-failure harness in Python, so both private-PipeWire wrappers are Python now. The wrapper test's loop runs both through `uv run --script` — the literal its sibling `ci/test_pipewire_context_fail.py` pins — instead of the per-extension `$runner` case, whose `$uv --script` form uv rejected (it is a `uv run` flag). The no-pipewire control still uses the absolute `$uv`, because it runs with a stripped PATH and would not find uv otherwise. Refs #962.
|
Rebased onto Conflicts and how they were resolved:
Re-checked against the new tip: |
zackees
left a comment
There was a problem hiding this comment.
Coordinator review of the rebased head acf36610a (author account, so a comment rather than an approval). Details of the conflict resolution and of the uv --script → uv run --script fix are in the comment above; this note is the review verdict on the PR as a whole.
Verdict: correct port, no change requested.
- The
.pymodule is a token-for-token port of the deleted.sh(session-bus unset,PIPEWIRE_REMOTEunset, 77 skip when pipewire is absent, private runtime dir with the/tmpfallback whenlen(dir) + len("/pipewire-0-manager") > 107, daemon start, socket wait that fails — not skips — when an installed daemon does not come up, then the test binary's status). - All twelve
test/cmocka/tests.d/*.cmakecallers,test/cmocka/build/test-graph.json, therust/obs-build/tests/native.rspin and the wrapper test move together; theGEN-005block is gone fromci.tomland the comment-only renames in the camera/screencast.cfiles match. ci/test_pipewire_cursor_hdr.py10 OK,ci/test_uv_run.py5 OK,ci-lint precheck23 violations / 557 approved exceptions (master 558),gersemi --checkclean,clang-formatclean on the eleven touched.cfiles, and the wrapper test passes against a real local pipewire.- The one defect I found — the wrapper loop invoking
uv --scriptinstead ofuv run --script— is fixed in the rebase; see the comment above for the before/after output.
docs/features.md: correctly untouched (CI tooling only).
Part of the #962 GEN-005 burn-down: port the private-PipeWire-dir harness the
test_pipewire_camera_*/test_pipewire_screencast_*cmocka tests run throughto Python, and delete the shell.
What
test/cmocka/test_pipewire_cursor_hdr.sh(51 lines) starts a private PipeWiredaemon — its own runtime dir and config, no session manager, no devices, never
the user's session bus — waits for its socket, runs the passed cmocka test
binary, and fails when a daemon that is installed does not come up (a skip is
counted as a pass by ctest). It becomes
test/cmocka/test_pipewire_cursor_hdr.py, token for token:test/cmocka/tests.d/*.cmakerun it through
uv run --script(the shell's callers all reach Python: theyare ctest entries on the Linux runners and the Tier 2 image, both of which
carry uv);
test/cmocka/test_pipewire_wrapper.sh(itself still ashell, ported separately) runs the Python wrapper the same way, with uv
resolved by absolute path so its stub
PATHstill reaches it;.pynow;GEN-005entry for the.shis removed fromci.toml.RED → GREEN
176965569:ci/test_pipewire_cursor_hdr.pydrives the module by pathwith stub
pipewires (one that binds the socket and stays up, one that diesat once) and a test-binary stub that captures its env/cwd/argv, and pins the
wiring (shell gone, exception gone, ctest caller on
uv run --script). Itfails on master (the module does not exist and the shell is still there).
77985af46: the port, the.cmake/wrapper rewiring, the.shdeleted, the exception removed.
uv run --no-project python -m unittest discover -s ci -p test_pipewire_cursor_hdr.py→ 10 tests, OK; thestdlib-only and no-
sys.path-edits ci checks pass;ruff checkclean.Evidence
ci-lint precheck(zackees/ci.yml@a1917ce7): onorigin/master23 violation(s), 560 approved exception(s); on this branch
23 violation(s), 559 approved exception(s) — exactly one exception burnt
down and no new violation.
Refs #962.