Merge "Use -Werror in system/core/libnativebridge"
am: 52013bc3d4
Change-Id: Ic83e320877f2a01052636e62352e7707b0eb1809
This commit is contained in:
commit
d164933fee
2 changed files with 8 additions and 2 deletions
|
@ -33,10 +33,15 @@ shared_libraries := \
|
|||
libnativebridge \
|
||||
libnativebridge-dummy
|
||||
|
||||
libnativebridge_tests_common_cflags := \
|
||||
-Wall \
|
||||
-Werror \
|
||||
|
||||
$(foreach file,$(test_src_files), \
|
||||
$(eval include $(CLEAR_VARS)) \
|
||||
$(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
|
||||
$(eval LOCAL_SRC_FILES := $(file)) \
|
||||
$(eval LOCAL_CFLAGS := $(libnativebridge_tests_common_cflags)) \
|
||||
$(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
|
||||
$(eval include $(BUILD_NATIVE_TEST)) \
|
||||
)
|
||||
|
@ -45,6 +50,7 @@ $(foreach file,$(test_src_files), \
|
|||
$(eval include $(CLEAR_VARS)) \
|
||||
$(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
|
||||
$(eval LOCAL_SRC_FILES := $(file)) \
|
||||
$(eval LOCAL_CFLAGS := $(libnativebridge_tests_common_cflags)) \
|
||||
$(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
|
||||
$(eval include $(BUILD_HOST_NATIVE_TEST)) \
|
||||
)
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
namespace android {
|
||||
|
||||
static constexpr const char* kTestData = "PreInitializeNativeBridge test.";
|
||||
|
||||
TEST_F(NativeBridgeTest, PreInitializeNativeBridge) {
|
||||
ASSERT_TRUE(LoadNativeBridge(kNativeBridgeLibrary, nullptr));
|
||||
#if !defined(__APPLE__) // Mac OS does not support bind-mount.
|
||||
#if !defined(__ANDROID__) // Cannot write into the hard-wired location.
|
||||
static constexpr const char* kTestData = "PreInitializeNativeBridge test.";
|
||||
|
||||
// Try to create our mount namespace.
|
||||
if (unshare(CLONE_NEWNS) != -1) {
|
||||
// Create a dummy file.
|
||||
|
|
Loading…
Reference in a new issue