1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//build/test.gni") 16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 17import("//drivers/peripheral/distributed_camera/distributedcamera.gni") 18 19module_out_path = 20 "drivers_peripheral_distributed_camera/hdf_dcamera_device_test" 21 22config("module_private_config") { 23 visibility = [ ":*" ] 24 include_dirs = [ 25 "${distributedcamera_hdf_path}/hdi_service/include/dcamera_device", 26 "${distributedcamera_hdf_path}/hdi_service/include/dcamera_host", 27 "${distributedcamera_hdf_path}/hdi_service/include/dcamera_provider", 28 "${distributedcamera_hdf_path}/hdi_service/include/dstream_operator", 29 "${distributedcamera_hdf_path}/hdi_service/include/utils", 30 "${distributedcamera_hdf_path}/interfaces/hdi_ipc", 31 "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/device", 32 "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/host", 33 "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/operator", 34 "${hdf_framework_path}/include/utils", 35 "${hdf_framework_path}/include/core", 36 "${hdf_framework_path}/include/osal", 37 "${hdf_uhdf_path}/include/hdi", 38 "${hdf_uhdf_path}/osal/include", 39 "${hdf_uhdf_path}/ipc/include", 40 "${hdf_uhdf_path}/include/host", 41 "//third_party/jsoncpp/include", 42 "//drivers/peripheral/camera/interfaces/metadata/include", 43 "${camera_hdf_path}/camera/interfaces/include", 44 "${camera_hdf_path}/camera/interfaces/hdi_ipc", 45 ] 46} 47 48ohos_unittest("HdfDcameraDeviceTest") { 49 module_out_path = module_out_path 50 51 sources = [ "dcamera_device_test.cpp" ] 52 53 configs = [ ":module_private_config" ] 54 55 deps = [ 56 "${distributedcamera_hdf_path}/hdi_service:libdistributed_camera_hdf_service_1.0", 57 "//drivers/hdf_core/adapter/uhdf2/ipc:libhdf_ipc_adapter", 58 "//drivers/peripheral/camera/interfaces/metadata:metadata", 59 "//third_party/jsoncpp:jsoncpp", 60 ] 61 62 public_deps = [ "//drivers/interface/distributed_camera/v1_0:libdistributed_camera_provider_stub_1.0" ] 63 64 external_deps = [ 65 "c_utils:utils", 66 "drivers_interface_camera:libcamera_proxy_1.0", 67 "graphic_chipsetsdk:buffer_handle", 68 "graphic_chipsetsdk:surface", 69 "ipc:ipc_single", 70 ] 71 72 defines = [ 73 "HI_LOG_ENABLE", 74 "DH_LOG_TAG=\"HdfDcameraDeviceTest\"", 75 "LOG_DOMAIN=0xD004100", 76 ] 77 78 install_images = [ chipset_base_dir ] 79 subsystem_name = "hdf" 80 part_name = "drivers_peripheral_distributed_camera" 81} 82 83group("hdf_dcamera_device_test") { 84 testonly = true 85 deps = [ ":HdfDcameraDeviceTest" ] 86} 87