Skip to content

Enhance real-mpv integration and Xvfb GUI testing - #226

Merged
ekisu merged 4 commits into
masterfrom
test/mpv-integration-harness
Sep 12, 2026
Merged

ekisu merged 4 commits into
masterfrom
test/mpv-integration-harness

Conversation

@ekisu

@ekisu ekisu commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

Enhance the existing testing harness to exercise the normally built build/webm.lua in real mpv processes.

  • Add acknowledged script-message controls for exact encode ranges and controller state, invoking the same MainPage/encoding path as the UI.
  • Buffer IPC frames correctly across UTF-8/newline boundaries; consume real repeated events, support fresh-event cursors, and bound request/disconnect handling.
  • Drain/capture logs and clean up temporary directories, IPC connections and player/encoder processes even after setup/test failures.
  • Generate small media fixtures and inspect actual encoded output with FFmpeg/ffprobe.
  • Add isolated Xvfb displays and real xdotool mouse/key input with application-state synchronization.
  • Migrate existing format tests to deterministic ranges instead of seek/sleep/key timing.

Prerequisite for restoring end-to-end regressions in #220, #221, #224 and #225. Also supports simplifying the live-encode tests in #219 and #223. Tracked in #217.

Verification

  • Normal make build passed; tests never invoke moonc themselves or load rewritten script fragments.
  • python -m tests.run_tests: 14 tests, 13 passed and 1 existing audio-fixture skip (~2s locally).
  • Seven IPC transport regressions cover fragmented/coalesced data, UTF-8, repeated events, concurrency, timeout/backpressure and disconnects.
  • Real Xvfb/mpv smoke test verifies 640×360 OSD/window geometry, actual pointer motion observed by mpv, and X key events opening/leaving the crop page.
  • Real media integration checks exercise repeated encodes and distinct output ranges.
  • Nix environment declares FFmpeg, Xvfb and xdotool; missing GUI prerequisites fail instead of silently skipping.

See tests/README.md for commands and helper APIs. The crop-edge regression is added in #221; this prerequisite's GUI smoke test intentionally passes on the unfixed mapping.

@ekisu
ekisu marked this pull request as ready for review September 12, 2026 01:02
@ekisu
ekisu merged commit 23a206c into master Sep 12, 2026
2 checks passed
@ekisu
ekisu deleted the test/mpv-integration-harness branch September 12, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant