Homec4science

Adds stacktrace support from Abseil to Google Test

Authored by Derek Mauro <dmauro@google.com> on Jul 10 2018, 20:30.

Description

Adds stacktrace support from Abseil to Google Test

This change adds the ability to generate stacktraces in Google Test on
both failures of assertions/expectations and on crashes. The
stacktrace support is conditionally available only when using Abseil
with Google Test.

To use this support, run the test under Bazel with a command like this:

bazel test --define absl=1 --test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 //path/to/your:test

The "--define absl=1" part enables stacktraces on assertion/expectation
failures.

The "--test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" part enables
the signal handler that logs a stacktrace in the event of a crash
(this also requires the "--define absl=1" part). This is not the
default since it may interfere with existing tests.

Details

Committed
Derek Mauro <dmauro@google.com>Jul 10 2018, 20:30
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:ba96d0b1161f: Merge pull request #1622 from rohanjoyce/bazel_test_filter
Branches
Unknown
Tags
Unknown

Event Timeline

Derek Mauro <dmauro@google.com> committed R9484:4c417877648f: Adds stacktrace support from Abseil to Google Test (authored by Derek Mauro <dmauro@google.com>).Jul 10 2018, 20:30