diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 16:55:18 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 16:55:18 -0500 |
| commit | 769cacb7d2719374df88626792914f240f74dbed (patch) | |
| tree | f1017e1a7bc5e2a26d42d93a2534ced3a2a3f70a /modules/custom-whitespace.el | |
| parent | 9843ff4c0c18b82cbf9c247fc0f28e55430a7c15 (diff) | |
| download | dotemacs-769cacb7d2719374df88626792914f240f74dbed.tar.gz dotemacs-769cacb7d2719374df88626792914f240f74dbed.zip | |
test(recording): skip integration tests when screencast access fails
The three integration tests in test-video-audio-recording-process-cleanup spawn wf-recorder via cj/ffmpeg-record-video and assert on pgrep counts. They guard with executable-find and XDG_SESSION_TYPE checks, but neither catches the case where the subprocess can run wf-recorder yet lacks Wayland screencast permission. wf-recorder picks a region, retries "Failed to copy frame" 17 times, then exits with code 183 inside a second. The assertion fires against an empty pgrep.
I added test-cleanup--can-capture-frames, which calls cj/ffmpeg-record-video against a temp dir, waits 1s, and checks pgrep. If wf-recorder didn't survive, the three integration tests skip. The result is cached, so the ~2.5s cost is paid once per batch.
I added the same guard to test-integration-video-recording-multiple-start-stop-cycles. Its assertion is (= count initial-count), so it trivially passed in any environment where capture didn't work. Skipping is more honest than passing for the wrong reason.
Diffstat (limited to 'modules/custom-whitespace.el')
0 files changed, 0 insertions, 0 deletions
