Merges to android Pi release (part 4)

These are a set of CLs merged from the wv cdm repo to the android repo.

* Correct RELEASE_ALL_USAGE_INFO_ERRORs

  Author: Rahul Frias <rfrias@google.com>

  [ Merge of http://go/wvgerrit/28742 ]

  RELEASE_ALL_USAGE_INFO_ERROR_4 and 5 were introduced and made use of in
  http://go/wvgerrit/24022 (branch: oc-dev). The error code definitions
  were merged over in http://go/wvgerrit/24602.

  When http://go/wvgerrit/24622 from cdm_partners_3.2 was merged to master
  (http://go/wvgerrit/27723) there was conflict in error codes. The error
  codes were adjusted to RELEASE_ALL_USAGE_INFO_ERROR_3 and 4
  and were made use of.

  To avoid renaming the errors between oc-dev and master, new errors
  RELEASE_ALL_USAGE_INFO_ERROR_6 and 7 have been added to handle the
  scenarios noted in the merge from cdm_partner_3.2. The other
  errors have been reverted back to RELEASE_ALL_USAGE_INFO_ERROR_4 and 5.
  They will be used when http://go/wvgerrit/24602 is merged.

* Address compilation issues

  Author: Rahul Frias <rfrias@google.com>

  [ Merge of http://go/wvgerrit/28740 ]

  These changes enable compilation of most of the cdm code on android
  expect for OEMCrypto unit tests (b/62739406) on wv master.

* Add property for binary/base64 provisioning msgs.

  Author: Gene Morgan <gmorgan@google.com>

  [ Merge of http://go/wvgerrit/28074 ]

  Property is "provisioning_messages_are_binary". Its default setting is
  false in the CE CDM, but it can be overridden by integrators.

  Added section to integration guide that discusses Provisioning Server
  message formats and the new property.

  Link: https://docs.google.com/document/d/1cBVbhgrajLpDe2W3_vzLzUqzpdDt73chvm4_sZlZlS8/edit#heading=h.hgxw53ddw7jo

BUG: 71650075
Test: Not currently passing. Will be addressed in a subsequent
      commit in the chain.

Change-Id: I9168193819974d1ff65d9a94dbd762e45ecc43ca
This commit is contained in:
Rahul Frias
2018-01-09 17:10:23 -08:00
parent 11068accd2
commit 169d0b6cb6
46 changed files with 1260 additions and 741 deletions

View File

@@ -47,7 +47,7 @@ mm -j $NUM_CORES || mma -j $NUM_CORES
# Detect the device and check if Verity is going to stop the script from working
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
@@ -59,42 +59,49 @@ fi
# Push the files to the device
# Given a local path to a file, this will first try to push it to /vendor/bin
# and then, if that fails, to /data/widevine_tests.
# Given a local path to a file, this will try to push it to /data/bin.
# If that fails, an error message will be printed.
try_adb_push() {
# Swallow the error message -- assume it is a read-only file system.
if ! adb push $@ /vendor/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
# android-tests.zip requires /data/bin, we should use the same
if [ -f $OUT/data/bin/$1 ]; then
test_file=$OUT/data/bin/$1
else
echo "I cannot find $1"
echo "I think it should be in $OUT/data/bin"
exit 1
fi
adb shell mkdir -p /data/bin
adb push $test_file /data/bin/$1
}
# Push the tests to the device
try_adb_push $OUT/vendor/bin/oemcrypto_test
try_adb_push $OUT/vendor/bin/request_license_test
try_adb_push $OUT/vendor/bin/cdm_extended_duration_test
try_adb_push $OUT/vendor/bin/policy_engine_unittest
try_adb_push $OUT/vendor/bin/policy_engine_constraints_unittest
try_adb_push $OUT/vendor/bin/libwvdrmmediacrypto_test
try_adb_push $OUT/vendor/bin/libwvdrmmediacrypto_hidl_test
try_adb_push $OUT/vendor/bin/libwvdrmdrmplugin_test
try_adb_push $OUT/vendor/bin/libwvdrmdrmplugin_hidl_test
try_adb_push $OUT/vendor/bin/cdm_engine_test
try_adb_push $OUT/vendor/bin/cdm_session_unittest
try_adb_push $OUT/vendor/bin/file_store_unittest
try_adb_push $OUT/vendor/bin/file_utils_unittest
try_adb_push $OUT/vendor/bin/license_unittest
try_adb_push $OUT/vendor/bin/license_keys_unittest
try_adb_push $OUT/vendor/bin/initialization_data_unittest
try_adb_push $OUT/vendor/bin/device_files_unittest
try_adb_push $OUT/vendor/bin/service_certificate_unittest
try_adb_push $OUT/vendor/bin/timer_unittest
try_adb_push $OUT/vendor/bin/libwvdrmengine_test
try_adb_push $OUT/vendor/bin/libwvdrmengine_hidl_test
try_adb_push $OUT/vendor/bin/buffer_reader_test
try_adb_push $OUT/vendor/bin/distribution_test
try_adb_push $OUT/vendor/bin/event_metric_test
try_adb_push base64_test
try_adb_push buffer_reader_test
try_adb_push cdm_engine_test
try_adb_push cdm_extended_duration_test
try_adb_push cdm_session_unittest
try_adb_push device_files_unittest
try_adb_push distribution_test
try_adb_push event_metric_test
try_adb_push file_store_unittest
try_adb_push file_utils_unittest
try_adb_push http_socket_test
try_adb_push initialization_data_unittest
try_adb_push libwvdrmdrmplugin_hidl_test
try_adb_push libwvdrmdrmplugin_test
try_adb_push libwvdrmengine_hidl_test
try_adb_push libwvdrmengine_test
try_adb_push libwvdrmmediacrypto_hidl_test
try_adb_push libwvdrmmediacrypto_test
try_adb_push license_keys_unittest
try_adb_push license_unittest
try_adb_push oemcrypto_test
try_adb_push policy_engine_constraints_unittest
try_adb_push policy_engine_unittest
try_adb_push request_license_test
try_adb_push service_certificate_unittest
try_adb_push timer_unittest
try_adb_push usage_table_header_unittest
# Run the tests using run_all_unit_tests.sh
cd $ANDROID_BUILD_TOP/vendor/widevine/libwvdrmengine