Repository navigation
build: unify the native C test graph for Cargo and CMake - #1805
Conversation
438a7d8 to
8f3a628
Compare
9cf2300 to
15de5fd
Compare
|
Local validation is complete for current head Holding this branch unchanged for CI run https://github.com/obs-rust/obs-studio/actions/runs/39860136825, then the normal merge queue. The next migration follows after this PR lands so work proceeds one PR at a time. CMake remains authoritative and #1332 remains open. |
|
PR CI passed on
Marked ready and entered the normal merge queue. No admin merge. This is component/build-graph evidence, not a claim that Windows/macOS complete applications are Cargo-built. #1332 remains open; CMake remains authoritative pending its full acceptance requirements. |
Migrate 30 native tests to the shared graph. Resolve optional command prefixes in order and preserve the existing Xvfb shared-display helper. Update the concurrency registration fixture to consume canonical tests while retaining its full inventory and assertions. Validated 214 core executions across C reference and Rust hybrid, 107 CMake core cases, all 116 canonical targets compiled, eight configuration selections, four graph contracts, ten Python checks, and warnings-denied Clippy. Keep test_audio_io on its original CMake path because its successful startup intentionally skips an incompatible crash assertion.
Reproduce the hosted Windows CTest failure with CMAKE_BUILD_TYPE=Debug. Set the configure-time build type as well as build/ctest --config, so single-config generators use the runtime directory created by the fixture. Require the Release marker rather than accepting an unconfigured directory. Four graph contracts pass under conflicting Debug environment, and the real CMake/native graph fixture passes with Ninja Multi-Config. RED f93743f. Same primary review clean. No production source or existing C tests changed.
Migrate 17 core and 11 real OpenGL regression targets to the canonical graph, preserving original platform guards, sources, dependencies, module paths, runtime directories, timeouts and skip codes. Keep four frontend utility helpers core-free and watch their shared headers. Native validation exposed non-UTF8 caption-text output. Preserve raw log bytes and scan ASCII skip markers without UTF8 decoding. All 272 native executions pass against C reference and Rust hybrid (262 core-linked, ten core-free); all 144 CMake targets compile and all 136 core/graphics programs pass with zero skips. Eight platform/config selection comparisons, four contracts, ten Python checks, Clippy including integration runner, formatting and single-primary review pass. RED 7a1ba92.
Reject malformed optional-prefix arguments even when the program is missing, matching Rust's typed graph validation. Keep known tokens valid without requiring resolution context for unavailable wrappers. RED a12ea43; four real graph contracts and ten Python checks pass. Same primary reviewer clean.
Migrate seven frontend/utility helper tests (menu text, profile remove and activate, T-Bar position, media time, Studio Mode exit and swap) to the canonical graph, preserving sources, include paths, link sets (only profile-activate links libobs) and default runtime. Watch frontend/utility. RED 2ed1434.
2b63b8b to
f6b0c25
Compare
|
Rebased onto Preserved #1831's new protocol-list case in the canonical graph instead of restoring the retired Linux manifest. C tests/public headers remain unchanged. Current inventory: 152 targets, 132 core; 222 literal CMake declarations remain outside this graph. Local evidence: four graph contracts pass; all 288 native core/graphics executions pass with zero skips, matching current graph names for both variants; all 152 canonical targets compile through CMake; 144 core/graphics CMake cases pass with zero skips/failures. Formatting and the same primary review pass. Full logs and summary are linked in the updated PR body. Following current-head CI https://github.com/obs-rust/obs-studio/actions/runs/39866230018, then normal requeueing. No admin merge. CMake remains authoritative and #1332 remains open. |
|
Current-head PR CI passed on Both Linux modes passed with 373 registered cases each, zero failures and four documented PulseAudio environment skips. Windows passed four compatibility runs of 188 cases each; macOS passed four runs of 213 each. Qt, Rust tests and cross-platform lint passed. These are component/core/renderer checks with existing CMake-compiled test executables, not complete Cargo-built Windows/macOS application proof. Re-entered the normal merge queue behind #1840. Holding the branch unchanged for merged-result validation. No admin merge; #1332 stays open and CMake remains authoritative. |
Current rebase evidence —
f6b0c2512Rebased onto master
72a5b5fe0after GitHub reported a conflict following #1831. Its new protocol-list test is preserved in the canonical graph, including original sources/order, includes, libraries, sanitizers and command; upstream C tests and public headers are unchanged./tmp/obs-1332-rebase-72a-{count-red,graph-green,native-validation,fmt}.log; independently checked summary:/tmp/obs-1332-rebase-72a-evidence-summary.json.2b63b8b46passed all PR CI in run39860136825: Linux 370 registered cases per mode (four environment skips), Windows 185 cases per compatibility run, macOS 210, plus Qt, Rust tests and cross-platform lint. Current rebased-head CI also passed: run39866230018, with Linux 373 cases per mode (four environment skips), Windows 188 per compatibility run and macOS 213 per compatibility run. Requeued normally; merge-result CI run39868534511is pending.Earlier slice evidence below retains its original scope and counts. CMake remains authoritative; this PR does not complete #1332.
Refs #1332
Implementation
cc::Build: conditional sources, libraries and compiler options; imported dependency interfaces; explicit platform/feature/plugin facts; runtime argv/environment/cwd/timeout/skip/resource metadata.ldd, isolate runtime directories, retain command metadata and reject skipped assertions. Windows diagnostic scanning consumes the shared graph without weakening checks.Rebased onto
e7a272ffdafter GitHub reported conflicts. Preserved upstream hotkey-pair changes and the scene-audio split, including both C sources in order and the upstream port explanation. Repeated local native validation against the new core. No workflow files are added or changed.Resolved dependency artifacts are shared by compilation and runtime validation. Tests that declare a core dependency must resolve the selected core. The standalone AMF test retains its original core-free link; imported header-only providers create no runtime dependency. Added output-plugin coverage includes AMF/AMF3, multichannel MP4, timed MP4 splitting, null-output stop-thread cleanup and RTMP bitrate/send-thread regressions.
The independent WebRTC/graphics/VLC builder lists are also removed. The graph partitions tests into suites (132 core, 12 graphics, 6 VLC, 2 WHIP). Named artifact definitions supply actual module paths without linking those modules into the executable; CMake adds producer dependencies. The runtime token keeps the original CMake runtime directory and isolated Cargo test directories. VLC dummy custom targets remain excluded from runtime cases.
Explicit
watch_inputsretains indirect header and runtime-data dependencies formerly declared by the separate builders. Cargo emits deduplicated watches; CMake registers configuration dependencies. The fixture verifies registration/emissions, not recursive edit detection or the full edited-input benchmark requirement.RED → GREEN
Separate failing contracts precede implementation throughout the history. Recent pairs:
abd3685fb→51d664223: real header-only import policy isolation.3769870d8→8c4f7290b: plugin availability independent of core audio features.6999d3d09→ad0fe5b9f: real enabled compiler option, deliberately invalid disabled option, unknown-condition rejection in both consumers.84df2d038→8f3a6281f: eliminate the independent Linux inventory and preserve all remaining definitions.81958b884→01d6a0709: eight remaining output-plugin tests and runtime artifact dependency contracts.331b889c4→de55053e2: shared suite selection and real built-module path definitions, then remove the separate graphics/VLC/WHIP inventories.ea85cfaba→615887930: preserve indirect header/data watches and reject malformed paths, including empty CMake array entries.Latest fix and validation
2ed143429→2b63b8b46(on top of15de5fda7): migrate seven frontend/utility helper tests (test_menu_text,test_profile_remove,test_profile_activate,test_tbar_position,test_media_time,test_studio_mode_exit,test_studio_mode_swap). Sources, include paths, link sets (only profile-activate links libobs; six stay core-free) and default runtime are preserved;frontend/utilityis watched. RED failed withmissing canonical test_menu_text.286 unchanged native executions pass, zero skips: 262 core (131 each against C reference and Rust hybrid) plus 24 graphics (12 each).
All 151 canonical targets compile through the real CMake consumer; all 143 core/graphics cases pass, zero skips/failures.
Eight configuration-only guard comparisons pass: Linux151, optional modules off119, core PulseAudio off150, features/runtime modules off129; macOS facts119, MSVC facts109, Windows GNU facts114, FreeBSD facts127. Selection checks only, not native non-Linux execution.
Focused graph contracts (28
native_buildtests), six Python checks, warnings-denied Clippy withlibobs-integration, and./lintpass.Evidence:
/tmp/obs-1332-frontend-utility-{red,green,validation,python,clippy,lint}.log, independently checked against the then-current graph in/tmp/obs-1332-frontend-utility-evidence-summary.json. Native case names match the graph for both variants; same single primary review passes.Rebased onto
e7a272ffdonly after GitHub reportedDIRTY. The upstream scene-audio split addedlibobs/obs-scene-item-audio-actions.c.h; the canonical target now preserves both original C sources in order and the upstream explanatory comments. The independent Linux JSON inventory remains removed. Browser submodule mismatch is unchanged and excluded.Rebased core proof (
1a5187093): all 272 Cargo-driven native executions pass, zero skips; all 144 canonical CMake targets compile and all 136 core/graphics cases pass, zero skips/failures. All eight configuration comparisons pass unchanged. Four contracts, ten Python checks, integration-runner Clippy, formatting and rebase review pass. Evidence:/tmp/obs-1332-rebase-e7a-native-validation.log,/tmp/obs-1332-rebase-e7a-{runtime,cmake,selection}-evidence.json,/tmp/obs-1332-rebase-e7a-{graph,clippy,python}.log.a12ea435d→15de5fda7: close a demonstrated parser mismatch. Rust rejected an unknown template in an unavailable optional wrapper's arguments; CMake accepted it. CMake now checks syntax before lookup, while known source/build/runtime/target tokens remain accepted without resolving an unavailable wrapper. Four real contracts and ten Python checks pass; same primary review clean. The production graph is unchanged from the full rebased native proof. Evidence:/tmp/obs-1332-missing-prefix-template-{red,green,python}.log.Previous public head
9cf2300abpassed all PR CI, run39853903933. Linux OFF/ON each had 369 registered cases and four documented PulseAudio environment skips. Windows ran 184 existing CMake-compiled C tests against each Cargo-built core; macOS ran 209 against each, with core/renderer identity checks (Windows D3D11/OpenGL, macOS OpenGL/Metal). These component checks do not prove full Cargo-built applications or all-platform test compilation. Logs:/tmp/obs-1332-current-ci-{linux-off,linux-on,windows-tier2,macos-tier2}-clean.log. Rebased/new-head CI remains required.7a1ba92c9→9cf2300ab: migrate 17 core and 11 real OpenGL output/encoder/scene regressions. Preserve original guards, dependency/source order, module paths, runtime directories, timeouts and skip codes. Four frontend utility helpers remain core-free and watch their headers.272 unchanged native executions pass, zero skips: 248 core (124 each against C reference and Rust hybrid) plus 24 graphics (12 each). Library resolution is verified for all 262 linked cases; ten cases are intentionally core-free. Startup/module/API checks and core export equality also pass.
All 144 canonical CMake targets compile; all 136 core/graphics cases pass, zero skips/failures. The eight unchanged VLC/WHIP runtime cases retain the earlier runtime proof. Actual OpenGL module and effect data are used; no fake renderer.
Native validation found a harness bug on the existing caption-text test's non-UTF-8 output. Read/scans now use raw bytes; raw files, skip exit codes and exact ASCII skip-marker rejection remain intact. Preserved reference stdout is 708031 bytes and fails UTF-8 decoding; the unchanged test now passes.
Eight configuration-only guard comparisons pass: Linux144, optional modules off112, core PulseAudio off143, features/runtime modules off122; macOS facts112, MSVC facts102, Windows GNU facts107, FreeBSD facts120. These are selection checks, not native non-Linux execution.
Four graph contracts, ten Python checks, warnings-denied Clippy (including the integration runner), rustfmt, scoped gersemi, diff checks and the same single primary reviewer pass.
Evidence:
/tmp/obs-1332-canonical-output-scene-validation-green.log,/tmp/obs-1332-output-scene-{runtime,cmake,selection}-evidence.json,/tmp/obs-1332-output-scene-{red,green,clippy,python,runner-clippy}.log. The initial runtime failure is preserved in/tmp/obs-1332-canonical-output-scene-validation.log.Hosted Windows and macOS Rust tests pass on
02adc5e24, confirming the configuration fix below. Current-head CI remains required.Hosted Format job
120076247029onbb0832d6cpasses, confirming the concurrency registration correction.f93743f7f→02adc5e24: fix the Windows native graph fixture's configuration mismatch. Reproduced the previous hosted failure locally withCMAKE_BUILD_TYPE=Debug; single-config generators ignore build/CTest--config Release. Configure now explicitly setsCMAKE_BUILD_TYPE=Release, and the fixture asserts the exact registered Release working directory and marker. Four graph contracts pass with the conflicting Debug environment, and the real fixture passes Ninja Multi-Config. No production source or existing C test changed. Evidence:/tmp/obs-1332-config-selection-red.log,/tmp/obs-1332-config-contract-red.log,/tmp/obs-1332-config-selection-green.log,/tmp/obs-1332-multiconfig-green.log. New-head Windows CI remains required.4f3897a3e→bb0832d6c: migrate 30 core/helper definitions and preserve optional command prefixes, ordering and missing-program fallback. Both consumers preserve the existing Xvfb shared-display helper; Cargo generates it from the existing template.Fix the hosted Format job's concurrency registration failure: the fixture now reads migrated definitions from the shared graph, retaining all ten expected names, timeouts and isolation assertions. Local failure reproduced before the fix; all ten Python checks now pass.
214 unchanged core program executions pass, zero skips: 107 each against C reference and Rust hybrid, with selected-core resolution verified (212 linked cases plus two intentionally core-free AMF cases).
All 116 canonical targets compile through the real CMake consumer; all 107 core tests pass, zero skips/failures. The nine graphics/VLC/WHIP runtime cases remain covered by the earlier full run below.
Eight configuration-only selection comparisons pass: Linux default116, optional modules off95, core PulseAudio off115, features/runtime modules off105; macOS facts96, MSVC facts89, Windows GNU facts94, FreeBSD facts104. These do not claim native non-Linux execution.
Four real graph contracts, ten Python checks, warnings-denied Clippy, rustfmt, scoped gersemi, diff checks and the same single primary review pass.
test_audio_ioremains on its original CMake path: successful OBS startup intentionally skips its absent-core crash assertion. The initial run detected that on both cores. No C test or skip detection was weakened; this test requires a separately designed execution strategy before migration.Evidence:
/tmp/obs-1332-canonical-core-helper-validation-green.log,/tmp/obs-1332-core-helper-runtime-evidence.json,/tmp/obs-1332-core-helper-final-host.log,/tmp/obs-1332-core-helper-python-final.log,/tmp/obs-1332-core-helper-final-clippy.log.Previous suite validation
SKIPPEDoutput are rejected. This is not a complete OBS CMake application build.de55053e2. The watch-only followup passes focused tests, warnings-denied Clippy and a fresh configure/build of the entire 86-target CMake project. Windows diagnostics, rustfmt, scoped gersemi, diff checks and the same single primary review pass./tmp/obs-1332-canonical-test-suites-artifacts.log,/tmp/obs-1332-test-suites-runtime-evidence.json,/tmp/obs-1332-test-suites-artifacts-{red,green,clippy,windows-scan}.log,/tmp/obs-1332-test-watch-inputs-{red,green,clippy}.log,/tmp/obs-1332-watch-input-configure-build.log.120053338869failed before compilation: apt could not find requiredzlib1gversion1:1.3.dfsg+really1.3.1-1ubuntu3.2. The current security index contains it. No package pin or inventory validation was relaxed. New-head CI remains required.Remaining scope
Reconcile the entire applicable CMake inventory, including frontend, graphics and plugin tests, generated inputs, platform/configuration guards and runtime properties. A literal scan still finds 222 independent
add_executabledeclarations; loops and other directories also need evaluation. The suite-count assertions are transitional, not proof of full suite coverage. Graphics/VLC/WebRTC consumers now use the shared graph; the remaining CMake-only tests still need migration.Full #1332 still requires application/platform/configuration and packaging coverage, representative saved capture profiles, controlled cold/warm/no-change/edited-input native compiler-cache evidence, configurable unity/PCH proof, and CMake authority retirement only after all acceptance requirements are proven. No new Rust test binary is introduced.