1# Copyright (c) 2022 - 2024 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/peripheral/distributed_camera/distributedcamera.gni") 17 18module_out_path = 19 "drivers_peripheral_distributed_camera/hdf_dcamera_device_test" 20 21config("module_private_config") { 22 visibility = [ ":*" ] 23 include_dirs = [ 24 "${distributedcamera_hdf_path}/hdi_service/include/dcamera_device", 25 "${distributedcamera_hdf_path}/hdi_service/include/dcamera_host", 26 "${distributedcamera_hdf_path}/hdi_service/include/dcamera_provider", 27 "${distributedcamera_hdf_path}/hdi_service/include/dstream_operator", 28 "${distributedcamera_hdf_path}/hdi_service/include/utils", 29 "${distributedcamera_hdf_path}/interfaces/hdi_ipc", 30 "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/device", 31 "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/host", 32 "${distributedcamera_hdf_path}/interfaces/hdi_ipc/server/operator", 33 ] 34} 35 36ohos_unittest("HdfDcameraDeviceTest") { 37 module_out_path = module_out_path 38 39 sources = [ "dcamera_device_test.cpp" ] 40 41 configs = [ ":module_private_config" ] 42 43 deps = [ "${distributedcamera_hdf_path}/hdi_service:libdistributed_camera_hdf_service_1.1" ] 44 45 external_deps = [ 46 "cJSON:cjson", 47 "c_utils:utils", 48 "drivers_interface_camera:libbuffer_handle_sequenceable_1.0", 49 "drivers_interface_camera:libcamera_proxy_1.0", 50 "drivers_interface_camera:libmap_data_sequenceable_1.0", 51 "drivers_interface_camera:metadata", 52 "drivers_interface_display:libdisplay_composer_hdi_impl_1.2", 53 "drivers_interface_display:libdisplay_composer_proxy_1.0", 54 "drivers_interface_display:libdisplay_composer_stub_1.0", 55 "drivers_interface_distributed_camera:libdistributed_camera_provider_stub_1.1", 56 "graphic_surface:buffer_handle", 57 "graphic_surface:surface", 58 "graphic_surface:sync_fence", 59 "hdf_core:libhdf_host", 60 "hdf_core:libhdf_ipc_adapter", 61 "hdf_core:libhdf_utils", 62 "hdf_core:libhdi", 63 "hilog:libhilog", 64 "ipc:ipc_single", 65 ] 66 67 defines = [ 68 "HI_LOG_ENABLE", 69 "DH_LOG_TAG=\"HdfDcameraDeviceTest\"", 70 "LOG_DOMAIN=0xD004150", 71 ] 72 73 install_images = [ chipset_base_dir ] 74 subsystem_name = "hdf" 75 part_name = "drivers_peripheral_distributed_camera" 76} 77 78group("hdf_dcamera_device_test") { 79 testonly = true 80 deps = [ ":HdfDcameraDeviceTest" ] 81} 82