diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 479b2ee3..46212e74 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -459,7 +459,12 @@ void AssertHelper::operator=(const Message& message) const { UnitTest::GetInstance()->AddTestPartResult( data_->type, data_->file, data_->line, AppendUserMessage(data_->message, message), - UnitTest::GetInstance()->impl()->CurrentOsStackTraceExceptTop(1) + // Suppress emission of the stack trace for GTEST_SKIP() since skipping is + // an intentional act by the developer rather than a failure requiring + // investigation. + data_->type != TestPartResult::kSkip + ? UnitTest::GetInstance()->impl()->CurrentOsStackTraceExceptTop(1) + : "" // Skips the stack frame for this function itself. ); // NOLINT } diff --git a/googletest/test/googletest-output-test-golden-lin.txt b/googletest/test/googletest-output-test-golden-lin.txt index 6ddf822f..e06856a2 100644 --- a/googletest/test/googletest-output-test-golden-lin.txt +++ b/googletest/test/googletest-output-test-golden-lin.txt @@ -970,7 +970,6 @@ googletest-output-test_.cc:#: Skipped [----------] 1 test from TestSuiteThatSkipsInSetUp googletest-output-test_.cc:#: Skipped Skip entire test suite -Stack trace: (omitted) [ RUN ] TestSuiteThatSkipsInSetUp.ShouldNotRun googletest-output-test_.cc:#: Skipped diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 422569e4..c3fea2c0 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]]> - + - + - +