Annotate logcat with current running test
It's hard to correlate test failures with the tests that were running when looking in the logcat. This change adds the current test name in the log for each test to make it more clear. Merge of go/wvgerrit/#/c/13847/ from the widevine cdm repo b/19822500 Change-Id: Idd37a22f7063d9d686d3ead567954b86fb0fa70f
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include "OEMCryptoCENC.h"
|
#include "OEMCryptoCENC.h"
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "string_conversions.h"
|
#include "string_conversions.h"
|
||||||
|
#include "test_base.h"
|
||||||
#include "url_request.h"
|
#include "url_request.h"
|
||||||
#include "wv_cdm_constants.h"
|
#include "wv_cdm_constants.h"
|
||||||
#include "wv_cdm_event_listener.h"
|
#include "wv_cdm_event_listener.h"
|
||||||
@@ -247,7 +248,7 @@ class TestWvCdmEventListener : public WvCdmEventListener {
|
|||||||
CdmEventType event_type_;
|
CdmEventType event_type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WvCdmExtendedDurationTest : public testing::Test {
|
class WvCdmExtendedDurationTest : public WvCdmTestBase {
|
||||||
public:
|
public:
|
||||||
WvCdmExtendedDurationTest() {}
|
WvCdmExtendedDurationTest() {}
|
||||||
~WvCdmExtendedDurationTest() {}
|
~WvCdmExtendedDurationTest() {}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include "OEMCryptoCENC.h"
|
#include "OEMCryptoCENC.h"
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "string_conversions.h"
|
#include "string_conversions.h"
|
||||||
|
#include "test_base.h"
|
||||||
#include "test_printers.h"
|
#include "test_printers.h"
|
||||||
#include "url_request.h"
|
#include "url_request.h"
|
||||||
#include "wv_cdm_constants.h"
|
#include "wv_cdm_constants.h"
|
||||||
@@ -451,7 +452,7 @@ class TestWvCdmEventListener : public WvCdmEventListener {
|
|||||||
CdmEventType event_type_;
|
CdmEventType event_type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WvCdmRequestLicenseTest : public testing::Test {
|
class WvCdmRequestLicenseTest : public WvCdmTestBase {
|
||||||
public:
|
public:
|
||||||
WvCdmRequestLicenseTest() {}
|
WvCdmRequestLicenseTest() {}
|
||||||
~WvCdmRequestLicenseTest() {}
|
~WvCdmRequestLicenseTest() {}
|
||||||
|
|||||||
19
libwvdrmengine/cdm/test/test_base.h
Normal file
19
libwvdrmengine/cdm/test/test_base.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// Copyright 2015 Google Inc. All Rights Reserved.
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
namespace wvcdm {
|
||||||
|
class WvCdmTestBase : public ::testing::Test {
|
||||||
|
public:
|
||||||
|
WvCdmTestBase() {}
|
||||||
|
virtual ~WvCdmTestBase() {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void SetUp() {
|
||||||
|
const ::testing::TestInfo* const test_info =
|
||||||
|
::testing::UnitTest::GetInstance()->current_test_info();
|
||||||
|
LOGD("Running test %s.%s", test_info->name(),
|
||||||
|
test_info->test_case_name());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} // namespace wvcdm
|
||||||
Reference in New Issue
Block a user