xgbtxy opened a new pull request, #54782: URL: https://github.com/apache/arrow/pull/54782
### Rationale for this change On MSVC, the bundled Google Mock DLLs embed their own GoogleTest runtime. Arrow's runners use `gmock_main`, while exported ArrowTesting assertions use `gtest`. Failures can therefore reach a different reporter: `EXPECT_FATAL_FAILURE` misses the assertion, and an ordinary helper failure can be printed while the process exits 0 and XML records success. This addresses #47442 for the bundled-GTest MSVC CMake build, following #47434/#47455 and the earlier #4380 work. ### What changes are included in this PR? - Select the same `gmock_main` runtime for Arrow's bundled MSVC GTest/GMock consumers. - Use that runtime in ArrowTesting's installed CMake interface and pkg-config metadata. - Restore the Windows expected-failure checks and add a regression for the exported array-equality assertion. Existing GTest targets remain available. SYSTEM packages and non-MSVC dependency mappings are unchanged. ### Are these changes tested? Windows x64, MSVC 19.44, Release, bundled GoogleTest 1.18.0, shared Arrow with static Arrow disabled: - Baseline: the two focused gtest-util cases and three scalar cases all fail because the runner captures zero expected failures. - Patched full suites: `arrow-gtest-util-test` **10 passed**; `arrow-scalar-test` **168 passed**. - Installed-package consumer linking only `ArrowTesting::arrow_testing_shared`: captured-failure test exits 0 with XML 1/0; an explicitly enabled uncaptured-failure probe exits 1 with XML 1/1. - DLL inspection confirms the consumer and ArrowTesting use `arrow_gmock_main.dll`. Installed CMake and pkg-config dependencies select that same runtime. - clang-format 18.1.8, cmake-format 0.6.13 and `git diff --check` pass. Native execution covers the bundled-MSVC CMake configuration; Meson and SYSTEM-package builds were not executed. ### Are there any user-facing changes? Failures from shared ArrowTesting helpers are correctly recorded by the Windows test runner, including after installation. Arrow libraries remain shared. ### Was AI used for this PR? Codex generated the code and tests, performed code review, and ran the local validation described above. **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [ ] Human - [x] AI - [ ] Not reviewed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
