commit | 834b6a50717b764cd1ef5bb208abbf58c7b4d3bd | [log] [tgz] |
---|---|---|
author | Yahan Zhou <[email protected]> | Tue Sep 28 21:17:31 2021 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Sep 28 21:17:31 2021 +0000 |
tree | ba53eac7fd1d0810b765df589b5b377ca0cb48c3 | |
parent | 7d50b7e6d33e8bcaa605c66cdb732a09aef347b6 [diff] | |
parent | 6e92bd201ca3fe64953a659e2fed922abbaa9ecb [diff] |
Skip TestGpuNnapi if AHardwareBuffer allocation fails am: e6a5fc57bb am: 2426493071 am: 6e92bd201c Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/NeuralNetworks/+/15900876 Change-Id: I6b961a0aa314a3335dc9905762cd2619abbe4c61
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*>;