diff options
-rw-r--r-- | base/logging.h | 4 | ||||
-rw-r--r-- | build/android/gtest_filter/base_unittests_disabled | 10 | ||||
-rw-r--r-- | build/android/gtest_filter/net_unittests_disabled | 6 | ||||
-rw-r--r-- | build/common.gypi | 24 | ||||
-rw-r--r-- | testing/gtest.gyp | 10 |
5 files changed, 40 insertions, 14 deletions
diff --git a/base/logging.h b/base/logging.h index 46eca37..6ea430d 100644 --- a/base/logging.h +++ b/base/logging.h @@ -949,9 +949,13 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { // 5 -- LOG(ERROR) at runtime, only once per call-site #ifndef NOTIMPLEMENTED_POLICY +#if defined(OS_ANDROID) && defined(OFFICIAL_BUILD) +#define NOTIMPLEMENTED_POLICY 0 +#else // Select default policy: LOG(ERROR) #define NOTIMPLEMENTED_POLICY 4 #endif +#endif #if defined(COMPILER_GCC) // On Linux, with GCC, we can use __PRETTY_FUNCTION__ to get the demangled name diff --git a/build/android/gtest_filter/base_unittests_disabled b/build/android/gtest_filter/base_unittests_disabled index 4589abd..ddbebad 100644 --- a/build/android/gtest_filter/base_unittests_disabled +++ b/build/android/gtest_filter/base_unittests_disabled @@ -1,7 +1,14 @@ # List of suppressions + +# Android will not support StackTrace. +StackTrace.* # # Sometimes this is automatically generated by run_tests.py VerifyPathControlledByUserTest.Symlinks + +# http://crbug.com/138845 +MessagePumpLibeventTest.TestWatchingFromBadThread + StringPrintfTest.StringPrintfMisc StringPrintfTest.StringAppendfString StringPrintfTest.StringAppendfInt @@ -20,3 +27,6 @@ ScopedJavaRefTest.RefCounts # http://crbug.com/137348 JNIAndroidTest.GetMethodIDFromClassNameCaching ScopedJavaRefTest.Conversions + +# Death tests are not supported with apks. +*DeathTest* diff --git a/build/android/gtest_filter/net_unittests_disabled b/build/android/gtest_filter/net_unittests_disabled index 35b0b20..c0cac35 100644 --- a/build/android/gtest_filter/net_unittests_disabled +++ b/build/android/gtest_filter/net_unittests_disabled @@ -114,3 +114,9 @@ VerifyEndEntity/CertVerifyProcWeakDigestTest.* VerifyIncompleteIntermediate/CertVerifyProcWeakDigestTest.* VerifyIncompleteEndEntity/CertVerifyProcWeakDigestTest.* VerifyMixed/CertVerifyProcWeakDigestTest.* + +# Death tests are not supported with apks. +*DeathTest* +# These are death tests and thus also disabled. +PrioritizedDispatcherTest.CancelNull +PrioritizedDispatcherTest.CancelMissing diff --git a/build/common.gypi b/build/common.gypi index 623d4a5..0a77a01 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -910,7 +910,7 @@ 'android_build_type%': 0, }, 'android_ndk_root%': '<(android_ndk_root)', - 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)', + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)', 'android_build_type%': '<(android_build_type)', 'android_app_abi%': '<(android_app_abi)', }, @@ -976,12 +976,10 @@ # Always use the system zlib. 'use_system_zlib%': 1, + # Configure crash reporting and build options based on release type. 'conditions': [ - # Determine whether or not to use breakpad crash reporting for native - # code. Java code stacktraces will be collected by GoogleFeedback when - # chrome is installed by either market or bazaar where the installer - # package is automatically set to AndroidFeedback. ['buildtype=="Official"', { + # Only report crash dumps for Official builds. 'linux_breakpad%': 1, }, { 'linux_breakpad%': 0, @@ -2523,7 +2521,6 @@ '-pthread', # Not supported by Android toolchain. ], 'cflags': [ - '-U__linux__', # Don't allow toolchain to claim -D__linux__ '-ffunction-sections', '-funwind-tables', '-g', @@ -2531,19 +2528,13 @@ '-fno-short-enums', '-finline-limit=64', '-Wa,--noexecstack', - '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. '<@(release_extra_cflags)', - # Note: This include is in cflags to ensure that it comes after - # all of the includes. - '-I<(android_ndk_include)', ], 'defines': [ 'ANDROID', '__GNU_SOURCE=1', # Necessary for clone() 'USE_STLPORT=1', '_STLP_USE_PTR_SPECIALIZATIONS=1', - 'HAVE_SYS_UIO_H', - 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize. ], 'ldflags!': [ '-pthread', # Not supported by Android toolchain. @@ -2569,7 +2560,12 @@ }], ['android_build_type==0', { 'defines': [ - 'HAVE_OFF64_T', + # The NDK has these things, but doesn't define the constants + # to say that it does. Define them here instead. + 'HAVE_SYS_UIO_H', + ], + 'cflags': [ + '--sysroot=<(android_ndk_sysroot)', ], 'ldflags': [ '--sysroot=<(android_ndk_sysroot)', @@ -2641,7 +2637,7 @@ '<(android_ndk_lib)/crtend_android.o', ], }], - ['_type=="shared_library"', { + ['_type=="shared_library" or _type=="loadable_module"', { 'ldflags': [ '-Wl,-shared,-Bsymbolic', # crtbegin_so.o should be the last item in ldflags. diff --git a/testing/gtest.gyp b/testing/gtest.gyp index b01c694..de32937 100644 --- a/testing/gtest.gyp +++ b/testing/gtest.gyp @@ -108,6 +108,16 @@ ], }, }], + ['OS=="android" and android_app_abi=="x86"', { + 'defines': [ + 'GTEST_HAS_CLONE=0', + ], + 'direct_dependent_settings': { + 'defines': [ + 'GTEST_HAS_CLONE=0', + ], + }, + }], ['clang==1 or OS=="android"', { # We want gtest features that use tr1::tuple, but we currently # don't support the variadic templates used by libstdc++'s |