Fix Breakpad unit tests build for Android.

This patch contains the source-related fixes to ensure that
the Breakpad unit tests build properly when targetting Android.

Calling 'make check' still fails because there is still no
way to run the unit test programs on a device. This will be
addressed by a future patch.

Important notes:

- You must target Android API level 9 (Gingerbread) or higher
  to build the unit tests. This requirement is due to the
  current GTest revision used in the breakpad source tree.

- This patch adds headers providing inlined C library functions
  missing from the NDK (see src/common/android/testing). They
  are inlined to avoid modifying Makefile.am and other build
  files.

- Similarly, the <wchar.h> header-fix under
  src/common/android/testing/include is only required by
  GTest's current revision. E.g. it's not needed when building
  Breakpad as part of Chromium which uses a more up-to-date
  revision.
Review URL: https://breakpad.appspot.com/439002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1020 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
digit@chromium.org 2012-08-23 15:45:01 +00:00
parent b8bb0326a8
commit 13d9e27ef0
9 changed files with 328 additions and 26 deletions

View file

@ -182,7 +182,9 @@ TEST(ElfCoreDumpTest, ValidCoreFile) {
size_t num_nt_prpsinfo = 0;
size_t num_nt_prstatus = 0;
#if defined(__i386__) || defined(__x86_64__)
size_t num_nt_fpregset = 0;
#endif
#if defined(__i386__)
size_t num_nt_prxfpreg = 0;
#endif

View file

@ -43,6 +43,9 @@
#include <string>
#if defined(__ANDROID__)
#include "common/android/testing/pthread_fixes.h"
#endif
#include "common/linux/eintr_wrapper.h"
#include "common/tests/auto_tempdir.h"
#include "common/tests/file_utils.h"