From 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 13 Jun 2024 11:59:10 -0700 Subject: [PATCH] Skip the predicate on SIGSEGV in death-test on Android builds with API level <= 21. PiperOrigin-RevId: 643076477 Change-Id: Id9486b7d73c3b17851df1eaf8f5ab2085238bf75 --- googletest/test/googletest-death-test-test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/googletest/test/googletest-death-test-test.cc b/googletest/test/googletest-death-test-test.cc index 75742c93..44b80464 100644 --- a/googletest/test/googletest-death-test-test.cc +++ b/googletest/test/googletest-death-test-test.cc @@ -291,7 +291,9 @@ TEST(ExitStatusPredicateTest, KilledBySignal) { const int status_kill = KilledExitStatus(SIGKILL); const testing::KilledBySignal pred_segv(SIGSEGV); const testing::KilledBySignal pred_kill(SIGKILL); +#if !(defined(GTEST_OS_LINUX_ANDROID) && __ANDROID_API__ <= 21) EXPECT_PRED1(pred_segv, status_segv); +#endif EXPECT_PRED1(pred_kill, status_kill); EXPECT_FALSE(pred_segv(status_kill)); EXPECT_FALSE(pred_kill(status_segv));