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.
13import("//build/test.gni")
14import("//foundation/filemanagement/dfs_service/distributedfile.gni")
15
16module_output_path = "storage_distributed_file_manager/distributedfiledaemon"
17
18config("module_private_config") {
19  visibility = [ ":*" ]
20
21  include_dirs = [
22    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
23    "${distributedfile_path}/test/mock",
24    "${services_path}/distributedfiledaemon/include",
25    "${services_path}/distributedfiledaemon/include/ipc",
26    "//third_party/json/include",
27  ]
28}
29
30ohos_unittest("device_info_test") {
31  branch_protector_ret = "pac_ret"
32  sanitize = {
33    integer_overflow = true
34    cfi = true
35    cfi_cross_dso = true
36    debug = false
37  }
38
39  module_out_path = module_output_path
40
41  sources =
42      [ "${services_path}/distributedfiledaemon/src/device/device_info.cpp" ]
43
44  sources += [ "device/device_info_test.cpp" ]
45
46  configs = [
47    ":module_private_config",
48    "${utils_path}:compiler_configs",
49  ]
50
51  deps = [
52    "${utils_path}:libdistributedfileutils",
53    "//third_party/googletest:gmock_main",
54    "//third_party/googletest:gtest_main",
55  ]
56
57  external_deps = [
58    "c_utils:utils",
59    "device_manager:devicemanagersdk",
60    "hilog:libhilog",
61  ]
62
63  defines = [ "private=public" ]
64}
65
66ohos_unittest("device_manager_agent_sup_test") {
67  branch_protector_ret = "pac_ret"
68  sanitize = {
69    integer_overflow = true
70    cfi = true
71    cfi_cross_dso = true
72    debug = false
73    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
74  }
75
76  module_out_path = module_output_path
77
78  include_dirs = [ "device/include/" ]
79
80  sources = [
81    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
82    "${distributedfile_path}/test/mock/device_manager_impl_mock.cpp",
83    "${distributedfile_path}/test/mock/device_manager_mock.cpp",
84    "${distributedfile_path}/test/mock/softbus_bus_center_mock.cpp",
85    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
86    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
87    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
88    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
89    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
90    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
91    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
92    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
93    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
94    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
95    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
96    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
97    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
98    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
99    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
100    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
101    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
102    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
103    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
104    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
105    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
106    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
107    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
108    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
109    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
110    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
111    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
112    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
113    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
114    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
115    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
116    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
117  ]
118
119  sources += [
120    "device/device_manager_agent_sup_test.cpp",
121    "device/mock_other_method.cpp",
122  ]
123
124  configs = [
125    ":module_private_config",
126    "${utils_path}:compiler_configs",
127  ]
128
129  deps = [
130    "${utils_path}:libdistributedfileutils",
131    "//third_party/googletest:gmock_main",
132    "//third_party/googletest:gtest_main",
133  ]
134
135  external_deps = [
136    "ability_base:want",
137    "ability_base:zuri",
138    "access_token:libaccesstoken_sdk",
139    "app_file_service:sandbox_helper_native",
140    "c_utils:utils",
141    "common_event_service:cesfwk_innerkits",
142    "dataclassification:data_transit_mgr",
143    "device_auth:deviceauth_sdk",
144    "device_manager:devicemanagersdk",
145    "dsoftbus:softbus_client",
146    "eventhandler:libeventhandler",
147    "hilog:libhilog",
148    "hisysevent:libhisysevent",
149    "init:libbegetutil",
150    "ipc:ipc_single",
151    "os_account:os_account_innerkits",
152    "safwk:system_ability_fwk",
153    "samgr:samgr_proxy",
154    "storage_service:storage_manager_sa_proxy",
155    "zlib:shared_libz",
156  ]
157
158  defines = [ "private=public" ]
159
160  if (support_same_account) {
161    defines += [ "SUPPORT_SAME_ACCOUNT" ]
162  }
163}
164
165ohos_unittest("device_manager_agent_test") {
166  branch_protector_ret = "pac_ret"
167  sanitize = {
168    integer_overflow = true
169    cfi = true
170    cfi_cross_dso = true
171    debug = false
172    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
173  }
174
175  module_out_path = module_output_path
176
177  sources = [
178    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
179    "${distributedfile_path}/test/mock/device_manager_impl_mock.cpp",
180    "${distributedfile_path}/test/mock/device_manager_mock.cpp",
181    "${distributedfile_path}/test/mock/softbus_bus_center_mock.cpp",
182    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
183    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
184    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
185    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
186    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
187    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
188    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
189    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
190    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
191    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
192    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
193    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
194    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
195    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
196    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
197    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
198    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
199    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
200    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
201    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
202    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
203    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
204    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
205    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
206    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
207    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
208    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
209    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
210    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
211    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
212    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
213    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
214  ]
215
216  sources += [ "device/device_manager_agent_test.cpp" ]
217
218  configs = [
219    ":module_private_config",
220    "${utils_path}:compiler_configs",
221  ]
222
223  deps = [
224    "${utils_path}:libdistributedfileutils",
225    "//third_party/googletest:gmock_main",
226    "//third_party/googletest:gtest_main",
227  ]
228
229  external_deps = [
230    "ability_base:want",
231    "ability_base:zuri",
232    "access_token:libaccesstoken_sdk",
233    "app_file_service:sandbox_helper_native",
234    "c_utils:utils",
235    "common_event_service:cesfwk_innerkits",
236    "dataclassification:data_transit_mgr",
237    "device_auth:deviceauth_sdk",
238    "device_manager:devicemanagersdk",
239    "dsoftbus:softbus_client",
240    "eventhandler:libeventhandler",
241    "hilog:libhilog",
242    "hisysevent:libhisysevent",
243    "init:libbegetutil",
244    "ipc:ipc_single",
245    "os_account:os_account_innerkits",
246    "safwk:system_ability_fwk",
247    "samgr:samgr_proxy",
248    "storage_service:storage_manager_sa_proxy",
249    "zlib:shared_libz",
250  ]
251
252  defines = [ "private=public" ]
253
254  if (support_same_account) {
255    defines += [ "SUPPORT_SAME_ACCOUNT" ]
256  }
257}
258
259ohos_unittest("os_account_observer_test") {
260  branch_protector_ret = "pac_ret"
261  sanitize = {
262    integer_overflow = true
263    cfi = true
264    cfi_cross_dso = true
265    debug = false
266  }
267
268  module_out_path = module_output_path
269
270  sources = [
271    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
272    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
273    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
274    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
275    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
276    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
277    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
278    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
279    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
280    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
281    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
282    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
283    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
284    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
285    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
286    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
287    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
288    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
289    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
290    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
291    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
292    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
293    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
294    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
295    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
296    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
297    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
298    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
299    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
300    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
301    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
302    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
303    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
304  ]
305
306  sources += [ "multiuser/os_account_observer_test.cpp" ]
307
308  configs = [
309    ":module_private_config",
310    "${utils_path}:compiler_configs",
311  ]
312
313  deps = [
314    "${utils_path}:libdistributedfileutils",
315    "//third_party/googletest:gtest_main",
316  ]
317
318  external_deps = [
319    "ability_base:want",
320    "ability_base:zuri",
321    "access_token:libaccesstoken_sdk",
322    "app_file_service:sandbox_helper_native",
323    "c_utils:utils",
324    "common_event_service:cesfwk_innerkits",
325    "dataclassification:data_transit_mgr",
326    "device_auth:deviceauth_sdk",
327    "device_manager:devicemanagersdk",
328    "dsoftbus:softbus_client",
329    "eventhandler:libeventhandler",
330    "hilog:libhilog",
331    "hisysevent:libhisysevent",
332    "init:libbegetutil",
333    "ipc:ipc_single",
334    "os_account:os_account_innerkits",
335    "safwk:system_ability_fwk",
336    "samgr:samgr_proxy",
337    "storage_service:storage_manager_sa_proxy",
338    "zlib:shared_libz",
339  ]
340
341  defines = [ "private=public" ]
342  if (support_same_account) {
343    defines += [ "SUPPORT_SAME_ACCOUNT" ]
344  }
345}
346
347ohos_unittest("devsl_dispatcher_test") {
348  branch_protector_ret = "pac_ret"
349  sanitize = {
350    integer_overflow = true
351    cfi = true
352    cfi_cross_dso = true
353    debug = false
354  }
355
356  module_out_path = module_output_path
357
358  sources = [
359    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
360    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
361    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
362    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
363    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
364    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
365    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
366    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
367    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
368    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
369    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
370    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
371    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
372    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
373    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
374    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
375    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
376    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
377    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
378    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
379    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
380    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
381    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
382    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
383    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
384    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
385    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
386    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
387    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
388    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
389    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
390    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
391    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
392    "network/devsl_dispatcher_test.cpp",
393  ]
394
395  configs = [
396    ":module_private_config",
397    "${utils_path}:compiler_configs",
398  ]
399
400  deps = [
401    "${utils_path}:libdistributedfileutils",
402    "//third_party/googletest:gtest_main",
403  ]
404
405  external_deps = [
406    "ability_base:want",
407    "ability_base:zuri",
408    "access_token:libaccesstoken_sdk",
409    "app_file_service:sandbox_helper_native",
410    "c_utils:utils",
411    "common_event_service:cesfwk_innerkits",
412    "dataclassification:data_transit_mgr",
413    "device_auth:deviceauth_sdk",
414    "device_manager:devicemanagersdk",
415    "dsoftbus:softbus_client",
416    "eventhandler:libeventhandler",
417    "hilog:libhilog",
418    "hisysevent:libhisysevent",
419    "init:libbegetutil",
420    "ipc:ipc_single",
421    "os_account:os_account_innerkits",
422    "safwk:system_ability_fwk",
423    "samgr:samgr_proxy",
424    "storage_service:storage_manager_sa_proxy",
425    "zlib:shared_libz",
426  ]
427
428  defines = [ "private=public" ]
429
430  if (support_same_account) {
431    defines += [ "SUPPORT_SAME_ACCOUNT" ]
432  }
433}
434
435ohos_unittest("kernel_talker_test") {
436  branch_protector_ret = "pac_ret"
437  sanitize = {
438    integer_overflow = true
439    cfi = true
440    cfi_cross_dso = true
441    debug = false
442  }
443
444  module_out_path = module_output_path
445
446  sources = [
447    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
448    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
449    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
450    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
451    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
452    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
453    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
454    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
455    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
456    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
457    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
458    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
459    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
460    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
461    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
462    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
463    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
464    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
465    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
466    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
467    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
468    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
469    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
470    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
471    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
472    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
473    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
474    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
475    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
476    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
477    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
478    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
479    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
480    "network/kernel_talker_test.cpp",
481  ]
482
483  configs = [
484    ":module_private_config",
485    "${utils_path}:compiler_configs",
486  ]
487
488  deps = [
489    "${utils_path}:libdistributedfileutils",
490    "//third_party/googletest:gtest_main",
491  ]
492
493  external_deps = [
494    "ability_base:want",
495    "ability_base:zuri",
496    "access_token:libaccesstoken_sdk",
497    "app_file_service:sandbox_helper_native",
498    "c_utils:utils",
499    "common_event_service:cesfwk_innerkits",
500    "dataclassification:data_transit_mgr",
501    "device_auth:deviceauth_sdk",
502    "device_manager:devicemanagersdk",
503    "dsoftbus:softbus_client",
504    "eventhandler:libeventhandler",
505    "hilog:libhilog",
506    "hisysevent:libhisysevent",
507    "init:libbegetutil",
508    "ipc:ipc_single",
509    "os_account:os_account_innerkits",
510    "safwk:system_ability_fwk",
511    "samgr:samgr_proxy",
512    "storage_service:storage_manager_sa_proxy",
513    "zlib:shared_libz",
514  ]
515
516  defines = [ "private=public" ]
517
518  if (support_same_account) {
519    defines += [ "SUPPORT_SAME_ACCOUNT" ]
520  }
521}
522
523ohos_unittest("network_agent_template_test") {
524  branch_protector_ret = "pac_ret"
525  sanitize = {
526    integer_overflow = true
527    cfi = true
528    cfi_cross_dso = true
529    debug = false
530  }
531
532  module_out_path = module_output_path
533
534  sources = [
535    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
536    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
537    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
538    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
539    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
540    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
541    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
542    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
543    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
544    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
545    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
546    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
547    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
548    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
549    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
550    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
551    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
552    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
553    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
554    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
555    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
556    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
557    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
558    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
559    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
560    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
561    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
562    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
563    "network/network_agent_template_test.cpp",
564  ]
565
566  configs = [
567    ":module_private_config",
568    "${utils_path}:compiler_configs",
569  ]
570
571  deps = [
572    "${utils_path}:libdistributedfileutils",
573    "//third_party/googletest:gtest_main",
574  ]
575
576  external_deps = [
577    "ability_base:want",
578    "ability_base:zuri",
579    "access_token:libaccesstoken_sdk",
580    "app_file_service:sandbox_helper_native",
581    "c_utils:utils",
582    "common_event_service:cesfwk_innerkits",
583    "dataclassification:data_transit_mgr",
584    "device_auth:deviceauth_sdk",
585    "device_manager:devicemanagersdk",
586    "dsoftbus:softbus_client",
587    "eventhandler:libeventhandler",
588    "hilog:libhilog",
589    "init:libbegetutil",
590    "ipc:ipc_single",
591    "os_account:os_account_innerkits",
592    "safwk:system_ability_fwk",
593    "samgr:samgr_proxy",
594    "storage_service:storage_manager_sa_proxy",
595    "zlib:shared_libz",
596  ]
597
598  defines = [ "private=public" ]
599
600  if (support_same_account) {
601    defines += [ "SUPPORT_SAME_ACCOUNT" ]
602  }
603}
604
605ohos_unittest("session_pool_test") {
606  branch_protector_ret = "pac_ret"
607  sanitize = {
608    integer_overflow = true
609    cfi = true
610    cfi_cross_dso = true
611    debug = false
612  }
613
614  module_out_path = module_output_path
615
616  sources = [
617    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
618    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
619    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
620    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
621    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
622    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
623    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
624    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
625    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
626    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
627    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
628    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
629    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
630    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
631    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
632    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
633    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
634    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
635    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
636    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
637    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
638    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
639    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
640    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
641    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
642    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
643    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
644    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
645    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
646    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
647    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
648    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
649    "network/session_pool_test.cpp",
650  ]
651
652  configs = [
653    ":module_private_config",
654    "${utils_path}:compiler_configs",
655  ]
656
657  deps = [
658    "${utils_path}:libdistributedfileutils",
659    "//third_party/googletest:gtest_main",
660  ]
661
662  external_deps = [
663    "ability_base:want",
664    "ability_base:zuri",
665    "access_token:libaccesstoken_sdk",
666    "app_file_service:sandbox_helper_native",
667    "c_utils:utils",
668    "common_event_service:cesfwk_innerkits",
669    "dataclassification:data_transit_mgr",
670    "device_auth:deviceauth_sdk",
671    "device_manager:devicemanagersdk",
672    "dsoftbus:softbus_client",
673    "eventhandler:libeventhandler",
674    "hilog:libhilog",
675    "hisysevent:libhisysevent",
676    "init:libbegetutil",
677    "ipc:ipc_single",
678    "os_account:os_account_innerkits",
679    "safwk:system_ability_fwk",
680    "samgr:samgr_proxy",
681    "storage_service:storage_manager_sa_proxy",
682    "zlib:shared_libz",
683  ]
684
685  defines = [ "private=public" ]
686
687  if (support_same_account) {
688    defines += [ "SUPPORT_SAME_ACCOUNT" ]
689  }
690}
691
692ohos_unittest("softbus_agent_test") {
693  branch_protector_ret = "pac_ret"
694  sanitize = {
695    integer_overflow = true
696    cfi = true
697    cfi_cross_dso = true
698    debug = false
699  }
700
701  module_out_path = module_output_path
702
703  sources = [
704    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
705    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
706    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
707    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
708    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
709    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
710    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
711    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
712    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
713    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
714    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
715    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
716    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
717    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
718    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
719    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
720    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
721    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
722    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
723    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
724    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
725    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
726    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
727    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
728    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
729    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
730    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
731    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
732    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
733    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
734    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
735    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
736    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
737    "network/softbus/softbus_agent_test.cpp",
738  ]
739
740  configs = [
741    ":module_private_config",
742    "${utils_path}:compiler_configs",
743  ]
744
745  deps = [
746    "${utils_path}:libdistributedfileutils",
747    "//third_party/googletest:gtest_main",
748  ]
749
750  external_deps = [
751    "ability_base:want",
752    "ability_base:zuri",
753    "access_token:libaccesstoken_sdk",
754    "app_file_service:sandbox_helper_native",
755    "c_utils:utils",
756    "common_event_service:cesfwk_innerkits",
757    "dataclassification:data_transit_mgr",
758    "device_auth:deviceauth_sdk",
759    "device_manager:devicemanagersdk",
760    "dsoftbus:softbus_client",
761    "eventhandler:libeventhandler",
762    "hilog:libhilog",
763    "hisysevent:libhisysevent",
764    "init:libbegetutil",
765    "ipc:ipc_single",
766    "os_account:os_account_innerkits",
767    "safwk:system_ability_fwk",
768    "samgr:samgr_proxy",
769    "storage_service:storage_manager_sa_proxy",
770    "zlib:shared_libz",
771  ]
772
773  defines = [
774    "private=public",
775    "protected=public",
776  ]
777
778  if (support_same_account) {
779    defines += [ "SUPPORT_SAME_ACCOUNT" ]
780  }
781}
782
783ohos_unittest("softbus_file_receive_listener_test") {
784  branch_protector_ret = "pac_ret"
785  sanitize = {
786    integer_overflow = true
787    cfi = true
788    cfi_cross_dso = true
789    debug = false
790  }
791
792  module_out_path = module_output_path
793
794  include_dirs = [
795    "${distributedfile_path}/services/distributedfiledaemon/include/ipc",
796    "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus",
797  ]
798
799  sources = [
800    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
801    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
802    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
803    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
804    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
805    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
806    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
807    "network/softbus/softbus_file_receive_listener_test.cpp",
808  ]
809
810  configs = [
811    ":module_private_config",
812    "${utils_path}:compiler_configs",
813  ]
814
815  deps = [
816    "${utils_path}:libdistributedfileutils",
817    "//third_party/googletest:gtest_main",
818  ]
819
820  external_deps = [
821    "app_file_service:sandbox_helper_native",
822    "c_utils:utils",
823    "device_manager:devicemanagersdk",
824    "dsoftbus:softbus_client",
825    "hilog:libhilog",
826    "hisysevent:libhisysevent",
827    "os_account:os_account_innerkits",
828  ]
829
830  defines = [ "private=public" ]
831
832  if (support_same_account) {
833    defines += [ "SUPPORT_SAME_ACCOUNT" ]
834  }
835}
836
837ohos_unittest("softbus_file_send_listener_test") {
838  branch_protector_ret = "pac_ret"
839  sanitize = {
840    integer_overflow = true
841    cfi = true
842    cfi_cross_dso = true
843    debug = false
844  }
845
846  module_out_path = module_output_path
847
848  include_dirs = [
849    "${distributedfile_path}/services/distributedfiledaemon/include/ipc",
850    "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus",
851  ]
852
853  sources = [
854    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
855    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
856    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
857    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
858    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
859    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
860    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
861    "network/softbus/softbus_file_send_listener_test.cpp",
862  ]
863
864  configs = [
865    ":module_private_config",
866    "${utils_path}:compiler_configs",
867  ]
868
869  deps = [
870    "${utils_path}:libdistributedfileutils",
871    "//third_party/googletest:gtest_main",
872  ]
873
874  external_deps = [
875    "app_file_service:sandbox_helper_native",
876    "c_utils:utils",
877    "device_manager:devicemanagersdk",
878    "dsoftbus:softbus_client",
879    "hilog:libhilog",
880    "hisysevent:libhisysevent",
881    "os_account:os_account_innerkits",
882  ]
883
884  defines = [ "private=public" ]
885
886  if (support_same_account) {
887    defines += [ "SUPPORT_SAME_ACCOUNT" ]
888  }
889}
890
891ohos_unittest("softbus_session_dispatcher_test") {
892  branch_protector_ret = "pac_ret"
893  sanitize = {
894    integer_overflow = true
895    cfi = true
896    cfi_cross_dso = true
897    debug = false
898  }
899
900  module_out_path = module_output_path
901
902  sources = [
903    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
904    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
905    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
906    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
907    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
908    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
909    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
910    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
911    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
912    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
913    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
914    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
915    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
916    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
917    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
918    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
919    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
920    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
921    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
922    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
923    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
924    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
925    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
926    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
927    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
928    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
929    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
930    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
931    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
932    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
933    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
934    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
935    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
936    "network/softbus/softbus_session_dispatcher_test.cpp",
937  ]
938
939  configs = [
940    ":module_private_config",
941    "${utils_path}:compiler_configs",
942  ]
943
944  deps = [
945    "${utils_path}:libdistributedfileutils",
946    "//third_party/googletest:gtest_main",
947  ]
948
949  external_deps = [
950    "ability_base:want",
951    "ability_base:zuri",
952    "access_token:libaccesstoken_sdk",
953    "app_file_service:sandbox_helper_native",
954    "c_utils:utils",
955    "common_event_service:cesfwk_innerkits",
956    "dataclassification:data_transit_mgr",
957    "device_auth:deviceauth_sdk",
958    "device_manager:devicemanagersdk",
959    "dsoftbus:softbus_client",
960    "eventhandler:libeventhandler",
961    "hilog:libhilog",
962    "hisysevent:libhisysevent",
963    "init:libbegetutil",
964    "ipc:ipc_single",
965    "os_account:os_account_innerkits",
966    "safwk:system_ability_fwk",
967    "samgr:samgr_proxy",
968    "storage_service:storage_manager_sa_proxy",
969    "zlib:shared_libz",
970  ]
971
972  defines = [ "private=public" ]
973
974  if (support_same_account) {
975    defines += [ "SUPPORT_SAME_ACCOUNT" ]
976  }
977}
978
979ohos_unittest("softbus_session_test") {
980  branch_protector_ret = "pac_ret"
981  sanitize = {
982    integer_overflow = true
983    cfi = true
984    cfi_cross_dso = true
985    debug = false
986  }
987
988  module_out_path = module_output_path
989
990  sources = [
991    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
992    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
993    "${services_path}/distributedfiledaemon/src/connect_count/connect_count.cpp",
994    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
995    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
996    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
997    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
998    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
999    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
1000    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
1001    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
1002    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
1003    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
1004    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
1005    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
1006    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
1007    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
1008    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
1009    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
1010    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
1011    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
1012    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
1013    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
1014    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
1015    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
1016    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
1017    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
1018    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
1019    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
1020    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
1021    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
1022    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
1023    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
1024    "network/softbus/softbus_session_test.cpp",
1025  ]
1026
1027  configs = [
1028    ":module_private_config",
1029    "${utils_path}:compiler_configs",
1030  ]
1031
1032  deps = [
1033    "${utils_path}:libdistributedfileutils",
1034    "//third_party/googletest:gtest_main",
1035  ]
1036
1037  external_deps = [
1038    "ability_base:want",
1039    "ability_base:zuri",
1040    "access_token:libaccesstoken_sdk",
1041    "app_file_service:sandbox_helper_native",
1042    "c_utils:utils",
1043    "common_event_service:cesfwk_innerkits",
1044    "dataclassification:data_transit_mgr",
1045    "device_auth:deviceauth_sdk",
1046    "device_manager:devicemanagersdk",
1047    "dsoftbus:softbus_client",
1048    "eventhandler:libeventhandler",
1049    "hilog:libhilog",
1050    "hisysevent:libhisysevent",
1051    "init:libbegetutil",
1052    "ipc:ipc_single",
1053    "os_account:os_account_innerkits",
1054    "safwk:system_ability_fwk",
1055    "samgr:samgr_proxy",
1056    "storage_service:storage_manager_sa_proxy",
1057    "zlib:shared_libz",
1058  ]
1059
1060  defines = [ "private=public" ]
1061
1062  if (support_same_account) {
1063    defines += [ "SUPPORT_SAME_ACCOUNT" ]
1064  }
1065}
1066
1067ohos_unittest("softbus_handler_asset_test") {
1068  branch_protector_ret = "pac_ret"
1069  sanitize = {
1070    integer_overflow = true
1071    cfi = true
1072    cfi_cross_dso = true
1073    debug = false
1074    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
1075  }
1076
1077  module_out_path = module_output_path
1078
1079  include_dirs = [ "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus" ]
1080
1081  sources = [
1082    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
1083    "${distributedfile_path}/test/mock/device_manager_impl_mock.cpp",
1084    "${distributedfile_path}/test/mock/socket_mock.cpp",
1085    "${distributedfile_path}/test/mock/softbus_bus_center_mock.cpp",
1086    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
1087    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
1088    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
1089    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
1090    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
1091    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
1092    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
1093    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
1094    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
1095    "network/softbus/softbus_handler_asset_test.cpp",
1096  ]
1097
1098  configs = [
1099    ":module_private_config",
1100    "${utils_path}:compiler_configs",
1101  ]
1102
1103  deps = [
1104    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
1105    "${utils_path}:libdistributedfileutils",
1106    "//third_party/googletest:gmock_main",
1107    "//third_party/googletest:gtest_main",
1108  ]
1109
1110  external_deps = [
1111    "access_token:libaccesstoken_sdk",
1112    "app_file_service:sandbox_helper_native",
1113    "c_utils:utils",
1114    "device_manager:devicemanagersdk",
1115    "dsoftbus:softbus_client",
1116    "hilog:libhilog",
1117    "hisysevent:libhisysevent",
1118    "ipc:ipc_core",
1119    "os_account:os_account_innerkits",
1120    "zlib:shared_libz",
1121  ]
1122
1123  defines = [ "private=public" ]
1124
1125  if (support_same_account) {
1126    defines += [ "SUPPORT_SAME_ACCOUNT" ]
1127  }
1128}
1129
1130ohos_unittest("softbus_handler_test") {
1131  branch_protector_ret = "pac_ret"
1132  sanitize = {
1133    integer_overflow = true
1134    cfi = true
1135    cfi_cross_dso = true
1136    debug = false
1137    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
1138  }
1139
1140  module_out_path = module_output_path
1141
1142  include_dirs = [ "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus" ]
1143
1144  sources = [
1145    "${distributedfile_path}/test/mock/socket_mock.cpp",
1146    "${services_path}/distributedfiledaemon/src/all_connect/all_connect_manager.cpp",
1147    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
1148    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
1149    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
1150    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
1151    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
1152    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
1153    "network/softbus/softbus_handler_test.cpp",
1154  ]
1155
1156  configs = [
1157    ":module_private_config",
1158    "${utils_path}:compiler_configs",
1159  ]
1160
1161  deps = [
1162    "${utils_path}:libdistributedfileutils",
1163    "//third_party/googletest:gmock_main",
1164    "//third_party/googletest:gtest_main",
1165  ]
1166
1167  external_deps = [
1168    "access_token:libaccesstoken_sdk",
1169    "app_file_service:sandbox_helper_native",
1170    "c_utils:utils",
1171    "device_manager:devicemanagersdk",
1172    "dsoftbus:softbus_client",
1173    "hilog:libhilog",
1174    "hisysevent:libhisysevent",
1175    "os_account:os_account_innerkits",
1176  ]
1177
1178  defines = [ "private=public" ]
1179
1180  if (support_same_account) {
1181    defines += [ "SUPPORT_SAME_ACCOUNT" ]
1182  }
1183}
1184
1185ohos_unittest("softbus_session_pool_test") {
1186  branch_protector_ret = "pac_ret"
1187  sanitize = {
1188    integer_overflow = true
1189    cfi = true
1190    cfi_cross_dso = true
1191    debug = false
1192  }
1193
1194  module_out_path = module_output_path
1195
1196  include_dirs = [ "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus" ]
1197
1198  sources = [
1199    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
1200    "network/softbus/softbus_session_pool_test.cpp",
1201  ]
1202
1203  configs = [
1204    ":module_private_config",
1205    "${utils_path}:compiler_configs",
1206  ]
1207
1208  deps = [
1209    "${utils_path}:libdistributedfileutils",
1210    "//third_party/googletest:gtest_main",
1211  ]
1212
1213  external_deps = [
1214    "access_token:libaccesstoken_sdk",
1215    "c_utils:utils",
1216    "dsoftbus:softbus_client",
1217    "hilog:libhilog",
1218  ]
1219}
1220
1221ohos_unittest("softbus_session_listener_test") {
1222  branch_protector_ret = "pac_ret"
1223  sanitize = {
1224    integer_overflow = true
1225    cfi = true
1226    cfi_cross_dso = true
1227    debug = false
1228  }
1229
1230  module_out_path = module_output_path
1231
1232  include_dirs = [ "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus" ]
1233
1234  sources = [
1235    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
1236    "network/softbus/softbus_session_listener_test.cpp",
1237  ]
1238
1239  configs = [
1240    ":module_private_config",
1241    "${utils_path}:compiler_configs",
1242  ]
1243
1244  deps = [
1245    "${utils_path}:libdistributedfileutils",
1246    "//third_party/googletest:gtest_main",
1247  ]
1248
1249  external_deps = [
1250    "ability_base:zuri",
1251    "access_token:libaccesstoken_sdk",
1252    "app_file_service:sandbox_helper_native",
1253    "c_utils:utils",
1254    "dsoftbus:softbus_client",
1255    "hilog:libhilog",
1256    "os_account:os_account_innerkits",
1257  ]
1258
1259  defines = [ "private=public" ]
1260}
1261
1262ohos_unittest("softbus_asset_recv_listener_test") {
1263  branch_protector_ret = "pac_ret"
1264  sanitize = {
1265    integer_overflow = true
1266    cfi = true
1267    cfi_cross_dso = true
1268    debug = false
1269  }
1270
1271  module_out_path = module_output_path
1272
1273  include_dirs = [
1274    "${distributedfile_path}/frameworks/native/distributed_file_inner/include/asset",
1275    "${distributedfile_path}/services/distributedfiledaemon/include/ipc",
1276    "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus",
1277  ]
1278
1279  sources = [
1280    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
1281    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
1282    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
1283    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
1284    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
1285    "network/softbus/softbus_asset_recv_listener_test.cpp",
1286  ]
1287
1288  configs = [
1289    ":module_private_config",
1290    "${utils_path}:compiler_configs",
1291  ]
1292
1293  deps = [
1294    "${utils_path}:libdistributedfileutils",
1295    "//third_party/googletest:gtest_main",
1296  ]
1297
1298  external_deps = [
1299    "access_token:libaccesstoken_sdk",
1300    "c_utils:utils",
1301    "device_manager:devicemanagersdk",
1302    "dsoftbus:softbus_client",
1303    "hilog:libhilog",
1304    "os_account:os_account_innerkits",
1305    "zlib:shared_libz",
1306  ]
1307
1308  defines = [ "private=public" ]
1309}
1310
1311ohos_unittest("softbus_asset_send_listener_test") {
1312  branch_protector_ret = "pac_ret"
1313  sanitize = {
1314    integer_overflow = true
1315    cfi = true
1316    cfi_cross_dso = true
1317    debug = false
1318  }
1319
1320  module_out_path = module_output_path
1321
1322  include_dirs = [
1323    "${distributedfile_path}/frameworks/native/distributed_file_inner/include/asset",
1324    "${distributedfile_path}/services/distributedfiledaemon/include/ipc",
1325    "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus",
1326  ]
1327
1328  sources = [
1329    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp",
1330    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
1331    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
1332    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
1333    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
1334    "network/softbus/softbus_asset_send_listener_test.cpp",
1335  ]
1336
1337  configs = [
1338    ":module_private_config",
1339    "${utils_path}:compiler_configs",
1340  ]
1341
1342  deps = [
1343    "${utils_path}:libdistributedfileutils",
1344    "//third_party/googletest:gmock_main",
1345    "//third_party/googletest:gtest_main",
1346  ]
1347
1348  external_deps = [
1349    "access_token:libaccesstoken_sdk",
1350    "c_utils:utils",
1351    "device_manager:devicemanagersdk",
1352    "dsoftbus:softbus_client",
1353    "hilog:libhilog",
1354    "os_account:os_account_innerkits",
1355    "zlib:shared_libz",
1356  ]
1357
1358  defines = [ "private=public" ]
1359}
1360
1361group("unittest") {
1362  testonly = true
1363  deps = [
1364    ":device_info_test",
1365    ":device_manager_agent_sup_test",
1366    ":device_manager_agent_test",
1367    ":devsl_dispatcher_test",
1368    ":kernel_talker_test",
1369    ":os_account_observer_test",
1370    ":softbus_agent_test",
1371    ":softbus_asset_recv_listener_test",
1372    ":softbus_asset_send_listener_test",
1373    ":softbus_file_receive_listener_test",
1374    ":softbus_file_send_listener_test",
1375    ":softbus_handler_asset_test",
1376    ":softbus_handler_test",
1377    ":softbus_session_dispatcher_test",
1378    ":softbus_session_listener_test",
1379    ":softbus_session_pool_test",
1380    ":softbus_session_test",
1381  ]
1382}
1383