android: unset source filters to use linux files

Also disable testing reading AT_ENTRY on Android.

Bug: crashpad:30
Change-Id: I10353bbbb3ff28721a2c05d69463df5eac4df281
Reviewed-on: https://chromium-review.googlesource.com/980811
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Joshua Peraza 2018-03-26 17:26:08 -07:00
parent 6b23575b34
commit 5754f608cb
6 changed files with 13 additions and 0 deletions

View File

@ -44,6 +44,7 @@ static_library("client") {
} }
if (crashpad_is_linux || crashpad_is_android) { if (crashpad_is_linux || crashpad_is_android) {
set_sources_assignment_filter([])
sources += [ sources += [
"crashpad_client_linux.cc", "crashpad_client_linux.cc",
"simulate_crash_linux.h", "simulate_crash_linux.h",

View File

@ -40,6 +40,7 @@ static_library("handler") {
} }
if (crashpad_is_linux || crashpad_is_android) { if (crashpad_is_linux || crashpad_is_android) {
set_sources_assignment_filter([])
sources += [ sources += [
"linux/crash_report_exception_handler.cc", "linux/crash_report_exception_handler.cc",
"linux/crash_report_exception_handler.h", "linux/crash_report_exception_handler.h",

View File

@ -104,6 +104,7 @@ static_library("snapshot") {
} }
if (crashpad_is_linux || crashpad_is_android) { if (crashpad_is_linux || crashpad_is_android) {
set_sources_assignment_filter([])
sources += [ sources += [
"linux/cpu_context_linux.cc", "linux/cpu_context_linux.cc",
"linux/cpu_context_linux.h", "linux/cpu_context_linux.h",

View File

@ -69,6 +69,7 @@ static_library("test") {
} }
if (crashpad_is_linux || crashpad_is_android) { if (crashpad_is_linux || crashpad_is_android) {
set_sources_assignment_filter([])
sources += [ sources += [
"linux/fake_ptrace_connection.cc", "linux/fake_ptrace_connection.cc",
"linux/fake_ptrace_connection.h", "linux/fake_ptrace_connection.h",

View File

@ -260,6 +260,7 @@ static_library("util") {
} }
if (crashpad_is_linux || crashpad_is_android) { if (crashpad_is_linux || crashpad_is_android) {
set_sources_assignment_filter([])
sources += [ sources += [
"linux/address_types.h", "linux/address_types.h",
"linux/auxiliary_vector.cc", "linux/auxiliary_vector.cc",
@ -548,6 +549,7 @@ source_set("util_test") {
} }
if (crashpad_is_linux || crashpad_is_android) { if (crashpad_is_linux || crashpad_is_android) {
set_sources_assignment_filter([])
sources += [ sources += [
"linux/auxiliary_vector_test.cc", "linux/auxiliary_vector_test.cc",
"linux/memory_map_test.cc", "linux/memory_map_test.cc",

View File

@ -22,6 +22,7 @@
#include "base/bit_cast.h" #include "base/bit_cast.h"
#include "base/macros.h" #include "base/macros.h"
#include "build/build_config.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "test/errors.h" #include "test/errors.h"
#include "test/multiprocess.h" #include "test/multiprocess.h"
@ -31,9 +32,13 @@
#include "util/numeric/int128.h" #include "util/numeric/int128.h"
#include "util/process/process_memory_linux.h" #include "util/process/process_memory_linux.h"
#if !defined(OS_ANDROID)
// TODO(jperaza): This symbol isn't defined when building in chromium for
// Android. There may be another symbol to use.
extern "C" { extern "C" {
extern void _start(); extern void _start();
} // extern "C" } // extern "C"
#endif
namespace crashpad { namespace crashpad {
namespace test { namespace test {
@ -63,9 +68,11 @@ void TestAgainstCloneOrSelf(pid_t pid) {
ASSERT_TRUE(aux.GetValue(AT_BASE, &interp_base)); ASSERT_TRUE(aux.GetValue(AT_BASE, &interp_base));
EXPECT_TRUE(mappings.FindMapping(interp_base)); EXPECT_TRUE(mappings.FindMapping(interp_base));
#if !defined(OS_ANDROID)
LinuxVMAddress entry_addr; LinuxVMAddress entry_addr;
ASSERT_TRUE(aux.GetValue(AT_ENTRY, &entry_addr)); ASSERT_TRUE(aux.GetValue(AT_ENTRY, &entry_addr));
EXPECT_EQ(entry_addr, FromPointerCast<LinuxVMAddress>(_start)); EXPECT_EQ(entry_addr, FromPointerCast<LinuxVMAddress>(_start));
#endif
uid_t uid; uid_t uid;
ASSERT_TRUE(aux.GetValue(AT_UID, &uid)); ASSERT_TRUE(aux.GetValue(AT_UID, &uid));