Repository navigation
test/cmocka: Fix master's Windows and macOS Rust Tier 2 lanes - #2534
Conversation
|
The if(TARGET libobs_rust-static)
if(NOT MSVC)
# test_graphics_state_stacks_rust ...
endif()
endif()The cause of the LNK2005 is in my reply on #2528: the test calls the six exported The macOS Rust Tier 2 lane on master is red too, from #2508's |
… path #2508's test_find_data_file expected NULL for a missing file. On macOS, find_libobs_data_file (libobs/obs-cocoa.m.h) returns the framework's Resources path without checking it, so the case failed on macos-26 (test_obs_core_info_characterization.c:154). Record that and skip the data-path checks there.
|
Two notes on the current head (1c87c1f):
|
ci/test_cmocka_rust_static_guard.py recognizes only that form.
The runtime check from #2534 calls obs_find_data_file first, and on macos-26 that segfaults (run 40410629662): find_libobs_data_file uses the libobs framework bundle, which a cmocka binary does not have.
…s-rust#2533) (obs-rust#2537) * test/cmocka: Build test_graphics_state_stacks_rust on MSVC again (RED, obs-rust#2533) Drops the NOT MSVC guard from obs-rust#2534. windows-2025-vs2026 fails to link with LNK2005 on matrix4_* (run 40401995234). * test/cmocka: Link the Rust staticlib ahead of libobs in test_graphics_state_stacks_rust (GREEN, obs-rust#2533) link.exe resolves references library by library in command-line order. The staticlib's codegen unit with the gs_*_stack_* shims also defines matrix4_*, so listing it first resolves the test's matrix4 calls there and keeps obs.lib's copies out (LNK2005). * test/cmocka: Keep the Linux link order of test_graphics_state_stacks_rust (obs-rust#2533) GNU ld failed with 'libuuid.so.1: DSO missing from command line' when the staticlib came before libobs; only link.exe needs the staticlib first. * test/cmocka: Allow the duplicate matrix4_* in test_graphics_state_stacks_rust on MSVC (obs-rust#2533) Linking the staticlib first (run 40416968486) removed the LNK2005 but pulled obs_util objects that need rpcrt4, winmm and libobs' unexported base_log functions (LNK2019). Keep the original order and let link.exe take the first of the duplicate matrix4_* definitions instead. * test/cmocka: Link test_graphics_state_stacks_rust without /INCREMENTAL on MSVC (obs-rust#2533) /FORCE makes link.exe drop /INCREMENTAL with LNK4075, which /WX turns into LNK1218 (run 40420479363). * test/cmocka: Link test_graphics_state_stacks_rust without /WX on MSVC (obs-rust#2533) LNK4088 from /FORCE cannot be ignored, so /WX turned it into LNK1218 (run 40423760010).
Master fails two Rust Tier 2 lanes, so every PR that selects them is red (seen on #2514 and #2531, run 40402547358).
test_graphics_state_stacks_rust(added by obs-graphics: Port the graphics state stacks (#2517, fixes #2519) #2528) fails to link withmatrix4_mul already defined in obs.lib(obs.dll)and five othermatrix4_*symbols. The target is now guarded withAND NOT MSVC. The C variant still runs on Windows and the Rust variant on Linux and macOS. test/cmocka: Run test_graphics_state_stacks_rust on Windows again (LNK2005 on matrix4_*) #2533 tracks restoring the Windows run.test_find_data_file(added by test/cmocka: Batch six characterization tests before their ports #2508) fails attest_obs_core_info_characterization.c:154with0xc5ac59ca0 != 0x0. On macOS,find_libobs_data_file(libobs/obs-cocoa.m.h:26) returns the libobs framework's Resources path without checking that the file exists, soobs_find_data_filenever returns NULL there. The case now records that ("characterized, not endorsed": the returned path does not exist) and skips the data-path checks when it happens. The check runs at runtime, with no platform#ifdef, so Linux and Windows keep every assertion.Edits to obs-rust-authored characterization tests follow the precedent of #2289, #2495 and #2507. No upstream C test is touched.
RED: the failing lanes above. GREEN: this PR's macOS and Windows lanes. It is a CI fix, so RED and GREEN are pushed together, per AGENTS.md.