summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authorChris Johnson <chrisjohnsonmail@gmail.com>2023-06-22 17:01:48 (GMT)
committerGitHub <noreply@github.com>2023-06-22 17:01:48 (GMT)
commitb2a2d36f3a28921af8ccbed92c47fbfe8570173c (patch)
treec7a7268259498bd3a4c7137c0889178af3c7c2b4 /googletest/src
parente3d405f62b61a228e5359208b1fa933e03eadc65 (diff)
parentec4fed93217bc2830959bb8e86798c1d86956949 (diff)
downloadgoogletest-b2a2d36f3a28921af8ccbed92c47fbfe8570173c.zip
googletest-b2a2d36f3a28921af8ccbed92c47fbfe8570173c.tar.gz
googletest-b2a2d36f3a28921af8ccbed92c47fbfe8570173c.tar.bz2
Merge branch 'google:main' into feat/qn9090refs/pull/4301/head
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest-death-test.cc2
-rw-r--r--googletest/src/gtest-internal-inl.h4
-rw-r--r--googletest/src/gtest.cc9
3 files changed, 8 insertions, 7 deletions
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index 4cf78e7..0eb6e38 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -1128,7 +1128,7 @@ DeathTest::TestRole NoExecDeathTest::AssumeRole() {
LogToStderr();
// Event forwarding to the listeners of event listener API mush be shut
// down in death test subprocesses.
- GetUnitTestImpl()->listeners()->SuppressEventForwarding();
+ GetUnitTestImpl()->listeners()->SuppressEventForwarding(true);
g_in_fast_death_test_child = true;
return EXECUTE_TEST;
} else {
diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h
index 5ba557f..be82166 100644
--- a/googletest/src/gtest-internal-inl.h
+++ b/googletest/src/gtest-internal-inl.h
@@ -672,7 +672,7 @@ class GTEST_API_ UnitTestImpl {
void AddTestInfo(internal::SetUpTestSuiteFunc set_up_tc,
internal::TearDownTestSuiteFunc tear_down_tc,
TestInfo* test_info) {
-#ifdef GTEST_HAS_DEATH_TEST
+#ifdef GTEST_HAS_FILE_SYSTEM
// In order to support thread-safe death tests, we need to
// remember the original working directory when the test program
// was first invoked. We cannot do this in RUN_ALL_TESTS(), as
@@ -685,7 +685,7 @@ class GTEST_API_ UnitTestImpl {
GTEST_CHECK_(!original_working_dir_.IsEmpty())
<< "Failed to get the current working directory.";
}
-#endif // GTEST_HAS_DEATH_TEST
+#endif // GTEST_HAS_FILE_SYSTEM
GetTestSuite(test_info->test_suite_name(), test_info->type_param(),
set_up_tc, tear_down_tc)
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index fb7512c..d9fd277 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -3019,7 +3019,8 @@ void TestSuite::Run() {
internal::HandleExceptionsInMethodIfSupported(
this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()");
- const bool skip_all = ad_hoc_test_result().Failed();
+ const bool skip_all =
+ ad_hoc_test_result().Failed() || ad_hoc_test_result().Skipped();
start_timestamp_ = internal::GetTimeInMillis();
internal::Timer timer;
@@ -5155,8 +5156,8 @@ bool TestEventListeners::EventForwardingEnabled() const {
return repeater_->forwarding_enabled();
}
-void TestEventListeners::SuppressEventForwarding() {
- repeater_->set_forwarding_enabled(false);
+void TestEventListeners::SuppressEventForwarding(bool suppress) {
+ repeater_->set_forwarding_enabled(!suppress);
}
// class UnitTest
@@ -5634,7 +5635,7 @@ void UnitTestImpl::RecordProperty(const TestProperty& test_property) {
// subprocess. Must not be called before InitGoogleTest.
void UnitTestImpl::SuppressTestEventsIfInSubprocess() {
if (internal_run_death_test_flag_ != nullptr)
- listeners()->SuppressEventForwarding();
+ listeners()->SuppressEventForwarding(true);
}
#endif // GTEST_HAS_DEATH_TEST