From 72ad929dc88fafe852ca3670341fac129d5cfaf3 Mon Sep 17 00:00:00 2001 From: Rahul Frias Date: Tue, 27 Feb 2024 11:56:23 -0800 Subject: [PATCH] Add /system/lib[64] to LD_LIBRARY_PATH [ Merge of http://go/wvgerrit/192851 ] When running widevine unit/integration tests the script sets the LD_LIBRARY_PATH to include /vendor/lib[64] and /system/lib[64]/vndk-R so that shared libraries can be found. /system/lib[64] also needs to be included so that libbinder.so and libbinder_ndk.so are also picked up. Bug: 325595891 Test: ./build_and_run_all_tests Change-Id: I411bb98474eb7e65bf9070c029869a9d4d220673 --- libwvdrmengine/run_all_unit_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libwvdrmengine/run_all_unit_tests.sh b/libwvdrmengine/run_all_unit_tests.sh index bb516688..8f0f524b 100755 --- a/libwvdrmengine/run_all_unit_tests.sh +++ b/libwvdrmengine/run_all_unit_tests.sh @@ -27,7 +27,7 @@ elif [ 0 -eq `expr index "$GTEST_FILTER" "-"` ]; then fi # The Android supplement allows for installation in these paths: -OEC_PATHS=/vendor/lib64:/vendor/lib:/system/lib64/vndk-R:/system/lib/vndk-R +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 +49,7 @@ 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=/vendor/lib:/vendor/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"