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/mock/include", 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 blocklist = "${distributedfile_path}/cfi_blocklist.txt" 311 } 312 313 module_out_path = "filemanagement/dfs_service" 314 315 sources = [ 316 "${distributedfile_path}/utils/log/src/utils_log.cpp", 317 "daemon_manager_impl_test.cpp", 318 ] 319 320 include_dirs = [ 321 "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 322 "${distributedfile_path}/frameworks/native/distributed_file_inner/include/asset", 323 "${distributedfile_path}/services/distributedfiledaemon/test/mock/include", 324 "${distributedfile_path}/test/unittests/distributed_file_daemon/include", 325 "${services_path}/distributedfiledaemon/include", 326 ] 327 328 deps = [ 329 "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner", 330 "${utils_path}:libdistributedfileutils", 331 "//third_party/googletest:gmock_main", 332 "//third_party/googletest:gtest_main", 333 ] 334 335 external_deps = [ 336 "c_utils:utils", 337 "device_manager:devicemanagersdk", 338 "hilog:libhilog", 339 "ipc:ipc_single", 340 "libfuse:libfuse", 341 ] 342 343 defines = [ 344 "private=public", 345 "LOG_TAG=\"distributedfile_daemon\"", 346 ] 347 348 use_exceptions = true 349 part_name = "dfs_service" 350 subsystem_name = "filemanagement" 351} 352 353ohos_unittest("daemon_manager_test") { 354 branch_protector_ret = "pac_ret" 355 sanitize = { 356 integer_overflow = true 357 cfi = true 358 cfi_cross_dso = true 359 debug = false 360 } 361 362 module_out_path = "filemanagement/dfs_service" 363 364 sources = [ 365 "${distributedfile_path}/utils/log/src/utils_log.cpp", 366 "daemon_manager_test.cpp", 367 ] 368 369 include_dirs = [ 370 "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 371 "${distributedfile_path}/test/unittests/distributed_file_daemon/include", 372 "${services_path}/distributedfiledaemon/include", 373 ] 374 375 deps = [ 376 "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner", 377 "${utils_path}:libdistributedfileutils", 378 "//third_party/googletest:gmock_main", 379 "//third_party/googletest:gtest_main", 380 ] 381 382 external_deps = [ 383 "c_utils:utils", 384 "device_manager:devicemanagersdk", 385 "hilog:libhilog", 386 "ipc:ipc_core", 387 ] 388 389 defines = [ 390 "private=public", 391 "LOG_TAG=\"distributedfile_daemon\"", 392 ] 393 394 use_exceptions = true 395 part_name = "dfs_service" 396 subsystem_name = "filemanagement" 397} 398 399ohos_unittest("daemon_service_proxy_test") { 400 branch_protector_ret = "pac_ret" 401 sanitize = { 402 integer_overflow = true 403 cfi = true 404 cfi_cross_dso = true 405 debug = false 406 blocklist = "${distributedfile_path}/cfi_blocklist.txt" 407 } 408 409 module_out_path = "filemanagement/dfs_service" 410 411 sources = [ 412 "${distributedfile_path}/utils/log/src/utils_log.cpp", 413 "daemon_service_proxy_test.cpp", 414 ] 415 416 include_dirs = [ 417 "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 418 "${distributedfile_path}/test/unittests/distributed_file_daemon/include", 419 "${services_path}/distributedfiledaemon/include", 420 ] 421 422 deps = [ 423 "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner", 424 "${utils_path}:libdistributedfileutils", 425 "//third_party/googletest:gmock_main", 426 "//third_party/googletest:gtest_main", 427 ] 428 429 external_deps = [ 430 "ability_base:zuri", 431 "c_utils:utils", 432 "device_manager:devicemanagersdk", 433 "hilog:libhilog", 434 "ipc:ipc_core", 435 ] 436 437 defines = [ 438 "private=public", 439 "LOG_TAG=\"distributedfile_daemon\"", 440 ] 441 442 use_exceptions = true 443 part_name = "dfs_service" 444 subsystem_name = "filemanagement" 445} 446 447ohos_unittest("connection_detector_test") { 448 branch_protector_ret = "pac_ret" 449 sanitize = { 450 integer_overflow = true 451 cfi = true 452 cfi_cross_dso = true 453 debug = false 454 } 455 456 module_out_path = "filemanagement/dfs_service" 457 458 sources = [ 459 "${distributedfile_path}/utils/log/src/utils_log.cpp", 460 "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp", 461 "connection_detector_test.cpp", 462 ] 463 464 include_dirs = [ 465 "${services_path}/distributedfiledaemon/include/ipc", 466 "${services_path}/distributedfiledaemon/src/ipc", 467 ] 468 469 deps = [ 470 "${utils_path}:libdistributedfileutils", 471 "//third_party/googletest:gmock_main", 472 "//third_party/googletest:gtest_main", 473 ] 474 475 external_deps = [ 476 "ability_base:zuri", 477 "c_utils:utils", 478 "device_manager:devicemanagersdk", 479 "hilog:libhilog", 480 "ipc:ipc_core", 481 "os_account:os_account_innerkits", 482 ] 483 484 defines = [ 485 "private=public", 486 "LOG_TAG=\"distributedfile_daemon\"", 487 ] 488 489 use_exceptions = true 490 part_name = "dfs_service" 491 subsystem_name = "filemanagement" 492} 493 494ohos_unittest("file_dfs_listener_proxy_test") { 495 branch_protector_ret = "pac_ret" 496 sanitize = { 497 integer_overflow = true 498 cfi = true 499 cfi_cross_dso = true 500 debug = false 501 blocklist = "${distributedfile_path}/cfi_blocklist.txt" 502 } 503 504 module_out_path = "filemanagement/dfs_service" 505 506 sources = [ 507 "${distributedfile_path}/test/mock/message_parcel_mock.cpp", 508 "${distributedfile_path}/utils/log/src/utils_log.cpp", 509 "${services_path}/distributedfiledaemon/src/ipc/file_dfs_listener_proxy.cpp", 510 "file_dfs_listener_proxy_test.cpp", 511 ] 512 513 include_dirs = [ 514 "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 515 "${distributedfile_path}/test/mock", 516 "${distributedfile_path}/test/unittests/distributed_file_daemon/include", 517 "${services_path}/distributedfiledaemon/include/ipc", 518 "${services_path}/distributedfiledaemon/src/ipc", 519 ] 520 521 deps = [ 522 "${utils_path}:libdistributedfileutils", 523 "//third_party/googletest:gmock_main", 524 "//third_party/googletest:gtest_main", 525 ] 526 527 external_deps = [ 528 "ability_base:zuri", 529 "c_utils:utils", 530 "device_manager:devicemanagersdk", 531 "hilog:libhilog", 532 "ipc:ipc_core", 533 "os_account:os_account_innerkits", 534 ] 535 536 defines = [ 537 "private=public", 538 "LOG_TAG=\"distributedfile_daemon\"", 539 ] 540 541 use_exceptions = true 542 part_name = "dfs_service" 543 subsystem_name = "filemanagement" 544} 545 546ohos_unittest("file_trans_listener_proxy_test") { 547 branch_protector_ret = "pac_ret" 548 sanitize = { 549 integer_overflow = true 550 cfi = true 551 cfi_cross_dso = true 552 debug = false 553 blocklist = "${distributedfile_path}/cfi_blocklist.txt" 554 } 555 556 module_out_path = "filemanagement/dfs_service" 557 558 sources = [ 559 "${distributedfile_path}/test/mock/message_parcel_mock.cpp", 560 "${distributedfile_path}/utils/log/src/utils_log.cpp", 561 "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp", 562 "file_trans_listener_proxy_test.cpp", 563 ] 564 565 include_dirs = [ 566 "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 567 "${distributedfile_path}/test/mock", 568 "${distributedfile_path}/test/unittests/distributed_file_daemon/include", 569 "${services_path}/distributedfiledaemon/include/ipc", 570 "${services_path}/distributedfiledaemon/src/ipc", 571 ] 572 573 deps = [ 574 "${utils_path}:libdistributedfileutils", 575 "//third_party/googletest:gmock_main", 576 "//third_party/googletest:gtest_main", 577 ] 578 579 external_deps = [ 580 "ability_base:zuri", 581 "c_utils:utils", 582 "device_manager:devicemanagersdk", 583 "hilog:libhilog", 584 "ipc:ipc_core", 585 "os_account:os_account_innerkits", 586 ] 587 588 defines = [ 589 "private=public", 590 "LOG_TAG=\"distributedfile_daemon\"", 591 ] 592 593 use_exceptions = true 594 part_name = "dfs_service" 595 subsystem_name = "filemanagement" 596} 597 598ohos_unittest("trans_mananger_test") { 599 branch_protector_ret = "pac_ret" 600 sanitize = { 601 integer_overflow = true 602 cfi = true 603 cfi_cross_dso = true 604 debug = false 605 } 606 607 module_out_path = "filemanagement/dfs_service" 608 609 sources = [ 610 "${distributedfile_path}/utils/log/src/utils_log.cpp", 611 "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp", 612 "trans_mananger_test.cpp", 613 ] 614 615 include_dirs = [ 616 "${services_path}/distributedfiledaemon/include/ipc", 617 "${services_path}/distributedfiledaemon/src/ipc", 618 "${distributedfile_path}/frameworks/native/distributed_file_inner/include/", 619 ] 620 621 deps = [ 622 "${utils_path}:libdistributedfileutils", 623 "//third_party/googletest:gmock_main", 624 "//third_party/googletest:gtest_main", 625 ] 626 627 external_deps = [ 628 "ability_base:zuri", 629 "c_utils:utils", 630 "device_manager:devicemanagersdk", 631 "hilog:libhilog", 632 "ipc:ipc_core", 633 "os_account:os_account_innerkits", 634 ] 635 636 defines = [ 637 "private=public", 638 "LOG_TAG=\"distributedfile_daemon\"", 639 ] 640 641 use_exceptions = true 642 part_name = "dfs_service" 643 subsystem_name = "filemanagement" 644} 645 646group("distributed_daemon_test") { 647 testonly = true 648 649 deps = [ 650 ":connection_detector_test", 651 ":daemon_manager_impl_test", 652 ":daemon_manager_test", 653 ":daemon_service_proxy_test", 654 ":distributed_file_daemon_stub_sup_test", 655 ":distributed_file_daemon_stub_test", 656 ":distributed_file_daemon_test", 657 ":file_dfs_listener_proxy_test", 658 ":file_trans_listener_proxy_test", 659 ":trans_mananger_test", 660 ] 661} 662