Filter keybox tests with GTEST_SKIP
Bug: 288404945, 251240681 Merged from https://widevine-internal-review.googlesource.com/183630 Merged from https://widevine-internal-review.googlesource.com/183730 Change-Id: I9f6a4045f9b554589e25338accecb0d338fad5ce
This commit is contained in:
@@ -28,6 +28,9 @@ class CdmOtaKeyboxTest : public ::testing::Test {
|
|||||||
}
|
}
|
||||||
::testing::Test::SetUp();
|
::testing::Test::SetUp();
|
||||||
Properties::Init();
|
Properties::Init();
|
||||||
|
if (wvoec::global_features.provisioning_method != OEMCrypto_Keybox) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 2.0 devices only.";
|
||||||
|
}
|
||||||
const ::testing::TestInfo* const test_info =
|
const ::testing::TestInfo* const test_info =
|
||||||
::testing::UnitTest::GetInstance()->current_test_info();
|
::testing::UnitTest::GetInstance()->current_test_info();
|
||||||
LOGD("Running test %s.%s", test_info->test_case_name(), test_info->name());
|
LOGD("Running test %s.%s", test_info->test_case_name(), test_info->name());
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ class OEMCryptoAndroidLMPTest : public ::testing::Test {
|
|||||||
|
|
||||||
// Android devices must have a keybox, or use provisioning 3.0.
|
// Android devices must have a keybox, or use provisioning 3.0.
|
||||||
TEST_F(OEMCryptoAndroidLMPTest, GetKeyDataImplemented) {
|
TEST_F(OEMCryptoAndroidLMPTest, GetKeyDataImplemented) {
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_Keybox &&
|
||||||
|
global_features.provisioning_method != OEMCrypto_OEMCertificate) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 2.0 and 3.0 devices only.";
|
||||||
|
}
|
||||||
uint8_t key_data[256];
|
uint8_t key_data[256];
|
||||||
size_t key_data_len = sizeof(key_data);
|
size_t key_data_len = sizeof(key_data);
|
||||||
if (OEMCrypto_Keybox == OEMCrypto_GetProvisioningMethod()) {
|
if (OEMCrypto_Keybox == OEMCrypto_GetProvisioningMethod()) {
|
||||||
@@ -59,6 +63,9 @@ TEST_F(OEMCryptoAndroidLMPTest, MinVersionNumber9) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(OEMCryptoAndroidLMPTest, ValidKeyboxTest) {
|
TEST_F(OEMCryptoAndroidLMPTest, ValidKeyboxTest) {
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_Keybox) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 2.0 devices only.";
|
||||||
|
}
|
||||||
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_IsKeyboxValid());
|
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_IsKeyboxValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,6 +119,9 @@ TEST_F(OEMCryptoAndroidMNCTest, MinVersionNumber10) {
|
|||||||
// Android devices using Provisioning 2.0 must be able to load a test keybox.
|
// Android devices using Provisioning 2.0 must be able to load a test keybox.
|
||||||
// If they are not using Provisioning 2.0, then they must use Provisioning 3.0.
|
// If they are not using Provisioning 2.0, then they must use Provisioning 3.0.
|
||||||
TEST_F(OEMCryptoAndroidMNCTest, LoadsTestKeyboxImplemented) {
|
TEST_F(OEMCryptoAndroidMNCTest, LoadsTestKeyboxImplemented) {
|
||||||
|
if (global_features.provisioning_method != OEMCrypto_Keybox) {
|
||||||
|
GTEST_SKIP() << "Test for Prov 2.0 devices only.";
|
||||||
|
}
|
||||||
if (OEMCrypto_Keybox == OEMCrypto_GetProvisioningMethod()) {
|
if (OEMCrypto_Keybox == OEMCrypto_GetProvisioningMethod()) {
|
||||||
ASSERT_EQ(
|
ASSERT_EQ(
|
||||||
OEMCrypto_SUCCESS,
|
OEMCrypto_SUCCESS,
|
||||||
|
|||||||
Reference in New Issue
Block a user