Source release 19.4.0
This commit is contained in:
@@ -53,6 +53,18 @@ using video_widevine::SignedMessage;
|
||||
|
||||
namespace {
|
||||
|
||||
const std::string kBuildInfoFields[] = {
|
||||
"platform_version",
|
||||
"platform",
|
||||
"form_factor",
|
||||
"arch_name",
|
||||
"cdm_version",
|
||||
"compiler_detected_arch_name",
|
||||
"logging_enabled_message",
|
||||
"build_flavor",
|
||||
};
|
||||
const std::string kBuildInfoDelimiter = " | ";
|
||||
|
||||
const int kHttpOk = 200;
|
||||
|
||||
const int kRenewalTestDelayMs = 3 * 60 * 1000;
|
||||
@@ -526,6 +538,10 @@ class CdmTest : public WvCdmTestBase, public Cdm::IEventListener {
|
||||
return Cdm::kQuotaExceeded;
|
||||
}
|
||||
|
||||
void RecordWvProperty(const std::string& key, const std::string& value) {
|
||||
RecordProperty("widevine_metadata_cdm_" + key, value);
|
||||
}
|
||||
|
||||
std::unique_ptr<Cdm> cdm_;
|
||||
};
|
||||
|
||||
@@ -618,22 +634,45 @@ TEST_F(CdmTest, PrintClientInformation) {
|
||||
const time_t c_now =
|
||||
std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||
cout << "CE CDM Unit Tests for version " CDM_VERSION << endl;
|
||||
RecordWvProperty("test_version", CDM_VERSION);
|
||||
cout << "Tests run at " << std::put_time(localtime(&c_now), "%F %T %Z")
|
||||
<< endl;
|
||||
|
||||
// Collect CDM info
|
||||
Cdm::ClientInfo client_info;
|
||||
ASSERT_EQ(Cdm::getClientInfo(&client_info), Cdm::kSuccess);
|
||||
const char* const version = Cdm::version();
|
||||
|
||||
cout << endl << "CDM Information:" << endl;
|
||||
cout << " CDM Version = " << Cdm::version() << endl;
|
||||
cout << " CDM Version = " << version << endl;
|
||||
RecordWvProperty("version", version);
|
||||
cout << " Company Name = " << client_info.company_name << endl;
|
||||
RecordWvProperty("company_name", client_info.company_name);
|
||||
cout << " Model Name = " << client_info.model_name << endl;
|
||||
RecordWvProperty("model_name", client_info.model_name);
|
||||
cout << " Model Year = " << client_info.model_year << endl;
|
||||
RecordWvProperty("model_year", client_info.model_year);
|
||||
cout << " Device Name = " << client_info.device_name << endl;
|
||||
RecordWvProperty("device_name", client_info.device_name);
|
||||
cout << " Product Name = " << client_info.product_name << endl;
|
||||
RecordWvProperty("product_name", client_info.product_name);
|
||||
cout << " Arch Name = " << client_info.arch_name << endl;
|
||||
RecordWvProperty("arch_name", client_info.arch_name);
|
||||
cout << " Build Info = " << client_info.build_info << endl;
|
||||
RecordWvProperty("build_info", client_info.build_info);
|
||||
|
||||
// Parse out and log the pieces of the build info
|
||||
size_t start = 0;
|
||||
for (const std::string& field : kBuildInfoFields) {
|
||||
ASSERT_LT(start, client_info.build_info.size());
|
||||
size_t end = client_info.build_info.find(kBuildInfoDelimiter, start);
|
||||
if (end == std::string::npos) end = client_info.build_info.size();
|
||||
const std::string value = client_info.build_info.substr(start, end - start);
|
||||
EXPECT_FALSE(value.empty());
|
||||
RecordWvProperty("build_info_" + field, value);
|
||||
start = end + kBuildInfoDelimiter.length();
|
||||
}
|
||||
ASSERT_GE(start, client_info.build_info.size());
|
||||
|
||||
// Collect OEMCrypto info
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_Initialize());
|
||||
@@ -659,6 +698,8 @@ TEST_F(CdmTest, PrintClientInformation) {
|
||||
std::string oec_build_info;
|
||||
EXPECT_EQ(cdm_->getOemCryptoBuildInfo(&oec_build_info), Cdm::kSuccess);
|
||||
|
||||
// We don't log the OEMCrypto info through RecordProperty() because the
|
||||
// OEMCrypto tests are responsible for that.
|
||||
cout << endl << "OEMCrypto Information:" << endl;
|
||||
cout << " OEMCrypto Version = " << oec_major << "." << oec_minor << endl;
|
||||
cout << " Robustness Level = " << describe(robustness_level) << endl;
|
||||
|
||||
Reference in New Issue
Block a user