Filter keybox tests with GTEST_SKIP

(merged from go/wvgerrit/183630)

Bug: 288404945, 251240681
Test: keybox tests
Change-Id: I38ed2ba54c9f756693902fd7d0044d4e42bbc2fd
This commit is contained in:
Vicky Min
2023-08-28 18:05:47 +00:00
parent ded20371d3
commit fe0ddc8098
6 changed files with 31 additions and 4 deletions

View File

@@ -23,6 +23,9 @@ class OEMCryptoKeyboxTest : public OEMCryptoClientTest {
void SetUp() override {
OEMCryptoClientTest::SetUp();
OEMCryptoResult sts = OEMCrypto_IsKeyboxValid();
if (global_features.provisioning_method != OEMCrypto_Keybox) {
GTEST_SKIP() << "Test for Prov 2.0 devices only.";
}
// If the production keybox is valid, use it for these tests. Most of the
// other tests will use a test keybox anyway, but it's nice to check the
// device ID for the real keybox if we can.
@@ -166,4 +169,4 @@ class OEMCryptoUsesCertificate : public OEMCryptoLoadsCertificate {
} // namespace wvoec
#endif // CDM_OEMCRYPTO_PROVISIONING_TEST_
#endif // CDM_OEMCRYPTO_PROVISIONING_TEST_