aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorrmcilroy@chromium.org <rmcilroy@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-04-23 10:20:00 +0000
committerrmcilroy@chromium.org <rmcilroy@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-04-23 10:20:00 +0000
commit1c8e155b3a4488910fa63a867de31f1735595e2f (patch)
treec240ae0dcd2938dbacfa57df42902cf66f1ad0fd /src/client
parentminidump-2-core: Allow user to override shared lib basedir. (diff)
downloadbreakpad-1c8e155b3a4488910fa63a867de31f1735595e2f.tar.xz
Skip ElfCoreDumpTest and LinuxCoreDumperTest on Android if no core file is dumped.
On certain versions of Android (specifically JellyBean MR2 on Nexus 7, possibly others too) no ELF core dump is created for crashing processes. Check for this and skip the test if so. BUG=364943 R=thestig@chromium.org Review URL: https://breakpad.appspot.com/1624003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1318 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client')
-rw-r--r--src/client/linux/minidump_writer/linux_core_dumper_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc b/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
index 449aab3f..8f6a423e 100644
--- a/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
+++ b/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc
@@ -79,7 +79,18 @@ TEST(LinuxCoreDumperTest, VerifyDumpWithMultipleThreads) {
const string core_file = crash_generator.GetCoreFilePath();
const string procfs_path = crash_generator.GetDirectoryOfProcFilesCopy();
+
+#if defined(__ANDROID__)
+ struct stat st;
+ if (stat(core_file.c_str(), &st) != 0) {
+ fprintf(stderr, "LinuxCoreDumperTest.VerifyDumpWithMultipleThreads test is "
+ "skipped due to no core file being generated");
+ return;
+ }
+#endif
+
LinuxCoreDumper dumper(child_pid, core_file.c_str(), procfs_path.c_str());
+
EXPECT_TRUE(dumper.Init());
EXPECT_TRUE(dumper.IsPostMortem());