Separate unit and end-to-end tests from the top level makefie.
The top level makefile will build license_protocol_protos.a, which is needed by libcdm.a. Unit and end-to-end tests are now build separately under cdm/test. Also, the tests use Google C++ Testing Framework, so please build the gtest library from external/gtest and run "mm" once before building the tests. Or just run "mmma vendor/widevine/libwvdrmengine" (or mma in vendor/widevine/libwvdrmengine") once. Change-Id: Iec5a7a974e2f23651191b7325230d9ae3d6b83f2
This commit is contained in:
23
libwvdrmengine/cdm/test/Android.mk
Normal file
23
libwvdrmengine/cdm/test/Android.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
# ----------------------------------------------------------------
|
||||
# Builds CDM Tests
|
||||
#
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
test_name := cdm_engine_test
|
||||
test_src_dir := ../core/test
|
||||
include $(LOCAL_PATH)/unit-test.mk
|
||||
|
||||
test_name := http_socket_test
|
||||
test_src_dir := ../core/test
|
||||
include $(LOCAL_PATH)/unit-test.mk
|
||||
|
||||
test_name := license_unittest
|
||||
test_src_dir := ../core/test
|
||||
include $(LOCAL_PATH)/unit-test.mk
|
||||
|
||||
test_name := request_license_test
|
||||
test_src_dir := .
|
||||
include $(LOCAL_PATH)/unit-test.mk
|
||||
|
||||
test_name :=
|
||||
test_src_dir :=
|
||||
48
libwvdrmengine/cdm/test/unit-test.mk
Normal file
48
libwvdrmengine/cdm/test/unit-test.mk
Normal file
@@ -0,0 +1,48 @@
|
||||
# -------------------------------------------------------------------
|
||||
# Makes a unit or end to end test.
|
||||
# test_name must be passed in as the base filename(without the .cpp).
|
||||
#
|
||||
$(call assert-not-null,test_name)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := $(test_name)
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(test_src_dir)/$(test_name).cpp \
|
||||
../core/test/config_test_env.cpp \
|
||||
../core/test/http_socket.cpp \
|
||||
../core/test/license_request.cpp \
|
||||
../core/test/url_request.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
bionic \
|
||||
external/gtest/include \
|
||||
external/stlport/stlport \
|
||||
vendor/widevine/libwvdrmengine/cdm/core/include \
|
||||
vendor/widevine/libwvdrmengine/cdm/core/test \
|
||||
vendor/widevine/libwvdrmengine/cdm/include
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
external/protobuf/src
|
||||
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(cdm_proto_gen_headers)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libcdm \
|
||||
libgtest \
|
||||
libgtest_main \
|
||||
libprotobuf-cpp-2.3.0-lite
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
license_protocol_protos
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libstlport \
|
||||
libchromium_net \
|
||||
libcrypto \
|
||||
liboemcrypto \
|
||||
libutils
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
Reference in New Issue
Block a user