Skip Android tests after initialization

Bug: 297123471
Merged from https://widevine-internal-review.googlesource.com/183551

Change-Id: I742ad6115bb3d4dd3490eb7b18e4f62bfcc1447b
This commit is contained in:
Vicky Min
2023-08-24 20:25:05 +00:00
committed by Robert Shih
parent ab6944dc59
commit 68eb8ee824

View File

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