Mark Mentovai d1aafe78ea Port the test library and crashpad_test_test to Linux/Android
- Linux (but not Android) provides __fpurge() instead of fpurge().
 - In multiprocess_exec_test_child, use getrlimit(RLIMIT_NOFILE) instead
   of max(sysconf(_SC_OPEN_MAX), OPEN_MAX, getdtablesize()). OPEN_MAX is
   not availble on Linux (but is in Android as a bogus value), and
   getdtablesize() is not available in Android since 5.0.0 (API 21).
   sysconf(_SC_OPEN_MAX) and getdtablesize() both return
   getrlimit(RLIMIT_NOFILE) on all relevant platforms.
 - Add a Linux/Android implementation of test::Paths::Executable().
 - Respect TMPDIR for all POSIX platforms in
   ScopedTempDir::CreateTemporaryDirectory(). If TMPDIR is unset or
   empty, use /tmp, except on Android, where /tmp does not exist and
   /data/local/tmp is used instead.

Also:

 - Fix the Mac and Windows implementations of test::Paths::Executable()
   to abort on fatal error, in line with the new Linux/Android version.

BUG=crashpad:30
TEST=crashpad_test_test

Change-Id: I98a50d8579b193c813ba79794be087649e94cc06
Reviewed-on: https://chromium-review.googlesource.com/405507
Reviewed-by: Robert Sesek <rsesek@chromium.org>
2016-10-31 19:30:24 +00:00
..
2015-10-07 08:20:55 -04:00