commit | 6e92bd201ca3fe64953a659e2fed922abbaa9ecb | [log] [tgz] |
---|---|---|
author | Yahan Zhou <yahan@google.com> | Tue Sep 28 21:02:33 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Sep 28 21:02:33 2021 +0000 |
tree | ba53eac7fd1d0810b765df589b5b377ca0cb48c3 | |
parent | 627387d9e8d82eb06ce5f2d81940618720be6c6c [diff] | |
parent | 2426493071139546c79b990f415abb470302d35c [diff] |
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*>;