Files
android/libwvdrmengine/build_and_run_all_unit_tests.sh
John "Juce" Bruce 0555a7c9de Move Widevine Unit Tests to Standard gMock
(In addition to being a merge of http://go/wvgerrit/17394, this commit
updates tests/Android.mk to no longer try to build the private gMock.)

Previously, we maintained our own version of gMock (named libwvgmock
to avoid naming conflicts) and depended on it for our unit tests. Now
that Android has gMock in the externals/ directory and vaage@ has
eliminated the need for us to customize gMock's arity, we can stop
depending on or maintaining our own copy.

Bug: 26907374
Change-Id: Ia01d6c02e2f28a642480d7ef178b9bc3dde6d306
2016-04-01 14:49:43 -07:00

66 lines
2.0 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
adb push $OUT/system/bin/oemcrypto_test /system/bin
adb push $OUT/system/bin/request_license_test /system/bin
adb push $OUT/system/bin/cdm_extended_duration_test /system/bin
adb push $OUT/system/bin/max_res_engine_unittest /system/bin
adb push $OUT/system/bin/policy_engine_unittest /system/bin
adb push $OUT/system/bin/libwvdrmmediacrypto_test /system/bin
adb push $OUT/system/bin/libwvdrmdrmplugin_test /system/bin
adb push $OUT/system/bin/cdm_engine_test /system/bin
adb push $OUT/system/bin/cdm_session_unittest /system/bin
adb push $OUT/system/bin/file_store_unittest /system/bin
adb push $OUT/system/bin/license_unittest /system/bin
adb push $OUT/system/bin/initialization_data_unittest /system/bin
adb push $OUT/system/bin/device_files_unittest /system/bin
adb push $OUT/system/bin/timer_unittest /system/bin
adb push $OUT/system/bin/libwvdrmengine_test /system/bin
adb push $OUT/system/bin/buffer_reader_test /system/bin
adb push $OUT/system/bin/circular_buffer_test /system/bin
adb push $OUT/system/bin/entry_writer_test /system/bin
adb install -r $OUT/system/app/MediaDrmAPITest/MediaDrmAPITest.apk
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine
./run_all_unit_tests.sh