1# Copyright (c) 2021 - 2025 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 = "${unittest_output_path}/dcamera_sink_mgr_test" 19 20config("module_private_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr", 24 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/callback", 25 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/interface", 26 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/listener", 27 "${services_path}/cameraservice/cameraoperator/client/include", 28 "${services_path}/cameraservice/cameraoperator/handler/include", 29 "${services_path}/cameraservice/base/include", 30 "${services_path}/channel/include", 31 "${services_path}/data_process/include/pipeline", 32 "${services_path}/data_process/include/interfaces", 33 "${services_path}/data_process/include/utils", 34 "${common_path}/include/constants", 35 "${common_path}/include/utils", 36 "${innerkits_path}/native_cpp/camera_source/include", 37 "${innerkits_path}/native_cpp/camera_source/include/callback", 38 "${innerkits_path}/native_cpp/camera_sink/include/callback", 39 40 "${feeding_smoother_path}/base", 41 "${feeding_smoother_path}/derived", 42 "${feeding_smoother_path}/utils", 43 ] 44} 45 46ohos_unittest("DCameraSinkMgrTest") { 47 sanitize = { 48 cfi = true 49 cfi_cross_dso = true 50 debug = false 51 } 52 module_out_path = module_out_path 53 54 sources = [ 55 "dcamera_sink_access_control_test.cpp", 56 "dcamera_sink_controller_channel_listener_test.cpp", 57 "dcamera_sink_controller_state_callback_test.cpp", 58 "dcamera_sink_controller_test.cpp", 59 "dcamera_sink_data_process_listener_test.cpp", 60 "dcamera_sink_data_process_test.cpp", 61 "dcamera_sink_dev_test.cpp", 62 "dcamera_sink_output_test.cpp", 63 "dcamera_sink_service_ipc_test.cpp", 64 ] 65 66 cflags = [ 67 "-Dprivate=public", 68 "-Dprotected=public", 69 ] 70 71 configs = [ ":module_private_config" ] 72 73 deps = [ 74 "${common_path}:distributed_camera_utils", 75 "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", 76 "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 77 "${services_path}/cameraservice/sinkservice:distributed_camera_sink", 78 "${services_path}/channel:distributed_camera_channel", 79 "${services_path}/data_process:distributed_camera_data_process", 80 ] 81 82 external_deps = [ 83 "access_token:libaccesstoken_sdk", 84 "access_token:libnativetoken_shared", 85 "access_token:libtokensetproc_shared", 86 "av_codec:av_codec_client", 87 "cJSON:cjson", 88 "c_utils:utils", 89 "camera_framework:camera_framework", 90 "device_manager:devicemanagersdk", 91 "distributed_hardware_fwk:distributedhardwareutils", 92 "drivers_interface_camera:metadata", 93 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1", 94 "dsoftbus:softbus_client", 95 "eventhandler:libeventhandler", 96 "graphic_surface:surface", 97 "hilog:libhilog", 98 "ipc:ipc_core", 99 "samgr:samgr_proxy", 100 ] 101 102 defines = [ 103 "HI_LOG_ENABLE", 104 "DH_LOG_TAG=\"DCameraSinkMgrTest\"", 105 "LOG_DOMAIN=0xD004150", 106 ] 107} 108 109group("dcamera_sink_mgr_test") { 110 testonly = true 111 deps = [ ":DCameraSinkMgrTest" ] 112} 113