Skip TestGpuNnapi if AHardwareBuffer allocation fails am: e6a5fc57bb am: 2426493071

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/NeuralNetworks/+/15900876

Change-Id: I0be0d9bb4e0921b7a3bc11a0adf182bf99ef86b0
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*>;