Snap for 7779164 from 834b6a50717b764cd1ef5bb208abbf58c7b4d3bd to sc-v2-release

Change-Id: I08ffb02b43bb9c129c92d2aa012e852f16154ea5
diff --git a/runtime/test/TestGpuNnapi.cpp b/runtime/test/TestGpuNnapi.cpp
index 61809c4..333d867 100644
--- a/runtime/test/TestGpuNnapi.cpp
+++ b/runtime/test/TestGpuNnapi.cpp
@@ -236,7 +236,9 @@
             .format = AHARDWAREBUFFER_FORMAT_BLOB,
             .usage = usage,
     };
-    ASSERT_EQ(AHardwareBuffer_allocate(&desc, outAhwb), 0);
+    if (AHardwareBuffer_allocate(&desc, outAhwb) != 0) {
+        GTEST_SKIP() << "Device failed to allocate Android hardware buffer";
+    }
 }
 
 using NameAndDevice = std::pair<const char*, const ANeuralNetworksDevice*>;