Use GTEST_SKIP for generic crypto tests
Bug: 251240681 Merged from https://widevine-internal-review.googlesource.com/180050 Change-Id: I5aebcf10f9c8bad5ff21c22bc882040ecd0b390a
This commit is contained in:
@@ -148,7 +148,6 @@ void DeviceFeatures::Initialize() {
|
||||
std::string DeviceFeatures::RestrictFilter(const std::string& initial_filter) {
|
||||
std::string filter = initial_filter;
|
||||
// clang-format off
|
||||
if (!generic_crypto) FilterOut(&filter, "*GenericCrypto*");
|
||||
if (api_version < 17) FilterOut(&filter, "*API17*");
|
||||
if (api_version < 18) FilterOut(&filter, "*API18*");
|
||||
// clang-format on
|
||||
|
||||
@@ -440,6 +440,9 @@ TEST_P(OEMCryptoUsageTableTest, LoadEntryInMultipleSessions) {
|
||||
|
||||
// Test generic encrypt when the license uses a PST.
|
||||
TEST_P(OEMCryptoUsageTableTest, GenericCryptoEncrypt) {
|
||||
if (!wvoec::global_features.generic_crypto) {
|
||||
GTEST_SKIP() << "Test for devices with generic crypto API only";
|
||||
}
|
||||
LicenseWithUsageEntry entry;
|
||||
entry.license_messages().set_api_version(license_api_version_);
|
||||
entry.set_generic_crypto(true);
|
||||
@@ -479,6 +482,9 @@ TEST_P(OEMCryptoUsageTableTest, GenericCryptoEncrypt) {
|
||||
|
||||
// Test generic decrypt when the license uses a PST.
|
||||
TEST_P(OEMCryptoUsageTableTest, GenericCryptoDecrypt) {
|
||||
if (!wvoec::global_features.generic_crypto) {
|
||||
GTEST_SKIP() << "Test for devices with generic crypto API only";
|
||||
}
|
||||
LicenseWithUsageEntry entry;
|
||||
entry.license_messages().set_api_version(license_api_version_);
|
||||
entry.set_generic_crypto(true);
|
||||
@@ -516,6 +522,9 @@ TEST_P(OEMCryptoUsageTableTest, GenericCryptoDecrypt) {
|
||||
|
||||
// Test generic sign when the license uses a PST.
|
||||
TEST_P(OEMCryptoUsageTableTest, GenericCryptoSign) {
|
||||
if (!wvoec::global_features.generic_crypto) {
|
||||
GTEST_SKIP() << "Test for devices with generic crypto API only";
|
||||
}
|
||||
LicenseWithUsageEntry entry;
|
||||
entry.license_messages().set_api_version(license_api_version_);
|
||||
entry.set_generic_crypto(true);
|
||||
@@ -565,6 +574,9 @@ TEST_P(OEMCryptoUsageTableTest, GenericCryptoSign) {
|
||||
|
||||
// Test generic verify when the license uses a PST.
|
||||
TEST_P(OEMCryptoUsageTableTest, GenericCryptoVerify) {
|
||||
if (!wvoec::global_features.generic_crypto) {
|
||||
GTEST_SKIP() << "Test for devices with generic crypto API only";
|
||||
}
|
||||
LicenseWithUsageEntry entry;
|
||||
entry.license_messages().set_api_version(license_api_version_);
|
||||
entry.set_generic_crypto(true);
|
||||
|
||||
@@ -28,6 +28,9 @@ class OEMCryptoGenericCryptoTest : public OEMCryptoRefreshTest {
|
||||
|
||||
void SetUp() override {
|
||||
OEMCryptoRefreshTest::SetUp();
|
||||
if (!wvoec::global_features.generic_crypto) {
|
||||
GTEST_SKIP() << "Test for devices with generic crypto API only";
|
||||
}
|
||||
ASSERT_NO_FATAL_FAILURE(license_messages_.SignAndVerifyRequest());
|
||||
ASSERT_NO_FATAL_FAILURE(
|
||||
license_messages_.CreateResponseWithGenericCryptoKeys());
|
||||
|
||||
Reference in New Issue
Block a user