mirror of
https://gitee.com/openharmony/xts_hats
synced 2024-11-27 17:12:20 +00:00
!1087 camera&&sensor用例适配
Merge pull request !1087 from dongshaomin/master
This commit is contained in:
commit
60a38134e9
@ -84,6 +84,7 @@ void Test::Init()
|
||||
if (cameraIds.size() == 0) {
|
||||
CAMERA_LOGE("camera device list empty");
|
||||
GTEST_SKIP() << "No Camera Available" << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,8 +241,12 @@ HWTEST_F(CameraHdiTestV1_1, SUB_Driver_Camera_QuickThumbnail_0100, TestSize.Leve
|
||||
EXPECT_NE(data, nullptr);
|
||||
camera_metadata_item_t entry;
|
||||
int ret = FindCameraMetadataItem(data,OHOS_ABILITY_STREAM_QUICK_THUMBNAIL_AVAILABLE, &entry);
|
||||
EXPECT_EQ(ret, CAM_META_SUCCESS);
|
||||
std::cout << "OHOS_ABILITY_STREAM_QUICK_THUMBNAIL_AVAILABLE value is " << static_cast<int>(entry.data.i32[0]) << std::endl;
|
||||
if (ret != CAM_META_SUCCESS) {
|
||||
GTEST_SKIP() << "This function is not supported " << std::endl;
|
||||
return;
|
||||
}
|
||||
std::cout << "OHOS_ABILITY_STREAM_QUICK_THUMBNAIL_AVAILABLE value is"
|
||||
<< static_cast<int>(entry.data.u8[0]) << std::endl;
|
||||
}
|
||||
/**
|
||||
* @tc.name: Quick Thumbnail
|
||||
|
@ -96,6 +96,7 @@ void Test::Init()
|
||||
if (cameraIds.size() == 0) {
|
||||
CAMERA_LOGE("camera device list empty");
|
||||
GTEST_SKIP() << "No Camera Available" << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,6 +97,7 @@ HWTEST_F(HdiStreamUtTestAdditional, testCancelCapture004, Function | MediumTest
|
||||
cameraTest->StartCapture(cameraTest->streamIdPreview, cameraTest->captureIdPreview, true, true);
|
||||
cameraTest->rc = cameraTest->streamOperator->CancelCapture(cameraTest->captureIdPreview);
|
||||
EXPECT_EQ(cameraTest->rc, HDI::Camera::V1_0::NO_ERROR);
|
||||
sleep(1);
|
||||
}
|
||||
cameraTest->rc = cameraTest->streamOperator->ReleaseStreams({cameraTest->streamIdPreview});
|
||||
}
|
||||
|
@ -116,6 +116,11 @@ void HdfSensorHdiTest::TearDownTestCase()
|
||||
|
||||
void HdfSensorHdiTest::SetUp()
|
||||
{
|
||||
if (g_sensorInterface == nullptr) {
|
||||
printf("Sensor list is empty");
|
||||
GTEST_SKIP() << "Device not exist" << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void HdfSensorHdiTest::TearDown()
|
||||
|
Loading…
Reference in New Issue
Block a user