Merge "Build both AIDL and HIDL targets." into tm-dev

This commit is contained in:
Edwin Wong
2022-03-14 20:31:42 +00:00
committed by Android (Google) Code Review
5 changed files with 61 additions and 10 deletions

View File

@@ -8,10 +8,13 @@ if [ -z "$ANDROID_BUILD_TOP" ]; then
fi
# Read arguments in case the user wants to do a multicore build or
# copy files to a specific android device by providing a serial number
# copy files to a specific android device by providing a serial number.
# The default build target is for AIDL service, use "-t hidl" to
# build for HIDL service.
BUILD_TARGET=""
NUM_CORES=1
SERIAL_NUM=""
while getopts "j:s:" opt; do
while getopts "j:s:t:" opt; do
case $opt in
j)
NUM_CORES=$OPTARG
@@ -19,6 +22,9 @@ while getopts "j:s:" opt; do
s)
SERIAL_NUM="-s $OPTARG"
;;
t)
BUILD_TARGET="BUILD_TARGET=$OPTARG"
;;
esac
done
@@ -74,7 +80,7 @@ WV_TEST_TARGETS="base64_test \
cd $ANDROID_BUILD_TOP
pwd
m -j $NUM_CORES $WV_TEST_TARGETS
m -j $NUM_CORES $WV_TEST_TARGETS $BUILD_TARGET
# Detect the device and check if Verity is going to stop the script from working

View File

@@ -3,6 +3,17 @@
#
include $(CLEAR_VARS)
BUILD_TARGET?=
ifeq ($(BUILD_TARGET), hidl)
$(info Building '$(test_name)' for HIDL service.)
HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
$(info Building '$(test_name)' for AIDL service.)
HIDL_EXTENSION :=
LIB_BINDER := libbinder
endif
LOCAL_LICENSE_CONDITIONS := by_exception_only
LOCAL_LICENSE_KINDS := legacy_by_exception_only
LOCAL_MODULE := cdm_coverage_test
@@ -55,7 +66,7 @@ LOCAL_C_INCLUDES += external/protobuf/src
LOCAL_STATIC_LIBRARIES := \
libcdm \
libcdm_protos \
libcdm_utils_hidl \
libcdm_utils$(HIDL_EXTENSION) \
libjsmn \
libgmock \
libgtest \
@@ -67,7 +78,7 @@ LOCAL_SHARED_LIBRARIES := \
libbase \
libcrypto \
libdl \
libhidlbase \
$(LIB_BINDER) \
liblog \
libmedia_omx \
libprotobuf-cpp-lite \

View File

@@ -6,6 +6,17 @@ $(call assert-not-null,test_name)
include $(CLEAR_VARS)
BUILD_TARGET?=
ifeq ($(BUILD_TARGET), hidl)
$(info Building '$(test_name)' for HIDL service.)
HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
$(info Building '$(test_name)' for AIDL service.)
HIDL_EXTENSION :=
LIB_BINDER := libbinder
endif
LOCAL_MODULE := $(test_name)
LOCAL_LICENSE_KINDS := legacy_by_exception_only
LOCAL_LICENSE_CONDITIONS := by_exception_only
@@ -45,7 +56,7 @@ LOCAL_C_INCLUDES += external/protobuf/src
LOCAL_STATIC_LIBRARIES := \
libcdm \
libcdm_protos \
libcdm_utils_hidl \
libcdm_utils$(HIDL_EXTENSION) \
libjsmn \
libgmock \
libgtest \
@@ -57,7 +68,7 @@ LOCAL_SHARED_LIBRARIES := \
libbase \
libcrypto \
libdl \
libhidlbase \
$(LIB_BINDER) \
liblog \
libmedia_omx \
libprotobuf-cpp-lite \

View File

@@ -6,6 +6,17 @@ $(call assert-not-null,test_name)
include $(CLEAR_VARS)
BUILD_TARGET?=
ifeq ($(BUILD_TARGET), hidl)
$(info Building '$(test_name)' for HIDL service.)
HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
$(info Building '$(test_name)' for AIDL service.)
HIDL_EXTENSION :=
LIB_BINDER := libbinder
endif
LOCAL_MODULE := $(test_name)
LOCAL_LICENSE_KINDS := legacy_by_exception_only
LOCAL_LICENSE_CONDITIONS := by_exception_only
@@ -42,7 +53,7 @@ LOCAL_C_INCLUDES += external/protobuf/src
LOCAL_STATIC_LIBRARIES := \
libcdm \
libcdm_protos \
libcdm_utils_hidl \
libcdm_utils$(HIDL_EXTENSION) \
libjsmn \
libgmock \
libgtest \
@@ -54,6 +65,7 @@ LOCAL_SHARED_LIBRARIES := \
libcrypto \
libdl \
libhidlbase \
$(LIB_BINDER) \
liblog \
libmedia_omx \
libprotobuf-cpp-lite \

View File

@@ -1,5 +1,16 @@
LOCAL_PATH:= $(call my-dir)
BUILD_TARGET?=
ifeq ($(BUILD_TARGET), hidl)
$(info Building 'oemcrypt_test' for HIDL service.)
HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
$(info Building 'oemcrypt_test' for AIDL service.)
HIDL_EXTENSION :=
LIB_BINDER := libbinder
endif
ifeq ($(filter mips mips64, $(TARGET_ARCH)),)
# Tests need to be compatible with devices that do not support gnu hash-style
LOCAL_LDFLAGS+=-Wl,--hash-style=both
@@ -38,7 +49,7 @@ LOCAL_STATIC_LIBRARIES := \
libgtest_main \
libwvlevel3 \
libcdm_protos \
libcdm_utils_hidl \
libcdm_utils$(HIDL_EXTENSION) \
libwv_kdo \
libwv_odk \
@@ -46,7 +57,7 @@ LOCAL_SHARED_LIBRARIES := \
libbase \
libcrypto \
libdl \
libhidlbase \
$(LIB_BINDER) \
liblog \
libmedia_omx \
libprotobuf-cpp-lite \