Merge "Camera: Allow 3% ISO tolerance during ISO burst VTS" into pie-vts-dev

This commit is contained in:
Treehugger Robot 2018-08-30 17:15:35 +00:00 committed by Gerrit Code Review
commit 391eb588cf

View file

@ -3649,6 +3649,7 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) {
static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
uint64_t bufferId = 1;
uint32_t frameNumber = 1;
float isoTol = .03f;
::android::hardware::hidl_vec<uint8_t> settings;
for (const auto& name : cameraDeviceNames) {
@ -3778,7 +3779,8 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) {
ASSERT_TRUE(inflightReqs[i].collectedResult.exists(ANDROID_SENSOR_SENSITIVITY));
camera_metadata_entry_t isoResult = inflightReqs[i].collectedResult.find(
ANDROID_SENSOR_SENSITIVITY);
ASSERT_TRUE(isoResult.data.i32[0] == isoValues[i]);
ASSERT_TRUE(std::abs(isoResult.data.i32[0] - isoValues[i]) <=
std::round(isoValues[i]*isoTol));
}
ret = session->close();