From 2f57079f6a63cded22d19a9a997287aee12d6559 Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Sun, 19 Dec 2021 07:24:07 +0000 Subject: [PATCH] Skip OTA test if not supported Merge from Widevine repo of http://go/wvgerrit/142050 This is test only code. Bug: 210690170 Change-Id: Ic982cc1ed801325146918bd6153e7f34faf31196 --- libwvdrmengine/oemcrypto/test/ota_keybox_test.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libwvdrmengine/oemcrypto/test/ota_keybox_test.cpp b/libwvdrmengine/oemcrypto/test/ota_keybox_test.cpp index e7d723af..1ead628d 100644 --- a/libwvdrmengine/oemcrypto/test/ota_keybox_test.cpp +++ b/libwvdrmengine/oemcrypto/test/ota_keybox_test.cpp @@ -184,7 +184,12 @@ TEST_F(OTAKeyboxProvisioningTest, BasicTest) { << "Keybox valid after initialization. Skipping rest of test." << endl; return; } - ASSERT_EQ(result, OEMCrypto_ERROR_NEEDS_KEYBOX_PROVISIONING); + if (result != OEMCrypto_ERROR_NEEDS_KEYBOX_PROVISIONING) { + cout << " " + << "OTA Keybox functions not supported. Skipping rest of test." + << endl; + return; + } cout << " " << "OTA Keybox functions supported. Device needs provisioning." << endl; // TODO(fredgc): Make sure that partners can use a test cert when use_test_key