1# Copyright (c) 2021-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/test.gni") 15import( 16 "//foundation/distributedhardware/distributed_camera/distributedcamera.gni") 17 18module_out_path = "distributed_camera/dcamera_source_mgr_test" 19 20config("module_private_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 "${services_path}/cameraservice/sourceservice/include/distributedcamera", 24 "${services_path}/cameraservice/sourceservice/include/distributedcameramgr", 25 "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcameracontrol", 26 "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcameradata", 27 "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerahdf", 28 "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerainterface", 29 "${services_path}/cameraservice/sourceservice/include/distributedcameramgr/dcamerastate", 30 "${services_path}/cameraservice/cameraoperator/client/include", 31 "${services_path}/cameraservice/base/include", 32 "${services_path}/channel/include", 33 "${services_path}/data_process/include/pipeline", 34 "${services_path}/data_process/include/interfaces", 35 "${services_path}/data_process/include/utils", 36 "${services_path}/data_process/include/eventbus", 37 "${common_path}/include/constants", 38 "${common_path}/include/utils", 39 40 "${innerkits_path}/native_cpp/camera_source/include", 41 "${innerkits_path}/native_cpp/camera_source/include/callback", 42 "${innerkits_path}/native_cpp/camera_sink/include", 43 "${innerkits_path}/native_cpp/camera_sink/include/callback", 44 45 "${feeding_smoother_path}", 46 "${feeding_smoother_path}/base", 47 "${feeding_smoother_path}/derived", 48 "${feeding_smoother_path}/utils", 49 ] 50} 51 52ohos_unittest("DCameraSourceMgrTest") { 53 sanitize = { 54 cfi = true 55 cfi_cross_dso = true 56 debug = false 57 } 58 module_out_path = module_out_path 59 60 sources = [ 61 "dcamera_feeding_smoother_test.cpp", 62 "dcamera_hdf_operate_test.cpp", 63 "dcamera_provider_callback_impl_test.cpp", 64 "dcamera_source_config_stream_state_test.cpp", 65 "dcamera_source_controller_test.cpp", 66 "dcamera_source_data_process_test.cpp", 67 "dcamera_source_dev_test.cpp", 68 "dcamera_source_input_channel_listener_test.cpp", 69 "dcamera_source_input_test.cpp", 70 "dcamera_source_service_ipc_test.cpp", 71 "dcamera_source_state_machine_test.cpp", 72 "dcamera_stream_data_process_producer_test.cpp", 73 "dcamera_stream_data_process_test.cpp", 74 ] 75 76 configs = [ ":module_private_config" ] 77 78 deps = [ 79 "${common_path}:distributed_camera_utils", 80 "${services_path}/cameraservice/sourceservice:distributed_camera_source", 81 "${services_path}/channel:distributed_camera_channel", 82 "${services_path}/data_process:distributed_camera_data_process", 83 ] 84 85 external_deps = [ 86 "access_token:libaccesstoken_sdk", 87 "access_token:libnativetoken_shared", 88 "access_token:libtokensetproc_shared", 89 "cJSON:cjson", 90 "c_utils:utils", 91 "distributed_hardware_fwk:distributedhardwareutils", 92 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", 93 "dsoftbus:softbus_client", 94 "eventhandler:libeventhandler", 95 "graphic_surface:surface", 96 "hdf_core:libhdi", 97 "hilog:libhilog", 98 "ipc:ipc_core", 99 "samgr:samgr_proxy", 100 ] 101 102 defines = [ 103 "HI_LOG_ENABLE", 104 "DH_LOG_TAG=\"DCameraSourceMgrTest\"", 105 "LOG_DOMAIN=0xD004150", 106 ] 107} 108 109group("dcamera_source_mgr_test") { 110 testonly = true 111 deps = [ ":DCameraSourceMgrTest" ] 112} 113