aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/linux')
-rw-r--r--src/common/linux/elf_core_dump_unittest.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/linux/elf_core_dump_unittest.cc b/src/common/linux/elf_core_dump_unittest.cc
index 4eae9680..63ecb2f3 100644
--- a/src/common/linux/elf_core_dump_unittest.cc
+++ b/src/common/linux/elf_core_dump_unittest.cc
@@ -146,6 +146,15 @@ TEST(ElfCoreDumpTest, ValidCoreFile) {
expected_thread_ids.insert(crash_generator.GetThreadId(i));
}
+#if defined(__ANDROID__)
+ struct stat st;
+ if (stat(crash_generator.GetCoreFilePath().c_str(), &st) != 0) {
+ fprintf(stderr, "ElfCoreDumpTest.ValidCoreFile test is skipped "
+ "due to no core file being generated");
+ return;
+ }
+#endif
+
MemoryMappedFile mapped_core_file;
ASSERT_TRUE(mapped_core_file.Map(crash_generator.GetCoreFilePath().c_str()));