Use GTEST_SKIP to skip prov 3.0 tests
Merge from Widevine repo of http://go/wvgerrit/169068 We want to transition to using GTEST_SKIP to skip unit tests instead of modifying the GTEST_FILTER variable. This does so for provisioning 3.0 tests. Bug: 251240681 Merged from https://widevine-internal-review.googlesource.com/167498 Change-Id: I997e1051f3bd7925bc69cf1b269a5bbbae8031b7
This commit is contained in:
committed by
Fred Gylys-Colwell
parent
d3183f504e
commit
64521717d8
@@ -164,8 +164,6 @@ std::string DeviceFeatures::RestrictFilter(const std::string& initial_filter) {
|
|||||||
if (!cast_receiver) FilterOut(&filter, "*CastReceiver*");
|
if (!cast_receiver) FilterOut(&filter, "*CastReceiver*");
|
||||||
if (!supports_cas) FilterOut(&filter, "*CasOnly*");
|
if (!supports_cas) FilterOut(&filter, "*CasOnly*");
|
||||||
if (derive_key_method == NO_METHOD) FilterOut(&filter, "*SessionTest*");
|
if (derive_key_method == NO_METHOD) FilterOut(&filter, "*SessionTest*");
|
||||||
if (provisioning_method
|
|
||||||
!= OEMCrypto_OEMCertificate) FilterOut(&filter, "*Prov30*");
|
|
||||||
if (provisioning_method != OEMCrypto_BootCertificateChain)
|
if (provisioning_method != OEMCrypto_BootCertificateChain)
|
||||||
FilterOut(&filter, "*Prov40*");
|
FilterOut(&filter, "*Prov40*");
|
||||||
if (!supports_rsa_3072) FilterOut(&filter, "*RSAKey3072*");
|
if (!supports_rsa_3072) FilterOut(&filter, "*RSAKey3072*");
|
||||||
|
|||||||
@@ -768,6 +768,9 @@ TEST_F(OEMCryptoLoadsCertificate, CertificateProvisionBadRange4_API16) {
|
|||||||
// Verify that RewrapDeviceRSAKey checks pointers are within the provisioning
|
// Verify that RewrapDeviceRSAKey checks pointers are within the provisioning
|
||||||
// message.
|
// message.
|
||||||
TEST_F(OEMCryptoLoadsCertificate, CertificateProvisionBadRange5Prov30_API16) {
|
TEST_F(OEMCryptoLoadsCertificate, CertificateProvisionBadRange5Prov30_API16) {
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_OEMCertificate) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 3.0 devices only.";
|
||||||
|
}
|
||||||
Session s;
|
Session s;
|
||||||
ProvisioningRoundTrip provisioning_messages(&s, encoded_rsa_key_);
|
ProvisioningRoundTrip provisioning_messages(&s, encoded_rsa_key_);
|
||||||
provisioning_messages.PrepareSession(keybox_);
|
provisioning_messages.PrepareSession(keybox_);
|
||||||
|
|||||||
@@ -35,7 +35,14 @@ class OEMCryptoKeyboxTest : public OEMCryptoClientTest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This class is for tests that have an OEM Certificate instead of a keybox.
|
// This class is for tests that have an OEM Certificate instead of a keybox.
|
||||||
class OEMCryptoProv30Test : public OEMCryptoClientTest {};
|
class OEMCryptoProv30Test : public OEMCryptoClientTest {
|
||||||
|
void SetUp() override {
|
||||||
|
OEMCryptoClientTest::SetUp();
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_OEMCertificate) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 3.0 devices only.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// This class is for tests that have boot certificate chain instead of a keybox.
|
// This class is for tests that have boot certificate chain instead of a keybox.
|
||||||
class OEMCryptoProv40Test : public OEMCryptoClientTest {};
|
class OEMCryptoProv40Test : public OEMCryptoClientTest {};
|
||||||
|
|||||||
@@ -1739,6 +1739,9 @@ TEST_F(OEMCryptoLoadsCertificate,
|
|||||||
TEST_F(
|
TEST_F(
|
||||||
OEMCryptoLoadsCertificate,
|
OEMCryptoLoadsCertificate,
|
||||||
OEMCryptoMemoryLoadProvisioningForOutOfRangeCoreMessageEncMessageKeyLengthProv30) {
|
OEMCryptoMemoryLoadProvisioningForOutOfRangeCoreMessageEncMessageKeyLengthProv30) {
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_OEMCertificate) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 3.0 devices only.";
|
||||||
|
}
|
||||||
TestLoadProvisioningForOutOfRangeSubstringOffsetAndLengths(
|
TestLoadProvisioningForOutOfRangeSubstringOffsetAndLengths(
|
||||||
[](size_t response_message_length,
|
[](size_t response_message_length,
|
||||||
ProvisioningRoundTrip* provisioning_messages) {
|
ProvisioningRoundTrip* provisioning_messages) {
|
||||||
@@ -1752,6 +1755,9 @@ TEST_F(
|
|||||||
TEST_F(
|
TEST_F(
|
||||||
OEMCryptoLoadsCertificate,
|
OEMCryptoLoadsCertificate,
|
||||||
OEMCryptoMemoryLoadProvisioningForOutOfRangeCoreMessageEncMessageKeyOffsetProv30) {
|
OEMCryptoMemoryLoadProvisioningForOutOfRangeCoreMessageEncMessageKeyOffsetProv30) {
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_OEMCertificate) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 3.0 devices only.";
|
||||||
|
}
|
||||||
TestLoadProvisioningForOutOfRangeSubstringOffsetAndLengths(
|
TestLoadProvisioningForOutOfRangeSubstringOffsetAndLengths(
|
||||||
[](size_t response_message_length,
|
[](size_t response_message_length,
|
||||||
ProvisioningRoundTrip* provisioning_messages) {
|
ProvisioningRoundTrip* provisioning_messages) {
|
||||||
|
|||||||
Reference in New Issue
Block a user