diff options
| author | Dan Willemsen <dwillemsen@google.com> | 2018-10-31 10:32:32 -0700 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@google.com> | 2018-10-31 21:53:37 -0700 |
| commit | 3e963f9df7834f3ca67d9049d5a48a26e680577d (patch) | |
| tree | a47fc61d262d3c2dc823016e79836bb660590638 /libnativebridge | |
| parent | 312339167e7b4f702b8747bbcea4d2231b1988b0 (diff) | |
| download | system_core-3e963f9df7834f3ca67d9049d5a48a26e680577d.tar.gz system_core-3e963f9df7834f3ca67d9049d5a48a26e680577d.tar.bz2 system_core-3e963f9df7834f3ca67d9049d5a48a26e680577d.zip | |
Convert more modules to Android.bp
Test: cd system/core; mma
Test: check for mkbootfs in build artifacts
Test: out/host/linux-x86/nativetest64/libcrypto_utils_test/libcrypto_utils_test
Test: out/host/linux-x86/nativetest64/libnativebridge-tests/*_test
Change-Id: I71141bd85f052d5d86763a8b79b219cc4c46aafb
Diffstat (limited to 'libnativebridge')
| -rw-r--r-- | libnativebridge/Android.mk | 3 | ||||
| -rw-r--r-- | libnativebridge/tests/Android.bp | 42 | ||||
| -rw-r--r-- | libnativebridge/tests/Android.mk | 60 |
3 files changed, 42 insertions, 63 deletions
diff --git a/libnativebridge/Android.mk b/libnativebridge/Android.mk deleted file mode 100644 index 3887b1b2f..000000000 --- a/libnativebridge/Android.mk +++ /dev/null @@ -1,3 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(LOCAL_PATH)/tests/Android.mk diff --git a/libnativebridge/tests/Android.bp b/libnativebridge/tests/Android.bp index 9e2e641eb..222bc4c3e 100644 --- a/libnativebridge/tests/Android.bp +++ b/libnativebridge/tests/Android.bp @@ -44,3 +44,45 @@ cc_library_shared { srcs: ["DummyNativeBridge3.cpp"], defaults: ["libnativebridge-dummy-defaults"], } + +// Build the unit tests. +cc_test { + name: "libnativebridge-tests", + host_supported: true, + test_per_src: true, + + cflags: [ + "-Wall", + "-Werror", + ], + + srcs: [ + "CodeCacheCreate_test.cpp", + "CodeCacheExists_test.cpp", + "CodeCacheStatFail_test.cpp", + "CompleteFlow_test.cpp", + "InvalidCharsNativeBridge_test.cpp", + "NativeBridge2Signal_test.cpp", + "NativeBridgeVersion_test.cpp", + "NeedsNativeBridge_test.cpp", + "PreInitializeNativeBridge_test.cpp", + "PreInitializeNativeBridgeFail1_test.cpp", + "PreInitializeNativeBridgeFail2_test.cpp", + "ReSetupNativeBridge_test.cpp", + "UnavailableNativeBridge_test.cpp", + "ValidNameNativeBridge_test.cpp", + "NativeBridge3UnloadLibrary_test.cpp", + "NativeBridge3GetError_test.cpp", + "NativeBridge3IsPathSupported_test.cpp", + "NativeBridge3InitAnonymousNamespace_test.cpp", + "NativeBridge3CreateNamespace_test.cpp", + "NativeBridge3LoadLibraryExt_test.cpp", + ], + + shared_libs: [ + "liblog", + "libnativebridge", + "libnativebridge-dummy", + ], + header_libs: ["libbase_headers"], +} diff --git a/libnativebridge/tests/Android.mk b/libnativebridge/tests/Android.mk deleted file mode 100644 index 4ed6e20e6..000000000 --- a/libnativebridge/tests/Android.mk +++ /dev/null @@ -1,60 +0,0 @@ -# Build the unit tests. -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -# Build the unit tests. -test_src_files := \ - CodeCacheCreate_test.cpp \ - CodeCacheExists_test.cpp \ - CodeCacheStatFail_test.cpp \ - CompleteFlow_test.cpp \ - InvalidCharsNativeBridge_test.cpp \ - NativeBridge2Signal_test.cpp \ - NativeBridgeVersion_test.cpp \ - NeedsNativeBridge_test.cpp \ - PreInitializeNativeBridge_test.cpp \ - PreInitializeNativeBridgeFail1_test.cpp \ - PreInitializeNativeBridgeFail2_test.cpp \ - ReSetupNativeBridge_test.cpp \ - UnavailableNativeBridge_test.cpp \ - ValidNameNativeBridge_test.cpp \ - NativeBridge3UnloadLibrary_test.cpp \ - NativeBridge3GetError_test.cpp \ - NativeBridge3IsPathSupported_test.cpp \ - NativeBridge3InitAnonymousNamespace_test.cpp \ - NativeBridge3CreateNamespace_test.cpp \ - NativeBridge3LoadLibraryExt_test.cpp - - -shared_libraries := \ - liblog \ - libnativebridge \ - libnativebridge-dummy - -header_libraries := \ - libbase_headers - -libnativebridge_tests_common_cflags := \ - -Wall \ - -Werror \ - -$(foreach file,$(test_src_files), \ - $(eval include $(CLEAR_VARS)) \ - $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ - $(eval LOCAL_HEADER_LIBRARIES := $(header_libraries)) \ - $(eval LOCAL_SRC_FILES := $(file)) \ - $(eval LOCAL_CFLAGS := $(libnativebridge_tests_common_cflags)) \ - $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ - $(eval include $(BUILD_NATIVE_TEST)) \ -) - -$(foreach file,$(test_src_files), \ - $(eval include $(CLEAR_VARS)) \ - $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ - $(eval LOCAL_HEADER_LIBRARIES := $(header_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)) \ -) |
