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_test"
19
20config("module_private_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "${common_path}/include/constants",
25    "${common_path}/include/utils",
26    "${innerkits_path}/native_cpp/camera_sink/include",
27    "${innerkits_path}/native_cpp/camera_sink/include/callback",
28    "${services_path}/cameraservice/base/include",
29    "${services_path}/cameraservice/cameraoperator/client/include",
30    "${services_path}/cameraservice/cameraoperator/handler/include",
31    "${services_path}/cameraservice/sinkservice/include/distributedcamera",
32    "${services_path}/cameraservice/sinkservice/include/distributedcameramgr",
33    "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/interface",
34    "${services_path}/cameraservice/sinkservice/include/distributedcameramgr/eventbus",
35    "${services_path}/data_process/include/eventbus",
36    "${services_path}/channel/include",
37    "${feeding_smoother_path}/base",
38  ]
39}
40
41ohos_unittest("DistributedCameraSinkServiceTest") {
42  sanitize = {
43    cfi = true
44    cfi_cross_dso = true
45    debug = false
46  }
47  module_out_path = module_out_path
48
49  sources = [
50    "dcamera_sink_callback_proxy_test.cpp",
51    "dcamera_sink_hidumper_test.cpp",
52    "distributed_camera_sink_service_test.cpp",
53    "distributed_camera_sink_stub_test.cpp",
54  ]
55
56  configs = [ ":module_private_config" ]
57
58  deps = [
59    "${common_path}:distributed_camera_utils",
60    "${innerkits_path}/native_cpp/camera_sink:distributed_camera_sink_sdk",
61    "${services_path}/cameraservice/cameraoperator/handler:distributed_camera_handler",
62    "${services_path}/cameraservice/sinkservice:distributed_camera_sink",
63  ]
64
65  external_deps = [
66    "access_token:libaccesstoken_sdk",
67    "access_token:libnativetoken_shared",
68    "access_token:libtokensetproc_shared",
69    "cJSON:cjson",
70    "c_utils:utils",
71    "camera_framework:camera_framework",
72    "distributed_hardware_fwk:distributedhardwareutils",
73    "drivers_interface_camera:metadata",
74    "drivers_interface_distributed_camera:libdistributed_camera_provider_proxy_1.1",
75    "drivers_peripheral_display:hdi_gralloc_client",
76    "dsoftbus:softbus_client",
77    "eventhandler:libeventhandler",
78    "graphic_surface:surface",
79    "hilog:libhilog",
80    "ipc:ipc_core",
81    "safwk:system_ability_fwk",
82    "samgr:samgr_proxy",
83  ]
84
85  defines = [
86    "HI_LOG_ENABLE",
87    "DH_LOG_TAG=\"DCameraSinkServiceTest\"",
88    "LOG_DOMAIN=0xD004150",
89  ]
90}
91
92group("dcamera_sink_test") {
93  testonly = true
94  deps = [ ":DistributedCameraSinkServiceTest" ]
95}
96