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
This commit is contained in:
parent
312339167e
commit
3e963f9df7
20 changed files with 389 additions and 452 deletions
8
cpio/Android.bp
Normal file
8
cpio/Android.bp
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2005 The Android Open Source Project
|
||||
|
||||
cc_binary_host {
|
||||
name: "mkbootfs",
|
||||
srcs: ["mkbootfs.c"],
|
||||
cflags: ["-Werror"],
|
||||
shared_libs: ["libcutils"],
|
||||
}
|
|
@ -1,17 +1,3 @@
|
|||
# Copyright 2005 The Android Open Source Project
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
mkbootfs.c
|
||||
|
||||
LOCAL_MODULE := mkbootfs
|
||||
|
||||
LOCAL_CFLAGS := -Werror
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libcutils
|
||||
|
||||
include $(BUILD_HOST_EXECUTABLE)
|
||||
|
||||
$(call dist-for-goals,dist_files,$(LOCAL_BUILT_MODULE))
|
||||
$(call dist-for-goals,dist_files,$(ALL_MODULES.mkbootfs.BUILT))
|
||||
|
|
50
gatekeeperd/Android.bp
Normal file
50
gatekeeperd/Android.bp
Normal file
|
@ -0,0 +1,50 @@
|
|||
//
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
cc_binary {
|
||||
name: "gatekeeperd",
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-Wunused",
|
||||
],
|
||||
srcs: [
|
||||
"SoftGateKeeperDevice.cpp",
|
||||
"IGateKeeperService.cpp",
|
||||
"gatekeeperd.cpp",
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
"libbinder",
|
||||
"libgatekeeper",
|
||||
"liblog",
|
||||
"libhardware",
|
||||
"libbase",
|
||||
"libutils",
|
||||
"libcrypto",
|
||||
"libkeystore_aidl",
|
||||
"libkeystore_binder",
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libhwbinder",
|
||||
"android.hardware.gatekeeper@1.0",
|
||||
],
|
||||
|
||||
static_libs: ["libscrypt_static"],
|
||||
include_dirs: ["external/scrypt/lib/crypto"],
|
||||
init_rc: ["gatekeeperd.rc"],
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2015 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused
|
||||
LOCAL_SRC_FILES := \
|
||||
SoftGateKeeperDevice.cpp \
|
||||
IGateKeeperService.cpp \
|
||||
gatekeeperd.cpp
|
||||
|
||||
LOCAL_MODULE := gatekeeperd
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libbinder \
|
||||
libgatekeeper \
|
||||
liblog \
|
||||
libhardware \
|
||||
libbase \
|
||||
libutils \
|
||||
libcrypto \
|
||||
libkeystore_aidl \
|
||||
libkeystore_binder \
|
||||
libhidlbase \
|
||||
libhidltransport \
|
||||
libhwbinder \
|
||||
android.hardware.gatekeeper@1.0 \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libscrypt_static
|
||||
LOCAL_C_INCLUDES := external/scrypt/lib/crypto
|
||||
LOCAL_INIT_RC := gatekeeperd.rc
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(call first-makefiles-under,$(LOCAL_PATH))
|
34
gatekeeperd/tests/Android.bp
Normal file
34
gatekeeperd/tests/Android.bp
Normal file
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
cc_test {
|
||||
name: "gatekeeperd-unit-tests",
|
||||
|
||||
cflags: [
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-Wno-missing-field-initializers",
|
||||
],
|
||||
shared_libs: [
|
||||
"libgatekeeper",
|
||||
"libcrypto",
|
||||
"libbase",
|
||||
],
|
||||
static_libs: ["libscrypt_static"],
|
||||
include_dirs: ["external/scrypt/lib/crypto"],
|
||||
srcs: ["gatekeeper_test.cpp"],
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2015 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := gatekeeperd-unit-tests
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_CFLAGS += -g -Wall -Werror -Wno-missing-field-initializers
|
||||
LOCAL_SHARED_LIBRARIES := libgatekeeper libcrypto libbase
|
||||
LOCAL_STATIC_LIBRARIES := libscrypt_static
|
||||
LOCAL_C_INCLUDES := external/scrypt/lib/crypto
|
||||
LOCAL_SRC_FILES := \
|
||||
gatekeeper_test.cpp
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
29
libcrypto_utils/tests/Android.bp
Normal file
29
libcrypto_utils/tests/Android.bp
Normal file
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// Copyright (C) 2016 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
cc_test_host {
|
||||
name: "libcrypto_utils_test",
|
||||
srcs: ["android_pubkey_test.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-Wextra",
|
||||
],
|
||||
shared_libs: [
|
||||
"libcrypto_utils",
|
||||
"libcrypto",
|
||||
],
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2016 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libcrypto_utils_test
|
||||
LOCAL_SRC_FILES := android_pubkey_test.cpp
|
||||
LOCAL_CFLAGS := -Wall -Werror -Wextra
|
||||
LOCAL_SHARED_LIBRARIES := libcrypto_utils libcrypto
|
||||
include $(BUILD_HOST_NATIVE_TEST)
|
|
@ -1,3 +0,0 @@
|
|||
LOCAL_PATH := $(my-dir)
|
||||
|
||||
include $(call first-makefiles-under,$(LOCAL_PATH))
|
98
liblog/tests/Android.bp
Normal file
98
liblog/tests/Android.bp
Normal file
|
@ -0,0 +1,98 @@
|
|||
//
|
||||
// Copyright (C) 2013-2014 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Benchmarks.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Build benchmarks for the device. Run with:
|
||||
// adb shell liblog-benchmarks
|
||||
cc_benchmark {
|
||||
name: "liblog-benchmarks",
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-fno-builtin",
|
||||
],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
"libm",
|
||||
"libbase",
|
||||
],
|
||||
srcs: ["liblog_benchmark.cpp"],
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Unit tests.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
cc_defaults {
|
||||
name: "liblog-tests-defaults",
|
||||
|
||||
cflags: [
|
||||
"-fstack-protector-all",
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-fno-builtin",
|
||||
],
|
||||
srcs: [
|
||||
"libc_test.cpp",
|
||||
"liblog_test_default.cpp",
|
||||
"liblog_test_local.cpp",
|
||||
"liblog_test_stderr.cpp",
|
||||
"liblog_test_stderr_local.cpp",
|
||||
"log_id_test.cpp",
|
||||
"log_radio_test.cpp",
|
||||
"log_read_test.cpp",
|
||||
"log_system_test.cpp",
|
||||
"log_time_test.cpp",
|
||||
"log_wrap_test.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
"libcutils",
|
||||
"libbase",
|
||||
],
|
||||
}
|
||||
|
||||
// Build tests for the device (with .so). Run with:
|
||||
// adb shell /data/nativetest/liblog-unit-tests/liblog-unit-tests
|
||||
cc_test {
|
||||
name: "liblog-unit-tests",
|
||||
defaults: ["liblog-tests-defaults"],
|
||||
}
|
||||
|
||||
cc_test {
|
||||
name: "CtsLiblogTestCases",
|
||||
defaults: ["liblog-tests-defaults"],
|
||||
multilib: {
|
||||
lib32: {
|
||||
suffix: "32",
|
||||
},
|
||||
lib64: {
|
||||
suffix: "64",
|
||||
},
|
||||
},
|
||||
|
||||
cflags: ["-DNO_PSTORE"],
|
||||
test_suites: [
|
||||
"cts",
|
||||
"vts",
|
||||
],
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2013-2014 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Benchmarks.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
test_module_prefix := liblog-
|
||||
test_tags := tests
|
||||
|
||||
benchmark_c_flags := \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Werror \
|
||||
-fno-builtin \
|
||||
|
||||
benchmark_src_files := \
|
||||
liblog_benchmark.cpp
|
||||
|
||||
# Build benchmarks for the device. Run with:
|
||||
# adb shell liblog-benchmarks
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(test_module_prefix)benchmarks
|
||||
LOCAL_MODULE_TAGS := $(test_tags)
|
||||
LOCAL_CFLAGS += $(benchmark_c_flags)
|
||||
LOCAL_SHARED_LIBRARIES += liblog libm libbase
|
||||
LOCAL_SRC_FILES := $(benchmark_src_files)
|
||||
include $(BUILD_NATIVE_BENCHMARK)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Unit tests.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
test_c_flags := \
|
||||
-fstack-protector-all \
|
||||
-g \
|
||||
-Wall -Wextra \
|
||||
-Werror \
|
||||
-fno-builtin \
|
||||
|
||||
cts_src_files := \
|
||||
libc_test.cpp \
|
||||
liblog_test_default.cpp \
|
||||
liblog_test_local.cpp \
|
||||
liblog_test_stderr.cpp \
|
||||
liblog_test_stderr_local.cpp \
|
||||
log_id_test.cpp \
|
||||
log_radio_test.cpp \
|
||||
log_read_test.cpp \
|
||||
log_system_test.cpp \
|
||||
log_time_test.cpp \
|
||||
log_wrap_test.cpp
|
||||
|
||||
test_src_files := \
|
||||
$(cts_src_files) \
|
||||
|
||||
# Build tests for the device (with .so). Run with:
|
||||
# adb shell /data/nativetest/liblog-unit-tests/liblog-unit-tests
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(test_module_prefix)unit-tests
|
||||
LOCAL_MODULE_TAGS := $(test_tags)
|
||||
LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libbase
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
||||
cts_executable := CtsLiblogTestCases
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(cts_executable)
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
LOCAL_CFLAGS += $(test_c_flags) -DNO_PSTORE
|
||||
LOCAL_SRC_FILES := $(cts_src_files)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
|
||||
LOCAL_MULTILIB := both
|
||||
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
|
||||
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libbase
|
||||
LOCAL_STATIC_LIBRARIES := libgtest libgtest_main
|
||||
LOCAL_COMPATIBILITY_SUITE := cts vts
|
||||
LOCAL_CTS_TEST_PACKAGE := android.core.liblog
|
||||
include $(BUILD_CTS_EXECUTABLE)
|
||||
|
||||
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(cts_executable)_list
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := $(test_c_flags) -DHOST
|
||||
LOCAL_C_INCLUDES := external/gtest/include
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
LOCAL_MULTILIB := both
|
||||
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)
|
||||
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
|
||||
LOCAL_CXX_STL := libc++
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libbase
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
LOCAL_LDLIBS_linux := -lrt
|
||||
include $(BUILD_HOST_NATIVE_TEST)
|
||||
|
||||
endif # ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
|
@ -1,3 +0,0 @@
|
|||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(LOCAL_PATH)/tests/Android.mk
|
|
@ -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"],
|
||||
}
|
||||
|
|
|
@ -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)) \
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
# Copyright 2006-2014 The Android Open Source Project
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call first-makefiles-under,$(LOCAL_PATH))
|
59
logcat/tests/Android.bp
Normal file
59
logcat/tests/Android.bp
Normal file
|
@ -0,0 +1,59 @@
|
|||
//
|
||||
// Copyright (C) 2013-2014 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
cc_defaults {
|
||||
name: "logcat-tests-defaults",
|
||||
cflags: [
|
||||
"-fstack-protector-all",
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-fno-builtin",
|
||||
],
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Benchmarks
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Build benchmarks for the device. Run with:
|
||||
// adb shell /data/nativetest/logcat-benchmarks/logcat-benchmarks
|
||||
cc_benchmark {
|
||||
name: "logcat-benchmarks",
|
||||
defaults: ["logcat-tests-defaults"],
|
||||
srcs: ["logcat_benchmark.cpp"],
|
||||
shared_libs: ["libbase"],
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Unit tests.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Build tests for the device (with .so). Run with:
|
||||
// adb shell /data/nativetest/logcat-unit-tests/logcat-unit-tests
|
||||
cc_test {
|
||||
name: "logcat-unit-tests",
|
||||
defaults: ["logcat-tests-defaults"],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
"libbase",
|
||||
],
|
||||
srcs: [
|
||||
"logcat_test.cpp",
|
||||
"logcatd_test.cpp",
|
||||
],
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2013-2014 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
test_module_prefix := logcat-
|
||||
test_tags := tests
|
||||
|
||||
test_c_flags := \
|
||||
-fstack-protector-all \
|
||||
-g \
|
||||
-Wall -Wextra \
|
||||
-Werror \
|
||||
-fno-builtin \
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Benchmarks
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
benchmark_src_files := \
|
||||
logcat_benchmark.cpp \
|
||||
|
||||
# Build benchmarks for the device. Run with:
|
||||
# adb shell /data/nativetest/logcat-benchmarks/logcat-benchmarks
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(test_module_prefix)benchmarks
|
||||
LOCAL_MODULE_TAGS := $(test_tags)
|
||||
LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_SRC_FILES := $(benchmark_src_files)
|
||||
LOCAL_SHARED_LIBRARIES := libbase
|
||||
include $(BUILD_NATIVE_BENCHMARK)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Unit tests.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
test_src_files := \
|
||||
logcat_test.cpp \
|
||||
logcatd_test.cpp \
|
||||
|
||||
# Build tests for the device (with .so). Run with:
|
||||
# adb shell /data/nativetest/logcat-unit-tests/logcat-unit-tests
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(test_module_prefix)unit-tests
|
||||
LOCAL_MODULE_TAGS := $(test_tags)
|
||||
LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_SHARED_LIBRARIES := liblog libbase
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
include $(BUILD_NATIVE_TEST)
|
|
@ -9,5 +9,3 @@ LOCAL_MODULE_TAGS := debug
|
|||
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
|
||||
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(call first-makefiles-under,$(LOCAL_PATH))
|
||||
|
|
68
logd/tests/Android.bp
Normal file
68
logd/tests/Android.bp
Normal file
|
@ -0,0 +1,68 @@
|
|||
//
|
||||
// Copyright (C) 2014 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Unit tests.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
cc_defaults {
|
||||
name: "logd-unit-test-defaults",
|
||||
|
||||
cflags: [
|
||||
"-fstack-protector-all",
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-fno-builtin",
|
||||
|
||||
"-DAUDITD_LOG_TAG=1003",
|
||||
"-DCHATTY_LOG_TAG=1004",
|
||||
],
|
||||
|
||||
srcs: ["logd_test.cpp"],
|
||||
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libcutils",
|
||||
"liblog",
|
||||
"libselinux",
|
||||
],
|
||||
}
|
||||
|
||||
// Build tests for the logger. Run with:
|
||||
// adb shell /data/nativetest/logd-unit-tests/logd-unit-tests
|
||||
cc_test {
|
||||
name: "logd-unit-tests",
|
||||
defaults: ["logd-unit-test-defaults"],
|
||||
}
|
||||
|
||||
cc_test {
|
||||
name: "CtsLogdTestCases",
|
||||
defaults: ["logd-unit-test-defaults"],
|
||||
multilib: {
|
||||
lib32: {
|
||||
suffix: "32",
|
||||
},
|
||||
lib64: {
|
||||
suffix: "64",
|
||||
},
|
||||
},
|
||||
test_suites: [
|
||||
"cts",
|
||||
"vts",
|
||||
],
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2014 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Benchmarks. (see ../../liblog/tests)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
test_module_prefix := logd-
|
||||
test_tags := tests
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Unit tests.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
event_flag := -DAUDITD_LOG_TAG=1003 -DCHATTY_LOG_TAG=1004
|
||||
|
||||
test_c_flags := \
|
||||
-fstack-protector-all \
|
||||
-g \
|
||||
-Wall -Wextra \
|
||||
-Werror \
|
||||
-fno-builtin \
|
||||
$(event_flag)
|
||||
|
||||
test_src_files := \
|
||||
logd_test.cpp
|
||||
|
||||
# Build tests for the logger. Run with:
|
||||
# adb shell /data/nativetest/logd-unit-tests/logd-unit-tests
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(test_module_prefix)unit-tests
|
||||
LOCAL_MODULE_TAGS := $(test_tags)
|
||||
LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_SHARED_LIBRARIES := libbase libcutils liblog libselinux
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
include $(BUILD_NATIVE_TEST)
|
||||
|
||||
cts_executable := CtsLogdTestCases
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(cts_executable)
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
LOCAL_CFLAGS += $(test_c_flags)
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
|
||||
LOCAL_MULTILIB := both
|
||||
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
|
||||
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
|
||||
LOCAL_SHARED_LIBRARIES := libbase libcutils liblog libselinux
|
||||
LOCAL_STATIC_LIBRARIES := libgtest libgtest_main
|
||||
LOCAL_COMPATIBILITY_SUITE := cts vts
|
||||
LOCAL_CTS_TEST_PACKAGE := android.core.logd
|
||||
include $(BUILD_CTS_EXECUTABLE)
|
||||
|
||||
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := $(cts_executable)_list
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_CFLAGS := $(test_c_flags) -DHOST
|
||||
LOCAL_C_INCLUDES := external/gtest/include
|
||||
LOCAL_SRC_FILES := $(test_src_files)
|
||||
LOCAL_MULTILIB := both
|
||||
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)
|
||||
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
|
||||
LOCAL_CXX_STL := libc++
|
||||
LOCAL_SHARED_LIBRARIES := libbase libcutils liblog
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
include $(BUILD_HOST_NATIVE_TEST)
|
||||
|
||||
endif # ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
|
Loading…
Reference in a new issue