Repository navigation
Conversation
|
|
Keep negative assertion capture disabled when Windows links static GoogleTest into both shared ArrowTesting and the runner. Continue checking shared GoogleTest and static ArrowTesting configurations, and explicitly skip the reporter test for separate runtimes. Generated-by: OpenAI Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 usegtest. Failures can therefore reach a different reporter:EXPECT_FATAL_FAILUREmisses 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?
gmock_mainruntime for Arrow's bundled MSVC GTest/GMock consumers.Windows shared ArrowTesting with a SYSTEM static GoogleTest still has separate reporters. Preserve the existing restriction on its expected-failure checks and explicitly skip the new reporter test in that configuration. Existing GTest targets remain available; SYSTEM 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:
arrow-gtest-util-test10 passed;arrow-scalar-test168 passed.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.arrow_gmock_main.dll. Installed CMake and pkg-config dependencies select that same runtime.git diff --checkpass.Additional Windows x64/MSVC validation uses SYSTEM static GoogleTest 1.18.0 with shared ArrowTesting:
Meson and SYSTEM shared-GoogleTest builds were not executed.
Are there any user-facing changes?
In bundled MSVC builds, failures from shared ArrowTesting helpers are correctly recorded by the 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:
Reviewed before submission by: