(This is a merge of wvgerrit/24922) This contains several fixes and improvements to the build_and_run_all_unit_tests.sh and run_all_unit_tests.sh scripts: * All tests are now identified as vendor binaries and thus are stored in the /vendor/bin/ directory instead of /system/bin/. Previously, some tests had moved to /vendor/bin/ but the scripts had not been updated, causing these tests to fail to run. * The -j parameter can now be passed to build_and_run_all_unit_tests.sh, for those who want to speed up their build by using multiple cores. * The 64-bit library directories are now added to the library search path, in anticipation of devices with 64-bit DRM Plugins. * Checking for Verity protection is now done in build_and_run_all_unit_tests.sh (which is the script that actually modifies the file system) instead of just in run_all_unit_tests.sh. * The library search path is no longer set unnecessarily for libwvdrmengine_hidl_test. * The Treble-only tests and non-Treble-only tests now only run on devices that meet their respective criteria. Bug: 36071236 Test: Ran build_and_run_all_unit_tests.sh Change-Id: Iea236880c4445858111c801dfa278a528bca0f6c
60 lines
1.4 KiB
Makefile
60 lines
1.4 KiB
Makefile
# -------------------------------------------------------------------
|
|
# 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/test_printers.cpp \
|
|
../core/test/url_request.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/oemcrypto/include \
|
|
|
|
LOCAL_C_INCLUDES += external/protobuf/src
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
libcdm \
|
|
libcdm_protos \
|
|
libcdm_utils \
|
|
libcrypto_static \
|
|
libjsmn \
|
|
libgmock \
|
|
libgtest \
|
|
libgtest_main \
|
|
libwvlevel3 \
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
libcutils \
|
|
libdl \
|
|
liblog \
|
|
libmedia \
|
|
libprotobuf-cpp-lite \
|
|
libssl \
|
|
libstagefright_foundation \
|
|
libutils \
|
|
|
|
LOCAL_CFLAGS += -DUNIT_TEST
|
|
|
|
LOCAL_MODULE_OWNER := widevine
|
|
|
|
LOCAL_PROPRIETARY_MODULE := true
|
|
|
|
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
|
|
|
|
include $(BUILD_EXECUTABLE)
|