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