Files
android/libwvdrmengine/build_and_run_all_unit_tests.sh
Rahul Frias ee5aff7706 Correct setting of service certificate.
[ Merge of http://go/wvgerrit/23380 ]

The service certificate was setup correctly if specified in mediadrm
properties. If instead the service certificate was later fetched from
the license service, it would not be marked as valid. This led to an
infinite loop of service certificate fetches and processing. This
prevented the license from being fetched and playback failures.

b/34638410

Test: Verified by new service certificate unittests + Hulu playback
using fugu.

Change-Id: I2a4f8754614fccdad3c80d3e13fba0b44d177d61
2017-01-27 02:44:38 -08:00

75 lines
2.2 KiB
Bash
Executable File

#!/bin/sh
set -e
if [ -z "$ANDROID_BUILD_TOP" ]; then
echo "Android build environment not set"
exit -1
fi
. $ANDROID_BUILD_TOP/build/envsetup.sh
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine
pwd
mm || mma
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine/test/unit
pwd
mm || mma
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine/cdm/test
pwd
mm || mma
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine/mediacrypto/test
pwd
mm || mma
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine/mediadrm/test
pwd
mm || mma
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine/oemcrypto/test
pwd
mm || mma
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine/test/java/src/com/widevine/test
pwd
mm WITH_DEXPREOPT=false || mma WITH_DEXPREOPT=false
echo "waiting for device"
adb root && adb wait-for-device remount
try_adb_push() {
# Swallow the error message -- assume it is a read-only file system.
if ! adb push $@ /system/bin > /dev/null; then
adb shell mkdir -p /data/widevine_tests
# If this fails, the user will get the error message.
adb push $@ /data/widevine_tests
fi
}
try_adb_push $OUT/system/bin/oemcrypto_test
try_adb_push $OUT/system/bin/request_license_test
try_adb_push $OUT/system/bin/cdm_extended_duration_test
try_adb_push $OUT/system/bin/policy_engine_unittest
try_adb_push $OUT/system/bin/policy_engine_constraints_unittest
try_adb_push $OUT/system/bin/libwvdrmmediacrypto_test
try_adb_push $OUT/system/bin/libwvdrmdrmplugin_test
try_adb_push $OUT/system/bin/cdm_engine_test
try_adb_push $OUT/system/bin/cdm_session_unittest
try_adb_push $OUT/system/bin/file_store_unittest
try_adb_push $OUT/system/bin/file_utils_unittest
try_adb_push $OUT/system/bin/license_unittest
try_adb_push $OUT/system/bin/license_keys_unittest
try_adb_push $OUT/system/bin/initialization_data_unittest
try_adb_push $OUT/system/bin/device_files_unittest
try_adb_push $OUT/system/bin/service_certificate_unittest
try_adb_push $OUT/system/bin/timer_unittest
try_adb_push $OUT/system/bin/libwvdrmengine_test
try_adb_push $OUT/system/bin/buffer_reader_test
adb install -r $OUT/system/app/MediaDrmAPITest/MediaDrmAPITest.apk
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine
./run_all_unit_tests.sh