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_sink_mgr_test" 19 20config("module_private_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 "${graphicsurface_path}/surface/include", 24 "${camerastandard_path}/interfaces/inner_api/native/camera/include", 25 "${camerastandard_path}/interfaces/inner_api/native/camera/include/input", 26 "${camerastandard_path}/interfaces/inner_api/native/camera/include/output", 27 "${camerastandard_path}/interfaces/inner_api/native/camera/include/session", 28 "${camerastandard_path}/services/camera_service/binder/base/include", 29 "${camerastandard_path}/services/camera_service/binder/client/include", 30 "${camerastandard_path}/services/camera_service/binder/server/include", 31 "${camerastandard_path}/services/camera_service/include", 32 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr", 33 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/callback", 34 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus", 35 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/interface", 36 "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/listener", 37 "${services_path}/cameraservice/cameraoperator/client/include", 38 "${services_path}/cameraservice/cameraoperator/handler/include", 39 "${services_path}/cameraservice/base/include", 40 "${services_path}/channel/include", 41 "${services_path}/data_process/include/pipeline", 42 "${services_path}/data_process/include/interfaces", 43 "${services_path}/data_process/include/utils", 44 "${common_path}/include/constants", 45 "${common_path}/include/utils", 46 "${innerkits_path}/native_cpp/camera_source/include", 47 "${innerkits_path}/native_cpp/camera_source/include/callback", 48 "${innerkits_path}/native_cpp/camera_sink/include/callback", 49 50 "${fwk_common_path}/utils/include", 51 "${fwk_utils_path}/include/eventbus", 52 "${feeding_smoother_path}/base", 53 "${feeding_smoother_path}/derived", 54 "${feeding_smoother_path}/utils", 55 ] 56} 57 58ohos_unittest("DCameraSinkMgrTest") { 59 sanitize = { 60 cfi = true 61 cfi_cross_dso = true 62 debug = false 63 } 64 module_out_path = module_out_path 65 66 sources = [ 67 "dcamera_sink_access_control_test.cpp", 68 "dcamera_sink_controller_test.cpp", 69 "dcamera_sink_data_process_test.cpp", 70 "dcamera_sink_dev_test.cpp", 71 "dcamera_sink_output_test.cpp", 72 "dcamera_sink_service_ipc_test.cpp", 73 "eventbus/dcamera_frame_trigger_event_test.cpp", 74 "eventbus/dcamera_photo_output_event_test.cpp", 75 "eventbus/dcamera_post_authorization_event_test.cpp", 76 "eventbus/dcamera_video_output_event_test.cpp", 77 ] 78 79 configs = [ ":module_private_config" ] 80 81 deps = [ 82 "${camerastandard_path}/frameworks/native/camera:camera_framework", 83 "${common_path}:distributed_camera_utils", 84 "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk", 85 "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler", 86 "${services_path}/cameraservice/sinkservice:distributed_camera_sink", 87 "${services_path}/channel:distributed_camera_channel", 88 "//third_party/cJSON:cjson", 89 "//third_party/jsoncpp:jsoncpp", 90 ] 91 92 external_deps = [ 93 "access_token:libaccesstoken_sdk", 94 "access_token:libnativetoken", 95 "access_token:libtoken_setproc", 96 "av_codec:av_codec_client", 97 "c_utils:utils", 98 "device_manager:devicemanagersdk", 99 "drivers_interface_camera:metadata", 100 "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.0", 101 "drivers_peripheral_display:hdi_gralloc_client", 102 "dsoftbus:softbus_client", 103 "eventhandler:libeventhandler", 104 "graphic_surface:surface", 105 "ipc:ipc_core", 106 ] 107 108 defines = [ 109 "HI_LOG_ENABLE", 110 "DH_LOG_TAG=\"DCameraSinkMgrTest\"", 111 "LOG_DOMAIN=0xD004150", 112 ] 113} 114 115group("dcamera_sink_mgr_test") { 116 testonly = true 117 deps = [ ":DCameraSinkMgrTest" ] 118} 119