diff options
author | Changyeon Jo <changyeon@google.com> | 2020-12-09 17:32:29 -0800 |
---|---|---|
committer | Changyeon Jo <changyeon@google.com> | 2020-12-09 17:43:12 -0800 |
commit | cf0e945ac2a3014499613cc983e527d66e8cac73 (patch) | |
tree | 17d794df23bed5909122c1d059846fca9a5de4cc | |
parent | 25f8e687ba70d4b1137cb5bff23820021e3245f8 (diff) | |
download | platform_hardware_interfaces-cf0e945ac2a3014499613cc983e527d66e8cac73.tar.gz platform_hardware_interfaces-cf0e945ac2a3014499613cc983e527d66e8cac73.tar.bz2 platform_hardware_interfaces-cf0e945ac2a3014499613cc983e527d66e8cac73.zip |
Correct EVS VTS test case
This change updates CameraOpenClean test case to handle logical camera
devices properly when it attempts to set and get an extended info.
Fix: 175260026
Test: atest VtsHalEvsV1_1TargetTest
Change-Id: Ie18436afa722dd24abcaa1a4e0180955827ee499
-rw-r--r-- | automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp index 948d45ff85..f1c8f9f6c7 100644 --- a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp +++ b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp @@ -305,11 +305,22 @@ TEST_P(EvsHidlTest, CameraOpenClean) { const auto id = 0xFFFFFFFF; // meaningless id hidl_vec<uint8_t> values; auto err = pCam->setExtendedInfo_1_1(id, values); - ASSERT_NE(EvsResult::INVALID_ARG, err); + if (isLogicalCam) { + // Logical camera device does not support setExtendedInfo + // method. + ASSERT_EQ(EvsResult::INVALID_ARG, err); + } else { + ASSERT_NE(EvsResult::INVALID_ARG, err); + } + - pCam->getExtendedInfo_1_1(id, [](const auto& result, const auto& data) { - ASSERT_NE(EvsResult::INVALID_ARG, result); - ASSERT_EQ(0, data.size()); + pCam->getExtendedInfo_1_1(id, [&isLogicalCam](const auto& result, const auto& data) { + if (isLogicalCam) { + ASSERT_EQ(EvsResult::INVALID_ARG, result); + } else { + ASSERT_NE(EvsResult::INVALID_ARG, result); + ASSERT_EQ(0, data.size()); + } }); // Explicitly close the camera so resources are released right away |