diff options
author | Abseil Team <absl-team@google.com> | 2024-01-16 19:18:39 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-01-16 19:19:24 (GMT) |
commit | cfe5076a8b99ce7979b0b5d328ff8a9199e04eef (patch) | |
tree | 64e099a5d3350511c08e10a54fd9bd5c7c80d1b4 /googletest/test/gtest_xml_output_unittest.py | |
parent | 7c07a863693b0c831f80473f7c6905d7e458682c (diff) | |
download | googletest-cfe5076a8b99ce7979b0b5d328ff8a9199e04eef.zip googletest-cfe5076a8b99ce7979b0b5d328ff8a9199e04eef.tar.gz googletest-cfe5076a8b99ce7979b0b5d328ff8a9199e04eef.tar.bz2 |
Do not emit stack traces for messages generated by GTEST_SKIP()
Stack traces in assertion failures are an extremely useful tool for
developers tasked with investigating failing tests. It's difficult to
understate this. In contrast to ordinary test assertions (e.g.,
ASSERT_TRUE or EXPECT_FALSE), GTEST_SKIP is a developer-authored
directive to skip one or more tests. Stack traces emitted in skip
messages do not give the developer useful information, as the skip
message itself contains the code location where GTEST_SKIP was used. In
addition to being noise in the output, symbolization of stack traces is
not free. In some Chromium configurations, symbolization in a skipped
test can incur a cost in excess of 25 seconds for a test that otherwise
takes 0-1ms; see https://crbug.com/1517343#c9.
In this CL, we suppress generation and emission of stack traces for
kSkip messages to reduce the output noise and overhead of GTEST_SKIP().
PiperOrigin-RevId: 598899010
Change-Id: I46926fed452c8d7edcb3d636d8fed42cb6c0a9e9
Diffstat (limited to 'googletest/test/gtest_xml_output_unittest.py')
-rwxr-xr-x | googletest/test/gtest_xml_output_unittest.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 422569e..c3fea2c 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -112,20 +112,23 @@ Invalid characters in brackets []%(stack)s]]></failure> </testsuite> <testsuite name="SkippedTest" tests="3" failures="1" disabled="0" skipped="2" errors="0" time="*" timestamp="*"> <testcase name="Skipped" status="run" file="gtest_xml_output_unittest_.cc" line="75" result="skipped" time="*" timestamp="*" classname="SkippedTest"> - <skipped message="gtest_xml_output_unittest_.cc:*
%(stack_entity)s"><![CDATA[gtest_xml_output_unittest_.cc:* -%(stack)s]]></skipped> + <skipped message="gtest_xml_output_unittest_.cc:*

"><![CDATA[gtest_xml_output_unittest_.cc:* + +]]></skipped> </testcase> <testcase name="SkippedWithMessage" file="gtest_xml_output_unittest_.cc" line="79" status="run" result="skipped" time="*" timestamp="*" classname="SkippedTest"> - <skipped message="gtest_xml_output_unittest_.cc:*
It is good practice to tell why you skip a test.%(stack_entity)s"><![CDATA[gtest_xml_output_unittest_.cc:* -It is good practice to tell why you skip a test.%(stack)s]]></skipped> + <skipped message="gtest_xml_output_unittest_.cc:*
It is good practice to tell why you skip a test.
"><![CDATA[gtest_xml_output_unittest_.cc:* +It is good practice to tell why you skip a test. +]]></skipped> </testcase> <testcase name="SkippedAfterFailure" file="gtest_xml_output_unittest_.cc" line="83" status="run" result="completed" time="*" timestamp="*" classname="SkippedTest"> <failure message="gtest_xml_output_unittest_.cc:*
Expected equality of these values:
 1
 2%(stack_entity)s" type=""><![CDATA[gtest_xml_output_unittest_.cc:* Expected equality of these values: 1 2%(stack)s]]></failure> - <skipped message="gtest_xml_output_unittest_.cc:*
It is good practice to tell why you skip a test.%(stack_entity)s"><![CDATA[gtest_xml_output_unittest_.cc:* -It is good practice to tell why you skip a test.%(stack)s]]></skipped> + <skipped message="gtest_xml_output_unittest_.cc:*
It is good practice to tell why you skip a test.
"><![CDATA[gtest_xml_output_unittest_.cc:* +It is good practice to tell why you skip a test. +]]></skipped> </testcase> </testsuite> |