Files
android/libwvdrmengine/oemcrypto/test/common.mk
Rahul Frias d926fb31ec Address missing dependencies or executables
[ Merge of http://go/wvgerrit/195850 ]

Since Widevine device builds now include APEX prebuilts,
shared library dependencies for the prebuilts are in
are in /apex/com.google.android.widevine/lib[64] rather
than /system/lib[64] or /vendor/lib[64]. When tests are
run not all the dependencies are present.

These changes include
* Statically linking missing dependencies
* Adding /apex/com.google.android.widevine/lib[64] to
  the shared library path
* Searching for some of the test executables in
  /data/nativetest[64]/vendor/

Bug: 329888778
Bug: 329891889
Bug: 329891175
Bug: 329891049

Test: ./build_and_run_all_unit_tests.sh
Change-Id: I067685cedc7701c4e6502bdac98b53e22b61ad1e
2024-05-10 18:17:10 -07:00

75 lines
1.9 KiB
Makefile

LOCAL_PATH:= $(call my-dir)
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
endif
# The unit tests can access v15 functions through the dynamic adapter:
LOCAL_CFLAGS += -DTEST_OEMCRYPTO_V15
LOCAL_SRC_FILES:= \
GEN_api_lock_file.c \
oec_device_features.cpp \
oec_decrypt_fallback_chain.cpp \
oec_key_deriver.cpp \
oec_session_util.cpp \
oemcrypto_corpus_generator_helper.cpp \
oemcrypto_session_tests_helper.cpp \
oemcrypto_basic_test.cpp \
oemcrypto_cast_test.cpp \
oemcrypto_decrypt_test.cpp \
oemcrypto_generic_crypto_test.cpp \
oemcrypto_license_test.cpp \
oemcrypto_provisioning_test.cpp \
oemcrypto_usage_table_test.cpp \
oemcrypto_test.cpp \
oemcrypto_test_android.cpp \
oemcrypto_test_main.cpp \
ota_keybox_test.cpp \
../../cdm/util/test/test_sleep.cpp \
../util/src/bcc_validator.cpp \
../util/src/cbor_validator.cpp \
../util/src/device_info_validator.cpp \
../util/src/oemcrypto_ecc_key.cpp \
../util/src/oemcrypto_rsa_key.cpp \
../util/src/signed_csr_payload_validator.cpp \
../util/src/wvcrc.cpp \
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/fuzz_tests \
$(LOCAL_PATH)/../include \
$(LOCAL_PATH)/../odk/include \
$(LOCAL_PATH)/../odk/kdo/include \
$(LOCAL_PATH)/../ref/src \
$(LOCAL_PATH)/../util/include \
vendor/widevine/libwvdrmengine/cdm/core/include \
vendor/widevine/libwvdrmengine/cdm/util/include \
vendor/widevine/libwvdrmengine/cdm/util/test \
LOCAL_STATIC_LIBRARIES := \
libcdm \
libcppbor \
libjsmn \
libgmock \
libgtest \
libgtest_main \
libwvlevel3 \
libcdm_protos \
libcdm_utils \
libwv_kdo \
libwv_odk \
libPlatformProperties \
LOCAL_SHARED_LIBRARIES := \
libbase \
libcrypto \
libdl \
libbinder_ndk \
liblog \
libmedia_omx \
libprotobuf-cpp-lite \
libstagefright_foundation \
libutils \
libz \