Skip to content

Allow setting the OS stack trace getter at runtime - #5126

Open
Vevan05 wants to merge 1 commit into
google:mainfrom
Vevan05:os-stack-trace-getter
Open

Vevan05 wants to merge 1 commit into
google:mainfrom
Vevan05:os-stack-trace-getter

Conversation

@Vevan05

@Vevan05 Vevan05 commented Oct 17, 2026 •

Copy link
Copy Markdown

Expose testing::OsStackTraceGetterInterface in a public header and add UnitTest::set_os_stack_trace_getter(), allowing users to replace the stack trace getter at runtime instead of defining GTEST_OS_STACK_TRACE_GETTER_ at build time.

The interface moves from testing::internal to testing. The setter is not synchronized, so it must not be called while another thread may report a failure.

Fixes #4781

Expose testing::OsStackTraceGetterInterface in a public header and add UnitTest::set_os_stack_trace_getter(), so users can replace the stack trace getter without defining GTEST_OS_STACK_TRACE_GETTER_ at build time.

The interface moves from testing::internal to testing. The setter is not synchronized, so do not call it while another thread may report a failure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: Ability to configure OsStackTraceGetterInterface at runtime

1 participant