Skip Android tests after initialization

Merged from go/wvgerrit/183552

Bug: 297123471
Test: OEMCryptoAndroidLMPTest
Change-Id: I708c285db77616c3060c3a49474cb6b7cd8da6af
This commit is contained in:
Vicky Min
2023-08-24 20:33:32 +00:00
parent bd08acece4
commit a155742b41

View File

@@ -25,11 +25,11 @@ namespace wvoec {
class OEMCryptoAndroidLMPTest : public ::testing::Test {
protected:
void SetUp() override {
OEMCrypto_SetSandbox(kTestSandbox, sizeof(kTestSandbox));
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_Initialize());
if (OEMCrypto_GetProvisioningMethod() == OEMCrypto_BootCertificateChain) {
GTEST_SKIP() << "Test for non Prov 4.0 devices only.";
}
OEMCrypto_SetSandbox(kTestSandbox, sizeof(kTestSandbox));
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_Initialize());
OEMCrypto_SetMaxAPIVersion(kCurrentAPI);
OEMCrypto_EnterTestMode();
}