Build both AIDL and HIDL targets.

Merged from http://go/wvgerrit/147689

The default is to build for AIDL Widevine service.
Use "-t hidl" in build_and_run_all_unit_tests.sh or
build_all_unit_tests.sh to build for HIDL service.

Test: ./build_all_unit_tests -t hidl
Test: ./build_and_run_all_unit_tests -t hidl
Test: ./build_all_unit_tests
Test: ./build_and_run_all_unit_tests

Bug: 217247987
Change-Id: Ie7c51033f4aba341c829ccc8f846a6cfeab76df3
This commit is contained in:
Edwin
2022-03-10 08:44:43 -08:00
parent f2384c1b22
commit 77f1fedde2
5 changed files with 61 additions and 10 deletions

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 \