Update oemcrypto unit tests version number

Merge from Widevine repo of http://go/wvgerrit/169074

And update a few scripts that check for version number.

Merged from https://widevine-internal-review.googlesource.com/167657

Bug: 275264353
Test: luci tests
Change-Id: Ic3c16323e993075c9bfe206fc73bf82c0e67f65b
This commit is contained in:
Fred Gylys-Colwell
2023-03-27 19:41:50 -07:00
parent 8dd8fc5a79
commit 2f45350921
2 changed files with 10 additions and 4 deletions

View File

@@ -147,20 +147,26 @@ TEST_F(OEMCryptoClientTest, FreeUnallocatedSecureBufferNoFailure) {
* Verifies initialization and logs version information.
* This test is first, because it might give an idea why other
* tests are failing when the device has the wrong keybox installed.
*
* The log message should be updated by Widevine with every release so that it
* is easier to verify which version of the tests a partner is running. Widevine
* should change the API version number when the API changes, but the unit tests
* might be updated more frequently, and are only tracked by the date of the
* last change.
*/
TEST_F(OEMCryptoClientTest, VersionNumber) {
const std::string log_message =
"OEMCrypto unit tests for API 18.0. Tests last updated 2022-08-08";
"OEMCrypto unit tests for API 18.1. Tests last updated 2023-03-08";
cout << " " << log_message << "\n";
cout << " "
<< "These tests are part of Android T."
<< "These tests are part of Android U."
<< "\n";
LOGI("%s", log_message.c_str());
// If any of the following fail, then it is time to update the log message
// above.
EXPECT_EQ(ODK_MAJOR_VERSION, 18);
EXPECT_EQ(ODK_MINOR_VERSION, 1);
EXPECT_EQ(kCurrentAPI, 18u);
EXPECT_EQ(kCurrentAPI, static_cast<unsigned>(ODK_MAJOR_VERSION));
OEMCrypto_Security_Level level = OEMCrypto_SecurityLevel();
EXPECT_GT(level, OEMCrypto_Level_Unknown);
EXPECT_LE(level, OEMCrypto_Level3);