diff --git a/libwvdrmengine/run_all_unit_tests.sh b/libwvdrmengine/run_all_unit_tests.sh index cee2d20c..addf9424 100755 --- a/libwvdrmengine/run_all_unit_tests.sh +++ b/libwvdrmengine/run_all_unit_tests.sh @@ -43,6 +43,14 @@ adb_shell_run() { echo "------ Starting: $test_file" local tmp_log="$OUT/mediadrmtest.log" local adb_error="[ADB SHELL] $@ $test_file failed" + # The liboemcrypto.so looks for other shared libraries using the + # LD_LIBRARY_PATH. It is possible that even though the 64-bit liboemcrypto.so + # does not exist, there are 64-bit versions of the shared libraries it tries + # 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 + 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" local result=$?