Log test name

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

Logs the test case and test name when widevine android unit/integration
tests are run.

Bug: 149664134
Test: wv unit/integration tests
Change-Id: I446b88aa2954a386765e4559358d386b1a263913
This commit is contained in:
Rahul Frias
2020-02-16 23:30:26 -08:00
parent d7492082c6
commit ea2e110213
2 changed files with 14 additions and 4 deletions

View File

@@ -268,6 +268,14 @@ void WvCdmTestBase::InstallTestRootOfTrust() {
}
}
WvCdmTestBase::WvCdmTestBase()
: config_(default_config_), binary_provisioning_(false) {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
LOGD("Running test %s.%s", test_info->test_case_name(), test_info->name());
}
void WvCdmTestBase::Provision() {
CdmProvisioningRequest prov_request;
CdmProvisioningRequest binary_prov_request;

View File

@@ -25,10 +25,12 @@ class WvCdmTestBase : public ::testing::Test {
// Default number of provisioning try attempts.
constexpr static size_t kDefaultMaxProvisioningAttempts = 10;
WvCdmTestBase() : config_(default_config_), binary_provisioning_(false) {}
WvCdmTestBase();
~WvCdmTestBase() override {}
void SetUp() override;
virtual std::string binary_key_id() const { return a2bs_hex(config_.key_id()); }
virtual std::string binary_key_id() const {
return a2bs_hex(config_.key_id());
}
// Returns true if the test program should continue, if false, the caller
// should exit. This should be called by main() to allow the user to pass in