Add run_dynamic_oemcrypto_v19 test script

Also removed L3 function pointers to the function headers added in
go/wvgerrit/186010 because they weren't stubbed out and was causing the
new script to fail.

Bug: 293359147
Change-Id: I15606bb636a8bd2637bcf48c421a85d82044762b
This commit is contained in:
Vicky Min
2023-10-18 17:56:15 +00:00
committed by Robert Shih
parent dbab54191b
commit 9e76fdfb5f
2 changed files with 48 additions and 2 deletions

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# This script builds the dynamic adapter, and loads the most recent liboemcrypto.so
# Set up logging and other various functions and environment variables.
source $(dirname $0)/setup_environment
cd $CDM_DIR
if [ "$SKIP_SLOW_TESTS" == "yes" ]; then
# Read the comment in setup_environment for the list of tests that are skipped.
# These tests take a very long time if you are not using a fake clock. We'll
# skip them for a quick run in all the tests below.
echo "SKIP_SLOW_TESTS was set, so filtering out timer tests."
GTEST_FILTER="$GTEST_FILTER:$VERY_LONG_TESTS:$FAKE_SLEEP_TESTS"
else
echo "SKIP_SLOW_TESTS was not set."
fi
# TODO(b/141772232): These tests are flaky on the buildbot.
GTEST_FILTER="$GTEST_FILTER:Repeated/ParallelCdmTest.Parallel*"
# Some buffer overflow tests were failing at the time of the v16 release.
GTEST_FILTER="$GTEST_FILTER:*OEMCryptoMemory*:*Overflow*"
build_cdm_tests dynamic_level1_level3 debug
OLD_OEC=$CDM_DIR/out/old_oemcrypto
mkdir -p $OLD_OEC
run_gyp old_oemcrypto --depth=$CDM_DIR \
--include=$CDM_DIR/cdm/platform_properties.gypi \
--include=$CDM_DIR/platforms/dynamic_level1_level3/settings.gypi \
oemcrypto/testbed/oec_testbed.gyp -Goutput_dir=$OLD_OEC
run_ninja old_oemcrypto -C $OLD_OEC/debug
export LIBOEMCRYPTO_PATH="$OLD_OEC/debug/lib/liboemcrypto_v19.so"
export TESTBED_OPTIONS_FILE="$CDM_DIR/jenkins/options-prov40.txt"
echo "LIBOEMCRYPTO_PATH=$LIBOEMCRYPTO_PATH"
echo "TESTBED_OPTIONS_FILE=$TESTBED_OPTIONS_FILE"
run_cdm_tests dynamic_level1_level3 debug
grep_or_fail "OEMCrypto API version is 19"
grep_or_fail "OEMCrypto Security Level is L1"
# If this exits with 0, then the build succeeds.
exit $FINAL_RESULT

View File

@@ -1153,7 +1153,6 @@ class Adapter {
level3_.Generic_Verify_V17 = Level3_Generic_Verify_V17;
level3_.DeactivateUsageEntry = Level3_DeactivateUsageEntry;
level3_.ReportUsage = Level3_ReportUsage;
level3_GetUsageEntryInfo = Level3_GetUsageEntryInfo;
level3_.GetProvisioningMethod = Level3_GetProvisioningMethod;
level3_.GetOEMPublicCertificate = Level3_GetOEMPublicCertificate;
level3_.SupportedCertificates = Level3_SupportedCertificates;
@@ -1171,7 +1170,6 @@ class Adapter {
level3_.LoadProvisioning_V18 = Level3_LoadProvisioning;
level3_.PrepAndSignProvisioningRequest = Level3_PrepAndSignProvisioningRequest;
level3_.PrepAndSignLicenseRequest = Level3_PrepAndSignLicenseRequest;
level3_.PrepAndSignLicenseRelease = Level3_PrepAndSignLicenseRelease;
level3_.PrepAndSignRenewalRequest = Level3_PrepAndSignRenewalRequest;
level3_.MaximumUsageTableHeaderSize = Level3_MaximumUsageTableHeaderSize;
level3_.AllocateSecureBuffer = Level3_AllocateSecureBuffer;