Adjust skipping tests when provisioning skipped
[ Merge of http://go/wvgerrit/194254 ] For some platforms, we cannot provision. In this case, any test that needs provisioning is skipped. However, when a test is skipped in a subroutine, the rest of SetUp is still run. Any failures in SetUp will cause the test to be marked as a failure. This CL duplicates the check for skipping the test in SetUp and in TearDown. Bug: 329467151 Test: WV and unit/integration tests Change-Id: I0087b12a3f26b52ecf62bf7b0e7bcf4fa2c6c763
This commit is contained in:
committed by
Rahul Frias
parent
428586b0eb
commit
38243aca4c
@@ -128,6 +128,12 @@ class CdmDurationTest : public WvCdmTestBaseWithEngine,
|
||||
// appended to it.
|
||||
void SetUp() override {
|
||||
WvCdmTestBase::SetUp();
|
||||
// TODO: b/305093063 - Remove when Drm Reprovisioning server is implemented.
|
||||
if (wvoec::global_features.provisioning_method ==
|
||||
OEMCrypto_DrmReprovisioning) {
|
||||
GTEST_SKIP()
|
||||
<< "Skipping until Drm Reprovisioning server support is implemented.";
|
||||
}
|
||||
EnsureProvisioned();
|
||||
license_holder_.set_can_persist(GetParam());
|
||||
ASSERT_NO_FATAL_FAILURE(license_holder_.OpenSession());
|
||||
@@ -152,6 +158,14 @@ class CdmDurationTest : public WvCdmTestBaseWithEngine,
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
// TODO: b/305093063 - Remove when Drm Reprovisioning server is implemented.
|
||||
if (wvoec::global_features.provisioning_method ==
|
||||
OEMCrypto_DrmReprovisioning) {
|
||||
// Since the session was not opened above. We can skip closing the session
|
||||
// here too. This should be removed when EnsureProvisioning no longer
|
||||
// skips this test.
|
||||
return;
|
||||
}
|
||||
license_holder_.CloseSession();
|
||||
// Log the time used in this test suite. When this comment was written,
|
||||
// these tests took over three hours. If we want to improve that, we need to
|
||||
|
||||
Reference in New Issue
Block a user