1# Copyright (C) 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("//foundation/filemanagement/dfs_service/distributedfile.gni")
16
17ohos_unittest("distributed_file_daemon_test") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    integer_overflow = true
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25
26  module_out_path = "filemanagement/dfs_service"
27
28  sources = [
29    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
30    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
31    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
32    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
33    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
34    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
35    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
36    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
37    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
38    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
39    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
40    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
41    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
42    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
43    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
44    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
45    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
46    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
47    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
48    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
49    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
50    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
51    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
52    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
53    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
54    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
55    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
56    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
57    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
58    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
59    "daemon_test.cpp",
60  ]
61
62  include_dirs = [
63    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
64    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
65    "${services_path}/distributedfiledaemon/include",
66    "${services_path}/distributedfiledaemon/include/ipc",
67  ]
68
69  deps = [
70    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
71    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
72    "${utils_path}:libdistributedfileutils",
73    "//third_party/googletest:gmock_main",
74    "//third_party/googletest:gtest_main",
75  ]
76
77  external_deps = [
78    "ability_base:want",
79    "ability_base:zuri",
80    "access_token:libaccesstoken_sdk",
81    "app_file_service:sandbox_helper_native",
82    "c_utils:utils",
83    "common_event_service:cesfwk_innerkits",
84    "dataclassification:data_transit_mgr",
85    "device_auth:deviceauth_sdk",
86    "device_manager:devicemanagersdk",
87    "dsoftbus:softbus_client",
88    "eventhandler:libeventhandler",
89    "hilog:libhilog",
90    "hisysevent:libhisysevent",
91    "init:libbegetutil",
92    "ipc:ipc_core",
93    "libfuse:libfuse",
94    "os_account:os_account_innerkits",
95    "safwk:system_ability_fwk",
96    "samgr:samgr_proxy",
97    "storage_service:storage_manager_sa_proxy",
98    "zlib:shared_libz",
99  ]
100
101  defines = [
102    "private=public",
103    "LOG_TAG=\"distributedfile_daemon\"",
104  ]
105
106  use_exceptions = true
107  part_name = "dfs_service"
108  subsystem_name = "filemanagement"
109}
110
111ohos_unittest("distributed_file_daemon_stub_test") {
112  branch_protector_ret = "pac_ret"
113  sanitize = {
114    integer_overflow = true
115    cfi = true
116    cfi_cross_dso = true
117    debug = false
118    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
119  }
120
121  module_out_path = "filemanagement/dfs_service"
122
123  sources = [
124    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
125    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
126    "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp",
127    "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp",
128    "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp",
129    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
130    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
131    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
132    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
133    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
134    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
135    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
136    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
137    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
138    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
139    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
140    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
141    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
142    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
143    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
144    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
145    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
146    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
147    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
148    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
149    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
150    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
151    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
152    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
153    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
154    "daemon_stub_test.cpp",
155  ]
156
157  include_dirs = [
158    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
159    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
160    "${services_path}/distributedfiledaemon/include",
161    "${services_path}/distributedfiledaemon/include/ipc",
162  ]
163
164  deps = [
165    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
166    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
167    "${utils_path}:libdistributedfileutils",
168    "//third_party/googletest:gmock_main",
169    "//third_party/googletest:gtest_main",
170  ]
171
172  external_deps = [
173    "ability_base:want",
174    "ability_base:zuri",
175    "access_token:libaccesstoken_sdk",
176    "app_file_service:sandbox_helper_native",
177    "c_utils:utils",
178    "common_event_service:cesfwk_innerkits",
179    "dataclassification:data_transit_mgr",
180    "device_auth:deviceauth_sdk",
181    "device_manager:devicemanagersdk",
182    "dsoftbus:softbus_client",
183    "eventhandler:libeventhandler",
184    "hilog:libhilog",
185    "hisysevent:libhisysevent",
186    "init:libbegetutil",
187    "ipc:ipc_core",
188    "libfuse:libfuse",
189    "os_account:os_account_innerkits",
190    "safwk:system_ability_fwk",
191    "samgr:samgr_proxy",
192    "storage_service:storage_manager_sa_proxy",
193    "zlib:shared_libz",
194  ]
195
196  defines = [
197    "private=public",
198    "LOG_TAG=\"distributedfile_daemon\"",
199  ]
200
201  use_exceptions = true
202  part_name = "dfs_service"
203  subsystem_name = "filemanagement"
204}
205
206ohos_unittest("distributed_file_daemon_stub_sup_test") {
207  branch_protector_ret = "pac_ret"
208  sanitize = {
209    integer_overflow = true
210    cfi = true
211    cfi_cross_dso = true
212    debug = false
213    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
214  }
215
216  module_out_path = "filemanagement/dfs_service"
217
218  sources = [
219    "${distributedfile_path}/test/mock/message_parcel_mock.cpp",
220    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
221    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
222    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
223    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
224    "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp",
225    "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp",
226    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
227    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
228    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
229    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
230    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
231    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
232    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
233    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
234    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
235    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
236    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
237    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp",
238    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp",
239    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
240    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
241    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
242    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp",
243    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
244    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
245    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
246    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
247    "daemon_stub_sup_test.cpp",
248  ]
249
250  include_dirs = [
251    "include",
252    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
253    "${distributedfile_path}/frameworks/native/distributed_file_inner/include/asset",
254    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
255    "${distributedfile_path}/test/mock",
256    "${services_path}/distributedfiledaemon/include",
257    "${services_path}/distributedfiledaemon/include/ipc",
258    "${services_path}/distributedfiledaemon/test/unittest/ipc",
259  ]
260
261  deps = [
262    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
263    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
264    "${utils_path}:libdistributedfileutils",
265    "//third_party/googletest:gmock_main",
266    "//third_party/googletest:gtest_main",
267  ]
268
269  external_deps = [
270    "ability_base:want",
271    "ability_base:zuri",
272    "access_token:libaccesstoken_sdk",
273    "app_file_service:sandbox_helper_native",
274    "c_utils:utils",
275    "common_event_service:cesfwk_innerkits",
276    "dataclassification:data_transit_mgr",
277    "device_auth:deviceauth_sdk",
278    "device_manager:devicemanagersdk",
279    "dsoftbus:softbus_client",
280    "eventhandler:libeventhandler",
281    "hilog:libhilog",
282    "hisysevent:libhisysevent",
283    "init:libbegetutil",
284    "ipc:ipc_core",
285    "libfuse:libfuse",
286    "os_account:os_account_innerkits",
287    "safwk:system_ability_fwk",
288    "samgr:samgr_proxy",
289    "storage_service:storage_manager_sa_proxy",
290    "zlib:shared_libz",
291  ]
292
293  defines = [
294    "private=public",
295    "LOG_TAG=\"distributedfile_daemon\"",
296  ]
297
298  use_exceptions = true
299  part_name = "dfs_service"
300  subsystem_name = "filemanagement"
301}
302
303ohos_unittest("daemon_manager_impl_test") {
304  branch_protector_ret = "pac_ret"
305  sanitize = {
306    integer_overflow = true
307    cfi = true
308    cfi_cross_dso = true
309    debug = false
310  }
311
312  module_out_path = "filemanagement/dfs_service"
313
314  sources = [
315    "${distributedfile_path}/utils/log/src/utils_log.cpp",
316    "daemon_manager_impl_test.cpp",
317  ]
318
319  include_dirs = [
320    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
321    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
322    "${services_path}/distributedfiledaemon/include",
323  ]
324
325  deps = [
326    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
327    "${utils_path}:libdistributedfileutils",
328    "//third_party/googletest:gmock_main",
329    "//third_party/googletest:gtest_main",
330  ]
331
332  external_deps = [
333    "c_utils:utils",
334    "device_manager:devicemanagersdk",
335    "hilog:libhilog",
336    "ipc:ipc_single",
337    "libfuse:libfuse",
338  ]
339
340  defines = [
341    "private=public",
342    "LOG_TAG=\"distributedfile_daemon\"",
343  ]
344
345  use_exceptions = true
346  part_name = "dfs_service"
347  subsystem_name = "filemanagement"
348}
349
350ohos_unittest("daemon_manager_test") {
351  branch_protector_ret = "pac_ret"
352  sanitize = {
353    integer_overflow = true
354    cfi = true
355    cfi_cross_dso = true
356    debug = false
357  }
358
359  module_out_path = "filemanagement/dfs_service"
360
361  sources = [
362    "${distributedfile_path}/utils/log/src/utils_log.cpp",
363    "daemon_manager_test.cpp",
364  ]
365
366  include_dirs = [
367    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
368    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
369    "${services_path}/distributedfiledaemon/include",
370  ]
371
372  deps = [
373    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
374    "${utils_path}:libdistributedfileutils",
375    "//third_party/googletest:gmock_main",
376    "//third_party/googletest:gtest_main",
377  ]
378
379  external_deps = [
380    "c_utils:utils",
381    "device_manager:devicemanagersdk",
382    "hilog:libhilog",
383    "ipc:ipc_core",
384  ]
385
386  defines = [
387    "private=public",
388    "LOG_TAG=\"distributedfile_daemon\"",
389  ]
390
391  use_exceptions = true
392  part_name = "dfs_service"
393  subsystem_name = "filemanagement"
394}
395
396ohos_unittest("daemon_service_proxy_test") {
397  branch_protector_ret = "pac_ret"
398  sanitize = {
399    integer_overflow = true
400    cfi = true
401    cfi_cross_dso = true
402    debug = false
403    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
404  }
405
406  module_out_path = "filemanagement/dfs_service"
407
408  sources = [
409    "${distributedfile_path}/utils/log/src/utils_log.cpp",
410    "daemon_service_proxy_test.cpp",
411  ]
412
413  include_dirs = [
414    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
415    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
416    "${services_path}/distributedfiledaemon/include",
417  ]
418
419  deps = [
420    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
421    "${utils_path}:libdistributedfileutils",
422    "//third_party/googletest:gmock_main",
423    "//third_party/googletest:gtest_main",
424  ]
425
426  external_deps = [
427    "ability_base:zuri",
428    "c_utils:utils",
429    "device_manager:devicemanagersdk",
430    "hilog:libhilog",
431    "ipc:ipc_core",
432  ]
433
434  defines = [
435    "private=public",
436    "LOG_TAG=\"distributedfile_daemon\"",
437  ]
438
439  use_exceptions = true
440  part_name = "dfs_service"
441  subsystem_name = "filemanagement"
442}
443
444ohos_unittest("connection_detector_test") {
445  branch_protector_ret = "pac_ret"
446  sanitize = {
447    integer_overflow = true
448    cfi = true
449    cfi_cross_dso = true
450    debug = false
451  }
452
453  module_out_path = "filemanagement/dfs_service"
454
455  sources = [
456    "${distributedfile_path}/utils/log/src/utils_log.cpp",
457    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
458    "connection_detector_test.cpp",
459  ]
460
461  include_dirs = [
462    "${services_path}/distributedfiledaemon/include/ipc",
463    "${services_path}/distributedfiledaemon/src/ipc",
464  ]
465
466  deps = [
467    "${utils_path}:libdistributedfileutils",
468    "//third_party/googletest:gmock_main",
469    "//third_party/googletest:gtest_main",
470  ]
471
472  external_deps = [
473    "ability_base:zuri",
474    "c_utils:utils",
475    "device_manager:devicemanagersdk",
476    "hilog:libhilog",
477    "ipc:ipc_core",
478    "os_account:os_account_innerkits",
479  ]
480
481  defines = [
482    "private=public",
483    "LOG_TAG=\"distributedfile_daemon\"",
484  ]
485
486  use_exceptions = true
487  part_name = "dfs_service"
488  subsystem_name = "filemanagement"
489}
490
491ohos_unittest("file_dfs_listener_proxy_test") {
492  branch_protector_ret = "pac_ret"
493  sanitize = {
494    integer_overflow = true
495    cfi = true
496    cfi_cross_dso = true
497    debug = false
498    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
499  }
500
501  module_out_path = "filemanagement/dfs_service"
502
503  sources = [
504    "${distributedfile_path}/test/mock/message_parcel_mock.cpp",
505    "${distributedfile_path}/utils/log/src/utils_log.cpp",
506    "${services_path}/distributedfiledaemon/src/ipc/file_dfs_listener_proxy.cpp",
507    "file_dfs_listener_proxy_test.cpp",
508  ]
509
510  include_dirs = [
511    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
512    "${distributedfile_path}/test/mock",
513    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
514    "${services_path}/distributedfiledaemon/include/ipc",
515    "${services_path}/distributedfiledaemon/src/ipc",
516  ]
517
518  deps = [
519    "${utils_path}:libdistributedfileutils",
520    "//third_party/googletest:gmock_main",
521    "//third_party/googletest:gtest_main",
522  ]
523
524  external_deps = [
525    "ability_base:zuri",
526    "c_utils:utils",
527    "device_manager:devicemanagersdk",
528    "hilog:libhilog",
529    "ipc:ipc_core",
530    "os_account:os_account_innerkits",
531  ]
532
533  defines = [
534    "private=public",
535    "LOG_TAG=\"distributedfile_daemon\"",
536  ]
537
538  use_exceptions = true
539  part_name = "dfs_service"
540  subsystem_name = "filemanagement"
541}
542
543ohos_unittest("file_trans_listener_proxy_test") {
544  branch_protector_ret = "pac_ret"
545  sanitize = {
546    integer_overflow = true
547    cfi = true
548    cfi_cross_dso = true
549    debug = false
550    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
551  }
552
553  module_out_path = "filemanagement/dfs_service"
554
555  sources = [
556    "${distributedfile_path}/test/mock/message_parcel_mock.cpp",
557    "${distributedfile_path}/utils/log/src/utils_log.cpp",
558    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
559    "file_trans_listener_proxy_test.cpp",
560  ]
561
562  include_dirs = [
563    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
564    "${distributedfile_path}/test/mock",
565    "${distributedfile_path}/test/unittests/distributed_file_daemon/include",
566    "${services_path}/distributedfiledaemon/include/ipc",
567    "${services_path}/distributedfiledaemon/src/ipc",
568  ]
569
570  deps = [
571    "${utils_path}:libdistributedfileutils",
572    "//third_party/googletest:gmock_main",
573    "//third_party/googletest:gtest_main",
574  ]
575
576  external_deps = [
577    "ability_base:zuri",
578    "c_utils:utils",
579    "device_manager:devicemanagersdk",
580    "hilog:libhilog",
581    "ipc:ipc_core",
582    "os_account:os_account_innerkits",
583  ]
584
585  defines = [
586    "private=public",
587    "LOG_TAG=\"distributedfile_daemon\"",
588  ]
589
590  use_exceptions = true
591  part_name = "dfs_service"
592  subsystem_name = "filemanagement"
593}
594
595ohos_unittest("trans_mananger_test") {
596  branch_protector_ret = "pac_ret"
597  sanitize = {
598    integer_overflow = true
599    cfi = true
600    cfi_cross_dso = true
601    debug = false
602  }
603
604  module_out_path = "filemanagement/dfs_service"
605
606  sources = [
607    "${distributedfile_path}/utils/log/src/utils_log.cpp",
608    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
609    "trans_mananger_test.cpp",
610  ]
611
612  include_dirs = [
613    "${services_path}/distributedfiledaemon/include/ipc",
614    "${services_path}/distributedfiledaemon/src/ipc",
615    "${distributedfile_path}/frameworks/native/distributed_file_inner/include/",
616  ]
617
618  deps = [
619    "${utils_path}:libdistributedfileutils",
620    "//third_party/googletest:gmock_main",
621    "//third_party/googletest:gtest_main",
622  ]
623
624  external_deps = [
625    "ability_base:zuri",
626    "c_utils:utils",
627    "device_manager:devicemanagersdk",
628    "hilog:libhilog",
629    "ipc:ipc_core",
630    "os_account:os_account_innerkits",
631  ]
632
633  defines = [
634    "private=public",
635    "LOG_TAG=\"distributedfile_daemon\"",
636  ]
637
638  use_exceptions = true
639  part_name = "dfs_service"
640  subsystem_name = "filemanagement"
641}
642
643group("distributed_daemon_test") {
644  testonly = true
645
646  deps = [
647    ":connection_detector_test",
648    ":daemon_manager_impl_test",
649    ":daemon_manager_test",
650    ":daemon_service_proxy_test",
651    ":distributed_file_daemon_stub_sup_test",
652    ":distributed_file_daemon_stub_test",
653    ":distributed_file_daemon_test",
654    ":file_dfs_listener_proxy_test",
655    ":file_trans_listener_proxy_test",
656    ":trans_mananger_test",
657  ]
658}
659