Index: sandbox/linux/tests/unit_tests.cc |
diff --git a/sandbox/linux/tests/unit_tests.cc b/sandbox/linux/tests/unit_tests.cc |
index b7c3af673e231aac68a57a2428ab4f18ba4a6221..5872e94030e143da76d49f3cd3035bf01d11cd2d 100644 |
--- a/sandbox/linux/tests/unit_tests.cc |
+++ b/sandbox/linux/tests/unit_tests.cc |
@@ -263,6 +263,16 @@ void UnitTests::DeathMessage(int status, |
bool subprocess_exited_without_matching_message = |
msg.find(expected_msg) == std::string::npos; |
+ |
+// In official builds CHECK messages are dropped, so look for SIGABRT. |
+// See https://code.google.com/p/chromium/issues/detail?id=437312 |
+#if defined(OFFICIAL_BUILD) && defined(NDEBUG) && !defined(OS_ANDROID) |
+ if (subprocess_exited_without_matching_message) { |
+ static const char kSigAbortMessage[] = "Received signal 6"; |
+ subprocess_exited_without_matching_message = |
+ msg.find(kSigAbortMessage) == std::string::npos; |
+ } |
+#endif |
EXPECT_FALSE(subprocess_exited_without_matching_message) << details; |
} |