aboutsummaryrefslogtreecommitdiff
path: root/test/1.1/Mean.cpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-04-27 10:15:41 +0100
committerSadik Armagan <sadik.armagan@arm.com>2020-04-27 10:15:41 +0100
commitd46368765369a8058398e01361cd22a7793894dd (patch)
tree87fd3e74f2466c725fcf519c1dfef0e9f731cd81 /test/1.1/Mean.cpp
parent949a69ef997b1d78dca10b4cca833c3e6b3f5436 (diff)
downloadandroid-nn-driver-d46368765369a8058398e01361cd22a7793894dd.tar.gz
IVGCVSW-4692 HAL 1.3 VTS/NNT, Unit test Failures
* Check if the model is prepared. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ia6ea7c5b61a1da97acddddfc5431925cbb4f0227
Diffstat (limited to 'test/1.1/Mean.cpp')
-rw-r--r--test/1.1/Mean.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/1.1/Mean.cpp b/test/1.1/Mean.cpp
index 10ca3aec..b3074909 100644
--- a/test/1.1/Mean.cpp
+++ b/test/1.1/Mean.cpp
@@ -89,8 +89,11 @@ void MeanTestImpl(const TestTensor& input,
android::sp<IMemory> outMemory = AddPoolAndGetData<float>(expectedOutput.GetNumElements(), request);
const float* outputData = static_cast<const float*>(static_cast<void*>(outMemory->getPointer()));
- V1_0::ErrorStatus execStatus = Execute(preparedModel, request);
- BOOST_TEST(execStatus == V1_0::ErrorStatus::NONE);
+ if (preparedModel.get() != nullptr)
+ {
+ V1_0::ErrorStatus execStatus = Execute(preparedModel, request);
+ BOOST_TEST(execStatus == V1_0::ErrorStatus::NONE);
+ }
const float* expectedOutputData = expectedOutput.GetData();
for (unsigned int i = 0; i < expectedOutput.GetNumElements(); i++)