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
This commit is contained in:
@@ -98,7 +98,11 @@ fi
|
||||
# If that fails, an error message will be printed.
|
||||
try_adb_push() {
|
||||
# android-tests.zip requires /data/nativetest, we should use the same
|
||||
if [ -f $OUT/data/nativetest/$1 ]; then
|
||||
if [ -f $OUT/data/nativetest64/$1 ]; then
|
||||
test_file=$OUT/data/nativetest64/$1
|
||||
elif [ -f $OUT/data/nativetest64/vendor/$1/$1 ]; then
|
||||
test_file=$OUT/data/nativetest64/vendor/$1/$1
|
||||
elif [ -f $OUT/data/nativetest/$1 ]; then
|
||||
test_file=$OUT/data/nativetest/$1
|
||||
elif [ -f $OUT/data/nativetest/vendor/$1/$1 ]; then
|
||||
test_file=$OUT/data/nativetest/vendor/$1/$1
|
||||
|
||||
@@ -25,11 +25,15 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libcdm_protos \
|
||||
libcdm_utils \
|
||||
libjsmn \
|
||||
libjsoncpp \
|
||||
libgmock \
|
||||
libgmock_main \
|
||||
libgtest \
|
||||
libwvaidl \
|
||||
libwvdrmcryptoplugin_aidl \
|
||||
libwvlevel3 \
|
||||
libwv_odk \
|
||||
libPlatformProperties \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
android.hardware.drm-V1-ndk \
|
||||
@@ -41,7 +45,6 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
liblog \
|
||||
libprotobuf-cpp-lite \
|
||||
libutils \
|
||||
libwvaidl \
|
||||
wv_media_drm_flags_c_lib \
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := \
|
||||
|
||||
@@ -22,14 +22,20 @@ LOCAL_C_INCLUDES := \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libcdm \
|
||||
libcdm_utils \
|
||||
libcutils \
|
||||
libcdm_protos \
|
||||
libcdm_utils \
|
||||
libjsmn \
|
||||
libjsoncpp \
|
||||
libgmock \
|
||||
libgmock_main \
|
||||
libgtest \
|
||||
libwvaidl \
|
||||
libwvdrmdrmplugin_aidl \
|
||||
libwvlevel3 \
|
||||
libwv_odk \
|
||||
libPlatformProperties \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
android.hardware.drm-V1-ndk \
|
||||
@@ -40,7 +46,6 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
liblog \
|
||||
libprotobuf-cpp-lite \
|
||||
libutils \
|
||||
libwvaidl \
|
||||
wv_media_drm_flags_c_lib \
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := \
|
||||
@@ -92,6 +97,8 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libgtest \
|
||||
libgtest_main \
|
||||
libjsmn \
|
||||
libwvaidl \
|
||||
libwvdrmdrmplugin_aidl \
|
||||
libwvlevel3 \
|
||||
libwv_odk \
|
||||
|
||||
@@ -101,7 +108,6 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
liblog \
|
||||
libprotobuf-cpp-lite \
|
||||
libutils \
|
||||
libwvaidl \
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
external/protobuf/src \
|
||||
|
||||
@@ -49,6 +49,7 @@ LOCAL_C_INCLUDES += \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libcdm \
|
||||
libcppbor \
|
||||
libjsmn \
|
||||
libgmock \
|
||||
libgtest \
|
||||
@@ -62,7 +63,6 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libbase \
|
||||
libcppbor \
|
||||
libcrypto \
|
||||
libdl \
|
||||
libbinder_ndk \
|
||||
|
||||
@@ -27,7 +27,8 @@ elif [ 0 -eq `expr index "$GTEST_FILTER" "-"` ]; then
|
||||
fi
|
||||
|
||||
# The Android supplement allows for installation in these paths:
|
||||
OEC_PATHS=/system/lib64:/system/lib/:/vendor/lib64:/vendor/lib:/system/lib64/vndk-R:/system/lib/vndk-R
|
||||
OEC_PATHS=/apex/com.google.android.widevine/lib64:/apex/com.google.android.widevine/lib:
|
||||
OEC_PATHS+=/system/lib64:/system/lib/:/vendor/lib64:/vendor/lib:/system/lib64/vndk-R:/system/lib/vndk-R
|
||||
|
||||
# Execute a command in "adb shell" and capture the result.
|
||||
adb_shell_run() {
|
||||
@@ -49,7 +50,8 @@ adb_shell_run() {
|
||||
# to load. We must reverse the library path in this case so we don't attempt
|
||||
# to load 64-bit libraries with the 32-bit liboemcrypto.so.
|
||||
if ! adb $SERIAL_NUM shell ls /vendor/lib64/liboemcrypto.so &> /dev/null; then
|
||||
OEC_PATHS=/system/lib:/system/lib64/:/vendor/lib:/vendor/lib64:/system/lib/vndk-R:/system/lib64/vndk-R
|
||||
OEC_PATHS=/apex/com.google.android.widevine/lib:/apex/com.google.android.widevine/lib64:
|
||||
OEC_PATHS+=/system/lib:/system/lib64/:/vendor/lib:/vendor/lib64:/system/lib/vndk-R:/system/lib64/vndk-R
|
||||
fi
|
||||
adb $SERIAL_NUM shell "LD_LIBRARY_PATH=$OEC_PATHS GTEST_FILTER=$GTEST_FILTER $@ $test_file" \|\| echo "$adb_error" | tee "$tmp_log"
|
||||
! grep -Fq "$adb_error" "$tmp_log"
|
||||
|
||||
@@ -19,18 +19,32 @@ LOCAL_C_INCLUDES := \
|
||||
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libaidlcommonsupport \
|
||||
libgtest \
|
||||
libgtest_main \
|
||||
libjsmn \
|
||||
libjsoncpp \
|
||||
libcdm \
|
||||
libcdm_protos \
|
||||
libcdm_utils \
|
||||
libwvdrmcryptoplugin_aidl \
|
||||
libwvdrmdrmplugin_aidl \
|
||||
libwvlevel3 \
|
||||
libwv_odk \
|
||||
libwvaidl \
|
||||
libPlatformProperties \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
android.hardware.drm-V1-ndk \
|
||||
libbase \
|
||||
libbinder_ndk \
|
||||
libcrypto \
|
||||
libcutils \
|
||||
libdl \
|
||||
liblog \
|
||||
libprotobuf-cpp-lite \
|
||||
libutils \
|
||||
libwvaidl \
|
||||
wv_media_drm_flags_c_lib \
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := \
|
||||
libstagefright_foundation_headers \
|
||||
|
||||
Reference in New Issue
Block a user