Skip to content

build: add canonical Qt generation and migrate the remux queue test - #1853

Merged
zackees merged 18 commits into
masterfrom
infra/1332-canonical-qt-tests
Oct 23, 2026
Merged

zackees merged 18 commits into
masterfrom
infra/1332-canonical-qt-tests

Conversation

@zackees

@zackees zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member

Scope

Refs #1332. Extend the canonical native test graph with Qt generation and migrate the unchanged remux queue model test. CMake remains authoritative; this does not complete the full application conversion.

  • Explicit moc headers, UI forms and resource collections, generated through the existing Cargo Qt runners and Qt's CMake wrappers.
  • Include directories before the implicit repository root, preserving the remux test's PCH stub override.
  • Ordered runtime path prepending and explicit imported Qt runtime resolution. CMake uses the extracted, otherwise preserved cmocka_qt_runtime helper. Cargo callers supply resolved SDK runtime paths; unresolved runtime interfaces fail before launching.
  • Remux sources remain unchanged, with C++17, original Qt Widgets/cmocka link order, Qt availability guard, 120-second timeout and test-owned platform selection. The graph now has 159 targets (138 core, 12 graphics, 6 VLC, 2 WHIP, 1 Qt).
  • Both consumers reject conflicting generated UI basenames before target selection.

RED → GREEN

Separate commits preserve each failing contract and implementation: include precedence (38bc15d → c780688), metaobjects (10265ce → e37af72), UI/resources (6ebbe09 → 6656956), runtime path ordering (fff4822 → 6dee188), remux graph requirements (a377e10 → 6976ba3).

Collision review followup: the initial fixture had an empty test map and failed for an unrelated reason. Corrected fixture d076f2a was rerun against the pre-fix parser and failed because collisions were accepted; 71a256b rejects them. Evidence: /tmp/obs-1332-qt-collision-corrected-red.log and /tmp/obs-1332-qt-graph-contracts.log.

Validation

  • ./lint: passed (95.4 s).
  • Existing obs-tests-app binary, native_test_graph filter: 10 passed.
  • Real Qt SDK in bounded Linux Docker build: generated metaobject method invocation, widget UI property, embedded resource contents, and stale source-tree UI-header rejection pass through Cargo and CMake (/tmp/obs-1332-qt-ui-resource-green.log).
  • Unchanged real remux queue test compiled and executed through Cargo and CMake (/tmp/obs-1332-remux-native-green.log).
  • Same sole primary review: clean after collision fix.

No existing C/C++ test sources or public headers changed; no new Rust test executable, workflow, worktree, or admin merge. The unrelated browser submodule mismatch is excluded.

Coverage limits

Actual Qt generation/remux execution evidence here is Linux. Hosted CI must establish native Windows/macOS CMake compatibility; full Cargo SDK/runtime integration on those hosts remains part of #1332. Caller-resolved runtime interfaces do not prove SDK discovery. Full-application profiles, remaining targets, packaging and compiler/cache acceptance remain outstanding.

@zackees

zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Current head: e319e72. Holding the branch for CI.

Two hosted failures now have focused RED/GREEN fixes:

  1. Qt Linux compilation inherited the repository include path before the remux stub directory. RED 314d46b reproduces this using inherited CMake include directories; GREEN 139b684 prepends the ordered priority paths in one BEFORE call. The actual hosted Qt job then passed all 19 tests, including test_remux_queue_model: https://github.com/obs-rust/obs-studio/actions/runs/39881748103/job/120180743521
  2. Native macOS CMake generation reported duplicate moc parameter outputs. RED 8fddb16 reproduces the same conflict on Linux using two targets that generate the same header with different definitions. GREEN e319e72 uses qt6_generate_moc with explicit per-target output paths and retains TARGET compile context. Real Cargo/CMake generation, build and execution passed in the bounded Linux container; log /tmp/obs-1332-qt-moc-isolation-green.log. Same primary review is clean. Native macOS confirmation is still pending.

Current-head run: https://github.com/obs-rust/obs-studio/actions/runs/39882803965

No completion claim for #1332; all full-application/platform/configuration/packaging acceptance requirements remain in scope.

@zackees

zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Current head 4472bc8 restores the original remux test's per-target AUTOMOC mechanism in the CMake graph consumer. Declared moc headers are added as target sources; Cargo retains explicit generation.

The isolated explicit moc paths fixed the reproducible two-target output collision, but the subsequent native macOS job still rejected generated parameter files with different evaluated contents inside that isolated path. That implementation therefore was not a complete native macOS fix. The current change avoids those manual Qt parameter files by preserving CMake AUTOMOC.

Real two-target shared-header Qt generation/build/execution (including UI and resource checks), and the unchanged remux queue test, both pass through Cargo and CMake in the bounded Linux container. Evidence: /tmp/obs-1332-qt-automoc-green.log. The fixture now uses imported Qt interfaces and asserts AUTOMOC is enabled. Its Q_OBJECT declaration is on its own line so CMake's scanner detects it, as in the real OBS header. Same primary review is clean.

Native macOS confirmation remains required in current-head CI: https://github.com/obs-rust/obs-studio/actions/runs/39883766790

Branch held unchanged for CI; #1332 remains open and CMake remains authoritative.

@zackees
zackees marked this pull request as ready for review October 23, 2026 01:42
@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit b87e0a4 Oct 23, 2026
32 checks passed
@zackees
zackees deleted the infra/1332-canonical-qt-tests branch October 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant