Files
android/libwvdrmengine/cdm/test/coverage-test.mk
John "Juce" Bruce 0890fae039 Create test FileSystems in a platform-specific manner
(This is a merge of http://go/wvgerrit/153552.)

The correct way to create a FileSystem object for testing CdmEngine
depends on the platform. However, our code has historically just
instantiated a new FileSystem object using the default constructor. This
works fine for Android and has historically worked fine for the CE CDM
tests because they did not implement storage correctly. However, an
upcoming commit will fix the implementation of storage in the CE CDM
TestHost, causing tests that use a default FileSystem constructor to
fail. This patch adds a new platform-defined function that instantiates
per-origin test storage in a platform-correct way. For Android, it
continues to use the default constructor, while for CE CDM, it uses the
TestHost.

Bug: 193060708
Test: x86-64 w/ storage separated
Test: build_and_run_all_unit_tests.sh
Change-Id: I0a9b6a4d3943e053d51d6018e392b7f215f50642
2022-06-29 18:14:26 -07:00

105 lines
3.1 KiB
Makefile

# ----------------------------------------------------------------
# Builds CDM Coverage Test.
#
include $(CLEAR_VARS)
WV_UNITTESTS_BUILD_TARGET?=
ifeq ($(WV_UNITTESTS_BUILD_TARGET), hidl)
HIDL_EXTENSION := _hidl
LIB_BINDER := libhidlbase
else
HIDL_EXTENSION :=
LIB_BINDER := libbinder_ndk
endif
LOCAL_LICENSE_CONDITIONS := by_exception_only
LOCAL_LICENSE_KINDS := legacy_by_exception_only
LOCAL_MODULE := cdm_coverage_test
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := \
./cdm_coverage_main.cpp \
./create_test_file_system.cpp \
../core/test/buffer_reader_test.cpp \
../core/test/config_test_env.cpp \
../core/test/device_files_unittest.cpp \
../core/test/fake_provisioning_server.cpp \
../core/test/http_socket.cpp \
../core/test/initialization_data_unittest.cpp \
../core/test/license_keys_unittest.cpp \
../core/test/license_request.cpp \
../core/test/service_certificate_unittest.cpp \
../core/test/test_base.cpp \
../core/test/test_printers.cpp \
../core/test/url_request.cpp \
../metrics/test/counter_metric_unittest.cpp \
../metrics/test/distribution_unittest.cpp \
../metrics/test/event_metric_unittest.cpp \
../metrics/test/metrics_collections_unittest.cpp \
../metrics/test/value_metric_unittest.cpp \
../util/test/base64_test.cpp \
../util/test/cdm_random_unittest.cpp \
../util/test/file_store_unittest.cpp \
../util/test/file_utils_unittest.cpp \
../util/test/test_sleep.cpp \
../../oemcrypto/test/oec_device_features.cpp \
../../oemcrypto/test/oec_key_deriver.cpp \
../../oemcrypto/test/oec_session_util.cpp \
../../oemcrypto/util/src/oemcrypto_ecc_key.cpp \
../../oemcrypto/util/src/oemcrypto_rsa_key.cpp \
LOCAL_C_INCLUDES := \
vendor/widevine/libwvdrmengine/android/cdm/test \
vendor/widevine/libwvdrmengine/cdm/core/include \
vendor/widevine/libwvdrmengine/cdm/core/test \
vendor/widevine/libwvdrmengine/cdm/include \
vendor/widevine/libwvdrmengine/cdm/metrics/include \
vendor/widevine/libwvdrmengine/cdm/util/include \
vendor/widevine/libwvdrmengine/cdm/util/test \
vendor/widevine/libwvdrmengine/oemcrypto/include \
vendor/widevine/libwvdrmengine/oemcrypto/test \
vendor/widevine/libwvdrmengine/oemcrypto/test/fuzz_tests \
vendor/widevine/libwvdrmengine/oemcrypto/odk/include \
vendor/widevine/libwvdrmengine/oemcrypto/odk/kdo/include \
vendor/widevine/libwvdrmengine/oemcrypto/util/include \
LOCAL_C_INCLUDES += external/protobuf/src
LOCAL_STATIC_LIBRARIES := \
libcdm \
libcdm_protos \
libcdm_utils$(HIDL_EXTENSION) \
libjsmn \
libgmock \
libgtest \
libwvlevel3 \
libwv_kdo \
libwv_odk \
LOCAL_SHARED_LIBRARIES := \
libbase \
libcrypto \
libdl \
$(LIB_BINDER) \
liblog \
libmedia_omx \
libprotobuf-cpp-lite \
libssl \
libstagefright_foundation \
libutils \
LOCAL_CFLAGS += -DUNIT_TEST
LOCAL_MODULE_OWNER := widevine
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
ifneq ($(TARGET_ENABLE_MEDIADRM_64), true)
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
endif
LOCAL_LICENSE_KINDS := legacy_by_exception_only
LOCAL_LICENSE_CONDITIONS := by_exception_only
include $(BUILD_EXECUTABLE)