Disable DroidGuard during unit tests
This aligns our test script with the functionality found in our TF test configuration for preventing concurrency issues with DroidGuard. Matching Widevine cl: go/wvgerrit/16791 Change-Id: Icc891de0a5f3795d8582b21e1bcf734049ddbf42
This commit is contained in:
@@ -28,6 +28,13 @@ adb_shell_run() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Use Package Manager (via adb shell) to enable or disable DroidGuard.
|
||||||
|
# Disabling DroidGuard during the test run prevents concurrency issues
|
||||||
|
# with provisioning status.
|
||||||
|
set_droidguard() {
|
||||||
|
adb shell pm $1 com.google.android.gms/com.google.android.gms.droidguard.DroidGuardService
|
||||||
|
}
|
||||||
|
|
||||||
if [ -z "$ANDROID_BUILD_TOP" ]; then
|
if [ -z "$ANDROID_BUILD_TOP" ]; then
|
||||||
echo "Android build environment not set"
|
echo "Android build environment not set"
|
||||||
exit -1
|
exit -1
|
||||||
@@ -44,6 +51,9 @@ if echo $ADB_OUTPUT | grep -qi "verity"; then
|
|||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable DroidGuard to prevent provisioning collisions
|
||||||
|
set_droidguard disable
|
||||||
|
|
||||||
adb_shell_run GTEST_FILTER="$GTEST_FILTER:*Level1Required" FORCE_LEVEL3_OEMCRYPTO=yes \
|
adb_shell_run GTEST_FILTER="$GTEST_FILTER:*Level1Required" FORCE_LEVEL3_OEMCRYPTO=yes \
|
||||||
/system/bin/oemcrypto_test
|
/system/bin/oemcrypto_test
|
||||||
adb_shell_run /system/bin/oemcrypto_test
|
adb_shell_run /system/bin/oemcrypto_test
|
||||||
@@ -68,6 +78,9 @@ adb_shell_run /system/bin/entry_writer_test
|
|||||||
library_path="/system/vendor/lib/mediadrm/ "
|
library_path="/system/vendor/lib/mediadrm/ "
|
||||||
adb_shell_run LD_LIBRARY_PATH=$library_path /system/bin/libwvdrmengine_test
|
adb_shell_run LD_LIBRARY_PATH=$library_path /system/bin/libwvdrmengine_test
|
||||||
|
|
||||||
|
# Re-enable DroidGuard
|
||||||
|
set_droidguard enable
|
||||||
|
|
||||||
adb_shell_run am start com.widevine.test/com.widevine.test.MediaDrmAPITest
|
adb_shell_run am start com.widevine.test/com.widevine.test.MediaDrmAPITest
|
||||||
if [ $final_result -eq 0 ]; then
|
if [ $final_result -eq 0 ]; then
|
||||||
echo "MediaDrm unittests completed successfully!"
|
echo "MediaDrm unittests completed successfully!"
|
||||||
|
|||||||
Reference in New Issue
Block a user