diff options
author | Xusong Wang <xusongw@google.com> | 2022-01-11 14:25:55 -0800 |
---|---|---|
committer | Xusong Wang <xusongw@google.com> | 2022-01-18 10:03:49 -0800 |
commit | 859200800c70a5780931abc8db40b7ade99eef12 (patch) | |
tree | cc0a648354dc642bed9e11901f3439de9ba8e53a /neuralnetworks/aidl/vts/functional/Utils.cpp | |
parent | 571fe74987f7bb37963ade7b3195655667b8ba61 (diff) |
Add VTS tests for reusable execution.
- Modified generated tests and validation tests to exercise reusable
execution.
- Add a scoped trace to print the test config when an error occurs
Bug: 202405342
Bug: 202431255
Test: VtsHalNeuralnetworksTargetTest
Change-Id: I3e2346903e430080ec4d926bf08daf6825ea4dce
Diffstat (limited to 'neuralnetworks/aidl/vts/functional/Utils.cpp')
-rw-r--r-- | neuralnetworks/aidl/vts/functional/Utils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/neuralnetworks/aidl/vts/functional/Utils.cpp b/neuralnetworks/aidl/vts/functional/Utils.cpp index 325a436f79..efd5bca517 100644 --- a/neuralnetworks/aidl/vts/functional/Utils.cpp +++ b/neuralnetworks/aidl/vts/functional/Utils.cpp @@ -177,6 +177,17 @@ std::string gtestCompliantName(std::string name) { return os << toString(errorStatus); } +std::string toString(MemoryType type) { + switch (type) { + case MemoryType::ASHMEM: + return "ASHMEM"; + case MemoryType::BLOB_AHWB: + return "BLOB_AHWB"; + case MemoryType::DEVICE: + return "DEVICE"; + } +} + Request ExecutionContext::createRequest(const TestModel& testModel, MemoryType memoryType) { CHECK(memoryType == MemoryType::ASHMEM || memoryType == MemoryType::BLOB_AHWB); |