Update unit tests to build into /data/bin
Tradefed needs these tests to be in the /DATA directory.
Test: cd vendor/widevine && ./build_and_run_all_unit_tests
All tests should build and pass.
make tests
unzip android-tests.zip and verify all tests located in DATA/bin
Bug: 62055647
Change-Id: I35925e29558561c4726bb2249499bfee4e54cf45
This commit is contained in:
@@ -19,10 +19,12 @@ fi
|
||||
adb_shell_run() {
|
||||
local test_file=$1
|
||||
shift
|
||||
if adb shell ls /data/widevine_tests/$test_file &> /dev/null; then
|
||||
test_file=/data/widevine_tests/$test_file
|
||||
if adb shell ls /data/bin/$test_file &> /dev/null; then
|
||||
test_file=/data/bin/$test_file
|
||||
else
|
||||
test_file=/vendor/bin/$test_file
|
||||
echo "Please install the test on the device in /data/bin, "
|
||||
echo "or begin execution by running ./build_and_run_all_unit_tests.sh"
|
||||
exit 1
|
||||
fi
|
||||
echo $test_file
|
||||
local tmp_log="$OUT/mediadrmtest.log"
|
||||
@@ -49,7 +51,7 @@ if [ -z "$ANDROID_BUILD_TOP" ]; then
|
||||
fi
|
||||
|
||||
echo "waiting for device"
|
||||
ADB_OUTPUT=`adb root && adb wait-for-device remount`
|
||||
ADB_OUTPUT=`adb root && echo ". " && adb wait-for-device remount`
|
||||
echo $ADB_OUTPUT
|
||||
if echo $ADB_OUTPUT | grep -qi "verity"; then
|
||||
echo
|
||||
@@ -62,32 +64,40 @@ fi
|
||||
# Disable DroidGuard to prevent provisioning collisions
|
||||
set_droidguard disable
|
||||
|
||||
# Run oemcrypto tests first due to historical test order issues
|
||||
adb_shell_run oemcrypto_test \
|
||||
GTEST_FILTER="$GTEST_FILTER:*Level1Required" FORCE_LEVEL3_OEMCRYPTO=yes
|
||||
adb_shell_run oemcrypto_test
|
||||
|
||||
# Run request_license_test next to ensure device is provisioned
|
||||
adb_shell_run request_license_test
|
||||
|
||||
# cdm_extended_duration_test takes >30 minutes to run.
|
||||
# adb_shell_run cdm_extended_duration_test
|
||||
adb_shell_run policy_engine_unittest
|
||||
adb_shell_run policy_engine_constraints_unittest
|
||||
adb_shell_run libwvdrmmediacrypto_test
|
||||
adb_shell_run libwvdrmmediacrypto_hidl_test
|
||||
adb_shell_run libwvdrmdrmplugin_test
|
||||
adb_shell_run libwvdrmdrmplugin_hidl_test
|
||||
|
||||
# Additional tests
|
||||
adb_shell_run base64_test
|
||||
adb_shell_run buffer_reader_test
|
||||
adb_shell_run cdm_engine_test
|
||||
adb_shell_run cdm_session_unittest
|
||||
adb_shell_run file_store_unittest
|
||||
adb_shell_run file_utils_unittest
|
||||
adb_shell_run license_unittest
|
||||
adb_shell_run license_keys_unittest
|
||||
adb_shell_run initialization_data_unittest
|
||||
adb_shell_run device_files_unittest
|
||||
adb_shell_run usage_table_header_unittest
|
||||
adb_shell_run service_certificate_unittest
|
||||
adb_shell_run timer_unittest
|
||||
adb_shell_run buffer_reader_test
|
||||
adb_shell_run distribution_test
|
||||
adb_shell_run event_metric_test
|
||||
adb_shell_run file_store_unittest
|
||||
adb_shell_run file_utils_unittest
|
||||
adb_shell_run http_socket_test
|
||||
adb_shell_run initialization_data_unittest
|
||||
adb_shell_run libwvdrmdrmplugin_hidl_test
|
||||
adb_shell_run libwvdrmdrmplugin_test
|
||||
adb_shell_run libwvdrmmediacrypto_hidl_test
|
||||
adb_shell_run libwvdrmmediacrypto_test
|
||||
adb_shell_run license_keys_unittest
|
||||
adb_shell_run license_unittest
|
||||
adb_shell_run policy_engine_constraints_unittest
|
||||
adb_shell_run policy_engine_unittest
|
||||
adb_shell_run service_certificate_unittest
|
||||
adb_shell_run timer_unittest
|
||||
adb_shell_run usage_table_header_unittest
|
||||
|
||||
# Run the non-Treble test on non-Treble devices
|
||||
if adb shell ls /vendor/lib/mediadrm/libwvdrmengine.so &> /dev/null ||
|
||||
|
||||
Reference in New Issue
Block a user