Is there an option to print stacktrace when a test fails in GTEST on GCC?

I am using GTEST with GCC on Linux. I want to see that a stacktrace printed on a test fails (whether it is a statement or a failure based on a signal). This can be done manually , but I'm wondering if it can be installed as a GTEST build / run option (without a few changes to the line of my code base)?

+4
source share
1 answer

There is not a “fully” documentary option: --gtest_stack_trace_depth=10(10 is just an approximate value).

It should be used with --gmock_verbose=info

- EXPECT_CALL - gmock.

(, ASSERT_EQ) - ASSERT , - ( - /UT-).

:

some_test --gmock_verbose=info --gtest_stack_trace_depth=10


, ASSERT *, : https://github.com/google/googletest/issues

+1

Source: https://habr.com/ru/post/1648257/


All Articles