1# Copyright (c) 2021-2025 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("../../../../core/bus_center/lnn/decision_center/decision_center.gni") 16import("../../../../dsoftbus.gni") 17 18module_output_path = "dsoftbus/LNN" 19dsoftbus_root_path = "../../../.." 20 21native_source_path = rebase_path("$dsoftbus_root_path") 22dep_dir = "dsoftbus_enhance/core/bus_center/lnn/lane_hub" 23enhanced_test = exec_script("$dsoftbus_root_path/check_sub_module.py", 24 [ 25 "$native_source_path", 26 "$dep_dir", 27 ], 28 "value") 29 30bus_center_unittest_dirs = [ 31 "$dsoftbus_dfx_path/interface/include", 32 "$dsoftbus_root_path/core/bus_center/service/include", 33 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 34 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 35 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 36 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 37 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 38 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 39 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 40 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src", 41 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 42 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 43 "$dsoftbus_root_path/core/bus_center/monitor/include", 44 "$dsoftbus_root_path/core/common/include", 45 "$dsoftbus_root_path/adapter/common/include", 46 "$dsoftbus_root_path/core/connection/interface", 47 "$dsoftbus_root_path/core/authentication/interface", 48 "$dsoftbus_root_path/core/bus_center/interface", 49 "$dsoftbus_root_path/core/bus_center/utils/include", 50 "$dsoftbus_root_path/core/bus_center/ipc/standard/include", 51 "$dsoftbus_root_path/core/bus_center/ipc/standard/src", 52 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include", 53 "$dsoftbus_root_path/core/bus_center/ipc/include", 54 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 55 "$dsoftbus_root_path/interfaces/kits/bus_center", 56 "$dsoftbus_root_path/interfaces/kits/common", 57 "$dsoftbus_root_path/core/adapter/bus_center/include", 58 "$dsoftbus_root_path/sdk/frame/standard/include", 59 "unittest/common/", 60 "$dsoftbus_root_path/core/connection/manager", 61 "$dsoftbus_root_path/core/frame/standard/client_manager/include", 62 "$dsoftbus_root_path/adapter/common/bus_center/include/", 63 "$dsoftbus_root_path/core/discovery/manager/include", 64 "$dsoftbus_root_path/core/discovery/interface", 65 "$dsoftbus_root_path/interfaces/kits/discovery", 66 "$dsoftbus_root_path/sdk/bus_center/manager/include", 67 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src", 68 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 69 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 70 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 71 "$dsoftbus_root_path/core/authentication/include", 72 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 73 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 74] 75 76bus_center_unittest_deps = [ 77 "$dsoftbus_dfx_path:softbus_dfx", 78 "$dsoftbus_root_path/adapter:softbus_adapter", 79 "$dsoftbus_root_path/core/common:softbus_utils", 80 "$dsoftbus_root_path/core/frame:softbus_server", 81] 82 83lnn_mock_test_include_dirs = [ 84 "$dsoftbus_dfx_path/interface/include", 85 "$dsoftbus_root_path/core/authentication/include", 86 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 87 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 88 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 89 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src", 90 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 91 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 92 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 93 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 94 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 95 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 96 "$dsoftbus_root_path/core/bus_center/monitor/include", 97 "$dsoftbus_root_path/core/common/include", 98 "$dsoftbus_root_path/adapter/common/include", 99 "$dsoftbus_root_path/core/connection/interface", 100 "$dsoftbus_root_path/core/connection/p2p/interface", 101 "$dsoftbus_root_path/core/connection/p2p/common/include", 102 "$dsoftbus_root_path/core/authentication/interface", 103 "$dsoftbus_root_path/core/bus_center/interface", 104 "$dsoftbus_root_path/core/bus_center/utils/include", 105 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 106 "$dsoftbus_root_path/interfaces/kits/bus_center", 107 "$dsoftbus_root_path/interfaces/kits/common", 108 "$dsoftbus_root_path/core/adapter/bus_center/include", 109 "unittest/common/", 110 "$dsoftbus_root_path/core/connection/manager", 111 "$dsoftbus_root_path/adapter/common/bus_center/include/", 112 "$dsoftbus_root_path/core/discovery/manager/include", 113 "$dsoftbus_root_path/core/discovery/interface", 114 "$dsoftbus_root_path/interfaces/kits/discovery", 115 "$dsoftbus_root_path/core/bus_center/service/include", 116 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 117 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 118 "$dsoftbus_root_path/core/transmission/interface", 119 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 120 "$dsoftbus_root_path/adapter/common/net/wifi/include", 121 "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", 122 "$dsoftbus_root_path/core/bus_center/utils/include", 123 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 124 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 125 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 126 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 127] 128 129lnn_mock_test_deps = [ 130 "$dsoftbus_dfx_path:softbus_dfx", 131 "$dsoftbus_root_path/adapter:softbus_adapter", 132 "$dsoftbus_root_path/core/common:softbus_utils", 133 "$dsoftbus_root_path/core/frame:softbus_server", 134] 135 136lnn_mock_test_deps_exclude_softbus_server = [ 137 "$dsoftbus_dfx_path:softbus_dfx", 138 "$dsoftbus_root_path/adapter:softbus_adapter", 139 "$dsoftbus_root_path/core/common:softbus_utils", 140] 141 142ohos_unittest("LaneTest") { 143 module_out_path = module_output_path 144 sources = [ "unittest/lane_test.cpp" ] 145 include_dirs = bus_center_unittest_dirs 146 deps = bus_center_unittest_deps 147 148 if (is_standard_system) { 149 external_deps = [ 150 "cJSON:cjson", 151 "c_utils:utils", 152 "device_auth:deviceauth_sdk", 153 "googletest:gmock", 154 "googletest:gtest_main", 155 "hilog:libhilog", 156 ] 157 } else { 158 external_deps = [ 159 "cJSON:cjson", 160 "c_utils:utils", 161 "googletest:gmock", 162 "googletest:gtest_main", 163 "hilog:libhilog", 164 ] 165 } 166 external_deps += [ 167 "huks:libhukssdk", 168 "ipc:ipc_single", 169 ] 170} 171 172ohos_unittest("NetLedgerTest") { 173 module_out_path = module_output_path 174 sources = [ "unittest/net_ledger_test.cpp" ] 175 include_dirs = bus_center_unittest_dirs 176 deps = bus_center_unittest_deps 177 178 if (is_standard_system) { 179 external_deps = [ 180 "cJSON:cjson", 181 "c_utils:utils", 182 "device_auth:deviceauth_sdk", 183 "googletest:gmock", 184 "googletest:gtest_main", 185 "hilog:libhilog", 186 ] 187 } else { 188 external_deps = [ 189 "cJSON:cjson", 190 "c_utils:utils", 191 "googletest:gmock", 192 "googletest:gtest_main", 193 "hilog:libhilog", 194 ] 195 } 196 external_deps += [ 197 "huks:libhukssdk", 198 "ipc:ipc_single", 199 ] 200} 201 202ohos_unittest("NetBuilderTest") { 203 module_out_path = module_output_path 204 sources = [ "unittest/net_builder_test.cpp" ] 205 include_dirs = bus_center_unittest_dirs 206 deps = bus_center_unittest_deps 207 208 if (is_standard_system) { 209 external_deps = [ 210 "cJSON:cjson", 211 "c_utils:utils", 212 "device_auth:deviceauth_sdk", 213 "googletest:gmock", 214 "googletest:gtest_main", 215 "hilog:libhilog", 216 ] 217 } else { 218 external_deps = [ 219 "cJSON:cjson", 220 "c_utils:utils", 221 "googletest:gmock", 222 "googletest:gtest_main", 223 "hilog:libhilog", 224 ] 225 } 226 external_deps += [ 227 "huks:libhukssdk", 228 "ipc:ipc_single", 229 ] 230} 231 232ohos_unittest("LNNInitMonitorTest") { 233 module_out_path = module_output_path 234 sources = [ "unittest/lnn_init_monitor_test.cpp" ] 235 include_dirs = bus_center_unittest_dirs 236 include_dirs += [ 237 "$dsoftbus_root_path/core/bus_center/monitor/include", 238 "$dsoftbus_root_path/core/bus_center/monitor/src", 239 ] 240 deps = bus_center_unittest_deps 241 242 if (is_standard_system) { 243 external_deps = [ 244 "cJSON:cjson", 245 "c_utils:utils", 246 "device_auth:deviceauth_sdk", 247 "googletest:gmock", 248 "googletest:gtest_main", 249 "hilog:libhilog", 250 ] 251 } else { 252 external_deps = [ 253 "cJSON:cjson", 254 "c_utils:utils", 255 "googletest:gmock", 256 "googletest:gtest_main", 257 "hilog:libhilog", 258 ] 259 } 260 external_deps += [ 261 "huks:libhukssdk", 262 "ipc:ipc_single", 263 ] 264} 265 266ohos_unittest("LNNHuksUtilsTest") { 267 module_out_path = module_output_path 268 sources = [ "unittest/lnn_huks_test.cpp" ] 269 include_dirs = bus_center_unittest_dirs 270 deps = bus_center_unittest_deps 271 272 if (is_standard_system) { 273 external_deps = [ 274 "cJSON:cjson", 275 "c_utils:utils", 276 "device_auth:deviceauth_sdk", 277 "googletest:gmock", 278 "googletest:gtest_main", 279 "hilog:libhilog", 280 ] 281 } else { 282 external_deps = [ 283 "cJSON:cjson", 284 "c_utils:utils", 285 "googletest:gmock", 286 "googletest:gtest_main", 287 "hilog:libhilog", 288 ] 289 } 290 external_deps += [ 291 "huks:libhukssdk", 292 "ipc:ipc_single", 293 ] 294} 295 296ohos_unittest("LedgerLaneHubTest") { 297 module_out_path = module_output_path 298 sources = [ 299 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 300 "unittest/ledger_lane_hub_test.cpp", 301 ] 302 include_dirs = bus_center_unittest_dirs 303 deps = bus_center_unittest_deps 304 305 include_dirs += [ 306 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 307 "$dsoftbus_root_path/core/bus_center/monitor/include", 308 "$dsoftbus_root_path/interfaces/kits/common", 309 ] 310 if (is_standard_system) { 311 external_deps = [ 312 "cJSON:cjson", 313 "c_utils:utils", 314 "device_auth:deviceauth_sdk", 315 "googletest:gmock", 316 "googletest:gtest_main", 317 "hilog:libhilog", 318 ] 319 } else { 320 external_deps = [ 321 "cJSON:cjson", 322 "c_utils:utils", 323 "googletest:gmock", 324 "googletest:gtest_main", 325 "hilog:libhilog", 326 ] 327 } 328 external_deps += [ 329 "huks:libhukssdk", 330 "ipc:ipc_single", 331 ] 332} 333 334ohos_unittest("LNNNetBuilderTest") { 335 module_out_path = module_output_path 336 sources = [ "net_builder/src/lnn_net_builder_test.cpp" ] 337 338 include_dirs = [ 339 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 340 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 341 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 342 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 343 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 344 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 345 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 346 "$dsoftbus_root_path/core/bus_center/monitor/include", 347 "$dsoftbus_root_path/core/common/include", 348 "$dsoftbus_dfx_path/interface/include", 349 "$dsoftbus_root_path/adapter/common/include", 350 "$dsoftbus_root_path/core/connection/interface", 351 "$dsoftbus_root_path/core/authentication/interface", 352 "$dsoftbus_root_path/core/bus_center/interface", 353 "$dsoftbus_root_path/core/bus_center/utils/include", 354 "$dsoftbus_root_path/interfaces/kits/bus_center", 355 "$dsoftbus_root_path/interfaces/kits/common", 356 "$dsoftbus_root_path/interfaces/kits/discovery", 357 "$dsoftbus_root_path/core/adapter/bus_center/include", 358 "unittest/common/", 359 "$dsoftbus_root_path/core/connection/manager", 360 "$dsoftbus_root_path/adapter/common/bus_center/include/", 361 "$dsoftbus_root_path/core/discovery/manager/include", 362 "$dsoftbus_root_path/core/discovery/interface", 363 "$dsoftbus_root_path/interfaces/kits/discovery", 364 "$dsoftbus_root_path/core/bus_center/service/include", 365 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 366 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 367 "$dsoftbus_root_path/interfaces/kits/common", 368 ] 369 370 deps = [ 371 "$dsoftbus_dfx_path:softbus_dfx", 372 "$dsoftbus_root_path/adapter:softbus_adapter", 373 "$dsoftbus_root_path/core/common:softbus_utils", 374 "$dsoftbus_root_path/core/frame:softbus_server", 375 ] 376 377 if (is_standard_system) { 378 external_deps = [ 379 "cJSON:cjson", 380 "c_utils:utils", 381 "device_auth:deviceauth_sdk", 382 "dsoftbus:softbus_client", 383 "googletest:gmock", 384 "googletest:gtest_main", 385 "hilog:libhilog", 386 ] 387 } else { 388 external_deps = [ 389 "cJSON:cjson", 390 "c_utils:utils", 391 "dsoftbus:softbus_client", 392 "googletest:gmock", 393 "googletest:gtest_main", 394 "hilog:libhilog", 395 ] 396 } 397} 398 399ohos_unittest("LNNNetBuilderMockTest") { 400 module_out_path = module_output_path 401 sources = [ 402 "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c", 403 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper_virtual.cpp", 404 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_link_finder_virtul.c", 405 "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp", 406 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c", 407 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connId_callback_manager.c", 408 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 409 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 410 "net_builder/src/lnn_net_builder_deps_mock.cpp", 411 "net_builder/src/lnn_net_builder_mock_test.cpp", 412 ] 413 414 include_dirs = [ 415 "$dsoftbus_root_path/adapter/common/net/wifi/include", 416 "$dsoftbus_root_path/core/bus_center/ipc/include", 417 "$dsoftbus_root_path/core/bus_center/ipc/standard/include", 418 "$dsoftbus_root_path/core/bus_center/ipc/standard/src", 419 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 420 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src", 421 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 422 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 423 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 424 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 425 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 426 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 427 "$dsoftbus_root_path/core/bus_center/monitor/include", 428 "$dsoftbus_root_path/core/common/include", 429 "$dsoftbus_dfx_path/interface/include", 430 "$dsoftbus_root_path/adapter/common/include", 431 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 432 "$dsoftbus_root_path/adapter/common/net/wifi/include", 433 "$dsoftbus_root_path/core/connection/interface", 434 "$dsoftbus_root_path/core/authentication/interface", 435 "$dsoftbus_root_path/core/bus_center/interface", 436 "$dsoftbus_root_path/core/bus_center/utils/include", 437 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 438 "$dsoftbus_root_path/interfaces/kits/bus_center", 439 "$dsoftbus_root_path/interfaces/kits/common", 440 "$dsoftbus_root_path/interfaces/kits/discovery", 441 "$dsoftbus_root_path/core/adapter/bus_center/include", 442 "unittest/common/", 443 "$dsoftbus_root_path/core/connection/manager", 444 "$dsoftbus_root_path/adapter/common/bus_center/include/", 445 "$dsoftbus_root_path/core/discovery/manager/include", 446 "$dsoftbus_root_path/core/discovery/interface", 447 "$dsoftbus_root_path/interfaces/kits/discovery", 448 "$dsoftbus_root_path/core/bus_center/service/include", 449 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 450 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 451 "$dsoftbus_root_path/core/transmission/interface", 452 "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", 453 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 454 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 455 "$dsoftbus_root_path/core/connection/p2p/interface", 456 "$dsoftbus_root_path/core/connection/p2p/common/include", 457 "$dsoftbus_root_path/core/connection/p2p/manager/include", 458 "$dsoftbus_root_path/core/authentication/include", 459 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 460 "$dsoftbus_root_path/interfaces/kits/common", 461 "$dsoftbus_root_path/core/transmission/trans_channel/auth/include", 462 ] 463 464 deps = [ 465 "$dsoftbus_dfx_path:softbus_dfx", 466 "$dsoftbus_root_path/adapter:softbus_adapter", 467 "$dsoftbus_root_path/core/common:softbus_utils", 468 "$dsoftbus_root_path/core/frame:softbus_server", 469 ] 470 471 if (is_standard_system) { 472 external_deps = [ 473 "cJSON:cjson", 474 "c_utils:utils", 475 "device_auth:deviceauth_sdk", 476 "googletest:gmock", 477 "googletest:gtest_main", 478 "hilog:libhilog", 479 ] 480 } else { 481 external_deps = [ 482 "cJSON:cjson", 483 "c_utils:utils", 484 "googletest:gmock", 485 "googletest:gtest_main", 486 "hilog:libhilog", 487 ] 488 } 489} 490 491ohos_unittest("LNNConnectionFsmTest") { 492 module_out_path = module_output_path 493 sources = [ 494 "$dsoftbus_root_path/core/authentication/src/auth_pre_link.c", 495 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connId_callback_manager.c", 496 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c", 497 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c", 498 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c", 499 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c", 500 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c", 501 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c", 502 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c", 503 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 504 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 505 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", 506 "$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c", 507 "$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c", 508 "$dsoftbus_root_path/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c", 509 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/src/lnn_sync_info_mock.cpp", 510 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp", 511 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", 512 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", 513 "net_builder/src/lnn_auth_mock.cpp", 514 "net_builder/src/lnn_connection_fsm_mock.cpp", 515 "net_builder/src/lnn_connection_fsm_test.cpp", 516 "net_builder/src/lnn_net_ledger_mock.cpp", 517 "net_builder/src/lnn_service_mock.cpp", 518 ] 519 520 include_dirs = lnn_mock_test_include_dirs 521 include_dirs += [ 522 "$dsoftbus_root_path/core/bus_center/ipc/include", 523 "$dsoftbus_root_path/core/bus_center/monitor/include/", 524 "$dsoftbus_root_path/core/transmission/trans_channel/auth/include", 525 "$dsoftbus_root_path/core/common/security/permission/include", 526 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_qos/include", 527 "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface", 528 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 529 "$dsoftbus_root_path/core/transmission/session/include", 530 "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include", 531 "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include", 532 "$dsoftbus_root_path/core/adapter/transmission/include", 533 ] 534 535 deps = [ 536 "$dsoftbus_dfx_path:softbus_dfx", 537 "$dsoftbus_root_path/adapter:softbus_adapter", 538 "$dsoftbus_root_path/core/common:softbus_utils", 539 ] 540 541 if (is_standard_system) { 542 external_deps = [ 543 "cJSON:cjson", 544 "c_utils:utils", 545 "device_auth:deviceauth_sdk", 546 "googletest:gmock", 547 "googletest:gtest_main", 548 "hilog:libhilog", 549 ] 550 } else { 551 external_deps = [ 552 "cJSON:cjson", 553 "c_utils:utils", 554 "googletest:gmock", 555 "googletest:gtest_main", 556 "hilog:libhilog", 557 ] 558 } 559} 560 561ohos_unittest("LNNConnectionFsmMockTest") { 562 module_out_path = module_output_path 563 sources = [ 564 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c", 565 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c", 566 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c", 567 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c", 568 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c", 569 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c", 570 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c", 571 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_sync_info_manager.c", 572 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 573 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", 574 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp", 575 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", 576 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", 577 "net_builder/src/lnn_auth_mock.cpp", 578 "net_builder/src/lnn_connection_fsm_mock_test.cpp", 579 "net_builder/src/lnn_net_ledger_mock.cpp", 580 "net_builder/src/lnn_service_mock.cpp", 581 ] 582 583 include_dirs = lnn_mock_test_include_dirs 584 include_dirs += [ 585 "$dsoftbus_root_path/core/transmission/trans_channel/auth/include", 586 "$dsoftbus_root_path/core/bus_center/monitor/include", 587 ] 588 deps = lnn_mock_test_deps 589 590 if (is_standard_system) { 591 external_deps = [ 592 "cJSON:cjson", 593 "c_utils:utils", 594 "device_auth:deviceauth_sdk", 595 "googletest:gmock", 596 "googletest:gtest_main", 597 "hilog:libhilog", 598 ] 599 } else { 600 external_deps = [ 601 "cJSON:cjson", 602 "c_utils:utils", 603 "googletest:gmock", 604 "googletest:gtest_main", 605 "hilog:libhilog", 606 ] 607 } 608} 609 610ohos_unittest("LNNBatteryInfoTest") { 611 module_out_path = module_output_path 612 sources = [ 613 "net_builder/src/lnn_battery_info_test.cpp", 614 "net_builder/src/lnn_net_ledger_mock.cpp", 615 "net_builder/src/lnn_sync_info_mock.cpp", 616 ] 617 618 include_dirs = lnn_mock_test_include_dirs 619 deps = lnn_mock_test_deps_exclude_softbus_server 620 621 if (is_standard_system) { 622 external_deps = [ 623 "cJSON:cjson", 624 "c_utils:utils", 625 "device_auth:deviceauth_sdk", 626 "googletest:gmock", 627 "googletest:gtest_main", 628 "hilog:libhilog", 629 ] 630 } else { 631 external_deps = [ 632 "cJSON:cjson", 633 "c_utils:utils", 634 "googletest:gmock", 635 "googletest:gtest_main", 636 "hilog:libhilog", 637 ] 638 } 639} 640 641ohos_unittest("LNNSyncInfoItemTest") { 642 module_out_path = module_output_path 643 sources = [ 644 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 645 "net_builder/src/lnn_net_builder_mock.cpp", 646 "net_builder/src/lnn_net_ledger_mock.cpp", 647 "net_builder/src/lnn_service_mock.cpp", 648 "net_builder/src/lnn_sync_info_mock.cpp", 649 "net_builder/src/lnn_sync_item_info_test.cpp", 650 ] 651 652 include_dirs = lnn_mock_test_include_dirs 653 deps = lnn_mock_test_deps_exclude_softbus_server 654 655 if (is_standard_system) { 656 external_deps = [ 657 "cJSON:cjson", 658 "c_utils:utils", 659 "device_auth:deviceauth_sdk", 660 "googletest:gmock", 661 "googletest:gtest_main", 662 "hilog:libhilog", 663 ] 664 } else { 665 external_deps = [ 666 "cJSON:cjson", 667 "c_utils:utils", 668 "googletest:gmock", 669 "googletest:gtest_main", 670 "hilog:libhilog", 671 ] 672 } 673} 674 675ohos_unittest("LNNDeviceNameInfoTest") { 676 module_out_path = module_output_path 677 sources = [ 678 "$dsoftbus_root_path/core/authentication/src/virtual/auth_session_fsm_virtual.c", 679 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_virtual.c", 680 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 681 "$dsoftbus_root_path/core/common/message_handler/message_handler.c", 682 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", 683 "net_builder/src/lnn_devicename_info_test.cpp", 684 "net_builder/src/lnn_net_ledger_mock.cpp", 685 "net_builder/src/lnn_service_mock.cpp", 686 "net_builder/src/lnn_sync_info_mock.cpp", 687 ] 688 689 include_dirs = lnn_mock_test_include_dirs 690 deps = lnn_mock_test_deps_exclude_softbus_server 691 692 if (is_standard_system) { 693 external_deps = [ 694 "cJSON:cjson", 695 "c_utils:utils", 696 "device_auth:deviceauth_sdk", 697 "googletest:gmock", 698 "googletest:gtest_main", 699 "hilog:libhilog", 700 ] 701 } else { 702 external_deps = [ 703 "cJSON:cjson", 704 "c_utils:utils", 705 "googletest:gmock", 706 "googletest:gtest_main", 707 "hilog:libhilog", 708 ] 709 } 710} 711 712ohos_unittest("LNNNetworkInfoTest") { 713 module_out_path = module_output_path 714 sources = [ 715 "$dsoftbus_root_path/core/common/message_handler/message_handler.c", 716 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", 717 "net_builder/src/lnn_net_builder_mock.cpp", 718 "net_builder/src/lnn_net_ledger_mock.cpp", 719 "net_builder/src/lnn_network_info_test.cpp", 720 "net_builder/src/lnn_service_mock.cpp", 721 "net_builder/src/lnn_sync_info_mock.cpp", 722 ] 723 724 include_dirs = lnn_mock_test_include_dirs 725 deps = lnn_mock_test_deps_exclude_softbus_server 726 deps += [ 727 "$dsoftbus_root_path/adapter:softbus_adapter", 728 "$dsoftbus_root_path/core/frame:softbus_server", 729 ] 730 731 if (is_standard_system) { 732 external_deps = [ 733 "cJSON:cjson", 734 "c_utils:utils", 735 "device_auth:deviceauth_sdk", 736 "googletest:gmock", 737 "googletest:gtest_main", 738 "hilog:libhilog", 739 ] 740 } else { 741 external_deps = [ 742 "cJSON:cjson", 743 "c_utils:utils", 744 "googletest:gmock", 745 "googletest:gtest_main", 746 "hilog:libhilog", 747 ] 748 } 749} 750 751ohos_unittest("LNNNodeWeightTest") { 752 module_out_path = module_output_path 753 sources = [ 754 "net_builder/src/lnn_net_ledger_mock.cpp", 755 "net_builder/src/lnn_node_weight_test.cpp", 756 "net_builder/src/lnn_service_mock.cpp", 757 "net_builder/src/lnn_sync_info_mock.cpp", 758 ] 759 760 include_dirs = lnn_mock_test_include_dirs 761 deps = lnn_mock_test_deps_exclude_softbus_server 762 763 if (is_standard_system) { 764 external_deps = [ 765 "cJSON:cjson", 766 "c_utils:utils", 767 "device_auth:deviceauth_sdk", 768 "googletest:gmock", 769 "googletest:gtest_main", 770 "hilog:libhilog", 771 ] 772 } else { 773 external_deps = [ 774 "cJSON:cjson", 775 "c_utils:utils", 776 "googletest:gmock", 777 "googletest:gtest_main", 778 "hilog:libhilog", 779 ] 780 } 781} 782 783ohos_unittest("LNNP2pInfoTest") { 784 module_out_path = module_output_path 785 sources = [ 786 "$dsoftbus_root_path/core/common/message_handler/message_handler.c", 787 "net_builder/src/lnn_net_ledger_mock.cpp", 788 "net_builder/src/lnn_p2p_info_test.cpp", 789 "net_builder/src/lnn_service_mock.cpp", 790 "net_builder/src/lnn_sync_info_mock.cpp", 791 ] 792 793 include_dirs = lnn_mock_test_include_dirs 794 deps = lnn_mock_test_deps_exclude_softbus_server 795 796 if (is_standard_system) { 797 external_deps = [ 798 "cJSON:cjson", 799 "c_utils:utils", 800 "device_auth:deviceauth_sdk", 801 "googletest:gmock", 802 "googletest:gtest_main", 803 "hilog:libhilog", 804 ] 805 } else { 806 external_deps = [ 807 "cJSON:cjson", 808 "c_utils:utils", 809 "googletest:gmock", 810 "googletest:gtest_main", 811 "hilog:libhilog", 812 ] 813 } 814} 815 816ohos_unittest("LNNSyncInfoManagerTest") { 817 module_out_path = module_output_path 818 sources = [ 819 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm.c", 820 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm_process.c", 821 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c", 822 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c", 823 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c", 824 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c", 825 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c", 826 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c", 827 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 828 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", 829 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", 830 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", 831 "net_builder/mock/lnn_sync_info_manager_mock.cpp", 832 "net_builder/src/lnn_auth_mock.cpp", 833 "net_builder/src/lnn_connection_fsm_mock.cpp", 834 "net_builder/src/lnn_net_ledger_mock.cpp", 835 "net_builder/src/lnn_service_mock.cpp", 836 "net_builder/src/lnn_sync_info_manager_test.cpp", 837 ] 838 839 include_dirs = lnn_mock_test_include_dirs 840 include_dirs += [ 841 "$dsoftbus_root_path/adapter/common/include", 842 "$dsoftbus_root_path/core/bus_center/monitor/include/", 843 "$dsoftbus_root_path/core/authentication/include", 844 "$dsoftbus_root_path/core/bus_center/ipc/include", 845 "$dsoftbus_root_path/core/transmission/trans_channel/auth/include", 846 ] 847 848 deps = lnn_mock_test_deps 849 850 if (is_standard_system) { 851 external_deps = [ 852 "c_utils:utils", 853 "device_auth:deviceauth_sdk", 854 "googletest:gmock", 855 "googletest:gtest_main", 856 "hilog:libhilog", 857 ] 858 } else { 859 external_deps = [ 860 "c_utils:utils", 861 "googletest:gmock", 862 "googletest:gtest_main", 863 "hilog:libhilog", 864 ] 865 } 866} 867 868ohos_unittest("LNNTopoManagerTest") { 869 module_out_path = module_output_path 870 sources = [ 871 "$dsoftbus_root_path/core/common/message_handler/message_handler.c", 872 "net_builder/src/lnn_net_ledger_mock.cpp", 873 "net_builder/src/lnn_service_mock.cpp", 874 "net_builder/src/lnn_sync_info_mock.cpp", 875 "net_builder/src/lnn_topo_manager_test.cpp", 876 ] 877 878 include_dirs = lnn_mock_test_include_dirs 879 include_dirs += [ "$dsoftbus_root_path/core/authentication/include" ] 880 deps = lnn_mock_test_deps_exclude_softbus_server 881 882 if (is_standard_system) { 883 external_deps = [ 884 "cJSON:cjson", 885 "c_utils:utils", 886 "device_auth:deviceauth_sdk", 887 "googletest:gmock", 888 "googletest:gtest_main", 889 "hilog:libhilog", 890 ] 891 } else { 892 external_deps = [ 893 "cJSON:cjson", 894 "c_utils:utils", 895 "googletest:gmock", 896 "googletest:gtest_main", 897 "hilog:libhilog", 898 ] 899 } 900} 901 902ohos_unittest("LNNBtNetworkImplMockTest") { 903 module_out_path = module_output_path 904 sources = [ 905 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", 906 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_connection_addr_utils.c", 907 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", 908 "net_builder/src/lnn_auth_mock.cpp", 909 "net_buscenter/lnn_bt_network_impl_mock.cpp", 910 "net_buscenter/lnn_bt_network_impl_test.cpp", 911 ] 912 913 include_dirs = [ 914 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 915 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 916 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 917 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src", 918 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 919 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 920 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 921 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 922 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 923 "$dsoftbus_root_path/core/common/include", 924 "$dsoftbus_dfx_path/interface/include", 925 "$dsoftbus_root_path/adapter/common/include", 926 "$dsoftbus_root_path/core/authentication/interface", 927 "$dsoftbus_root_path/core/bus_center/interface", 928 "$dsoftbus_root_path/core/bus_center/utils/include", 929 "$dsoftbus_root_path/interfaces/kits/bus_center", 930 "$dsoftbus_root_path/interfaces/kits/common", 931 "$dsoftbus_root_path/core/adapter/bus_center/include", 932 "$dsoftbus_root_path/core/connection/manager", 933 "$dsoftbus_root_path/adapter/common/bus_center/include/", 934 "$dsoftbus_root_path/core/discovery/manager/include", 935 "$dsoftbus_root_path/core/discovery/interface", 936 "$dsoftbus_root_path/interfaces/kits/bus_center", 937 "$dsoftbus_root_path/interfaces/kits/discovery", 938 "$dsoftbus_root_path/core/bus_center/service/include", 939 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 940 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 941 "$dsoftbus_root_path/core/bus_center/utils/include", 942 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter", 943 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 944 "$dsoftbus_root_path/core/transmission/interface", 945 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 946 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 947 "$dsoftbus_root_path/core/authentication/include", 948 "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", 949 ] 950 951 deps = [ 952 "$dsoftbus_dfx_path:softbus_dfx", 953 "$dsoftbus_root_path/adapter:softbus_adapter", 954 "$dsoftbus_root_path/core/common:softbus_utils", 955 "$dsoftbus_root_path/core/frame:softbus_server", 956 ] 957 958 if (is_standard_system) { 959 external_deps = [ 960 "c_utils:utils", 961 "device_auth:deviceauth_sdk", 962 "dsoftbus:softbus_client", 963 "googletest:gmock", 964 "googletest:gtest_main", 965 "hilog:libhilog", 966 ] 967 } else { 968 external_deps = [ 969 "c_utils:utils", 970 "dsoftbus:softbus_client", 971 "googletest:gmock", 972 "googletest:gtest_main", 973 "hilog:libhilog", 974 ] 975 } 976} 977 978ohos_unittest("LNNNetworkManagerMockTest") { 979 module_out_path = module_output_path 980 sources = [ 981 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_oobe_manager_virtual.cpp", 982 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp", 983 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl_virtual.c", 984 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_fast_offline_virtual.c", 985 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 986 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_common_utils.c", 987 "net_builder/src/lnn_auth_mock.cpp", 988 "net_builder/src/lnn_net_ledger_mock.cpp", 989 "net_buscenter/lnn_network_manager_mock.cpp", 990 "net_buscenter/lnn_network_manager_test.cpp", 991 ] 992 include_dirs = lnn_mock_test_include_dirs 993 include_dirs += [ 994 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 995 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 996 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 997 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src", 998 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 999 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 1000 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1001 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1002 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1003 "$dsoftbus_root_path/core/common/include", 1004 "$dsoftbus_dfx_path/interface/include", 1005 "$dsoftbus_root_path/adapter/common/include", 1006 "$dsoftbus_root_path/core/authentication/interface", 1007 "$dsoftbus_root_path/core/authentication/include", 1008 "$dsoftbus_root_path/core/bus_center/interface", 1009 "$dsoftbus_root_path/core/bus_center/utils/include", 1010 "$dsoftbus_root_path/interfaces/kits/bus_center", 1011 "$dsoftbus_root_path/interfaces/kits/common", 1012 "$dsoftbus_root_path/core/adapter/bus_center/include", 1013 "$dsoftbus_root_path/core/bus_center/monitor/include", 1014 "$dsoftbus_root_path/core/connection/manager", 1015 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1016 "$dsoftbus_root_path/core/discovery/manager/include", 1017 "$dsoftbus_root_path/core/discovery/interface", 1018 "$dsoftbus_root_path/interfaces/kits/bus_center", 1019 "$dsoftbus_root_path/interfaces/kits/discovery", 1020 "$dsoftbus_root_path/core/bus_center/service/include", 1021 "$dsoftbus_root_path/core/bus_center/utils/include", 1022 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 1023 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 1024 "$dsoftbus_root_path/core/bus_center/utils/include", 1025 "$dsoftbus_root_path/core/bus_center/ipc/include", 1026 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter", 1027 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1028 "$dsoftbus_root_path/core/transmission/interface", 1029 "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface", 1030 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1031 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1032 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1033 ] 1034 deps = [ 1035 "$dsoftbus_dfx_path:softbus_dfx", 1036 "$dsoftbus_root_path/adapter:softbus_adapter", 1037 "$dsoftbus_root_path/core/common:softbus_utils", 1038 "$dsoftbus_root_path/core/frame:softbus_server", 1039 ] 1040 1041 if (is_standard_system) { 1042 external_deps = [ 1043 "c_utils:utils", 1044 "device_auth:deviceauth_sdk", 1045 "googletest:gmock", 1046 "googletest:gtest_main", 1047 "hilog:libhilog", 1048 ] 1049 } else { 1050 external_deps = [ 1051 "c_utils:utils", 1052 "googletest:gmock", 1053 "googletest:gtest_main", 1054 "hilog:libhilog", 1055 ] 1056 } 1057} 1058 1059ohos_unittest("LNNIpNetworkImplMockTest") { 1060 module_out_path = module_output_path 1061 sources = [ 1062 "net_builder/src/lnn_net_ledger_mock.cpp", 1063 "net_buscenter/lnn_ip_network_impl_mock.cpp", 1064 "net_buscenter/lnn_ip_network_impl_test.cpp", 1065 ] 1066 1067 include_dirs = [ 1068 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1069 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1070 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1071 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src", 1072 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1073 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 1074 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1075 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1076 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1077 "$dsoftbus_root_path/core/common/include", 1078 "$dsoftbus_dfx_path/interface/include", 1079 "$dsoftbus_root_path/adapter/common/include", 1080 "$dsoftbus_root_path/core/authentication/interface", 1081 "$dsoftbus_root_path/core/bus_center/interface", 1082 "$dsoftbus_root_path/core/bus_center/utils/include", 1083 "$dsoftbus_root_path/interfaces/kits/bus_center", 1084 "$dsoftbus_root_path/interfaces/kits/common", 1085 "$dsoftbus_root_path/core/adapter/bus_center/include", 1086 "$dsoftbus_root_path/core/connection/manager", 1087 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1088 "$dsoftbus_root_path/core/discovery/manager/include", 1089 "$dsoftbus_root_path/core/discovery/interface", 1090 "$dsoftbus_root_path/interfaces/kits/bus_center", 1091 "$dsoftbus_root_path/interfaces/kits/discovery", 1092 "$dsoftbus_root_path/core/bus_center/service/include", 1093 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 1094 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 1095 "$dsoftbus_root_path/core/bus_center/utils/include", 1096 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter", 1097 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1098 "$dsoftbus_root_path/core/transmission/interface", 1099 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1100 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1101 "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include", 1102 "$dsoftbus_root_path/core/authentication/include", 1103 "$dsoftbus_root_path/core/connection/coap/include", 1104 ] 1105 1106 deps = [ 1107 "$dsoftbus_dfx_path:softbus_dfx", 1108 "$dsoftbus_root_path/adapter:softbus_adapter", 1109 "$dsoftbus_root_path/core/common:softbus_utils", 1110 "$dsoftbus_root_path/core/frame:softbus_server", 1111 ] 1112 1113 if (is_standard_system) { 1114 external_deps = [ 1115 "c_utils:utils", 1116 "device_auth:deviceauth_sdk", 1117 "dsoftbus:softbus_client", 1118 "googletest:gmock", 1119 "googletest:gtest_main", 1120 "hilog:libhilog", 1121 ] 1122 } else { 1123 external_deps = [ 1124 "c_utils:utils", 1125 "dsoftbus:softbus_client", 1126 "googletest:gmock", 1127 "googletest:gtest_main", 1128 "hilog:libhilog", 1129 ] 1130 } 1131} 1132 1133ohos_unittest("LNNLedgerMockTest") { 1134 module_out_path = module_output_path 1135 sources = [ 1136 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp", 1137 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c", 1138 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c", 1139 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_ledger.c", 1140 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c", 1141 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c", 1142 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c", 1143 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 1144 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 1145 "net_ledger/lnn_local_ledger_deps_mock.cpp", 1146 "net_ledger/lnn_local_ledger_test.cpp", 1147 ] 1148 1149 include_dirs = [ 1150 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src", 1151 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1152 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1153 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1154 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1155 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 1156 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1157 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1158 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1159 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1160 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1161 "$dsoftbus_root_path/core/bus_center/monitor/include", 1162 "$dsoftbus_root_path/core/common/include", 1163 "$dsoftbus_dfx_path/interface/include", 1164 "$dsoftbus_dfx_path/interface/include/form", 1165 "$dsoftbus_root_path/adapter/common/include", 1166 "$dsoftbus_root_path/core/connection/interface", 1167 "$dsoftbus_root_path/core/connection/p2p/interface", 1168 "$dsoftbus_root_path/core/connection/p2p/common/include", 1169 "$dsoftbus_root_path/core/authentication/interface", 1170 "$dsoftbus_root_path/core/authentication/include", 1171 "$dsoftbus_root_path/core/bus_center/interface", 1172 "$dsoftbus_root_path/core/bus_center/utils/include", 1173 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1174 "$dsoftbus_root_path/interfaces/kits/bus_center", 1175 "$dsoftbus_root_path/interfaces/kits/common", 1176 "$dsoftbus_root_path/core/adapter/bus_center/include", 1177 "unittest/common/", 1178 "$dsoftbus_root_path/core/connection/manager", 1179 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1180 "$dsoftbus_root_path/core/discovery/manager/include", 1181 "$dsoftbus_root_path/core/discovery/interface", 1182 "$dsoftbus_root_path/interfaces/kits/discovery", 1183 "$dsoftbus_root_path/core/bus_center/service/include", 1184 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 1185 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 1186 "lane/include", 1187 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 1188 "$dsoftbus_root_path/interfaces/kits/common", 1189 ] 1190 1191 deps = [ 1192 "$dsoftbus_dfx_path:softbus_dfx", 1193 "$dsoftbus_root_path/adapter:softbus_adapter", 1194 "$dsoftbus_root_path/core/common:softbus_utils", 1195 "$dsoftbus_root_path/core/frame:softbus_server", 1196 ] 1197 1198 if (is_standard_system) { 1199 external_deps = [ 1200 "cJSON:cjson", 1201 "c_utils:utils", 1202 "device_auth:deviceauth_sdk", 1203 "googletest:gmock", 1204 "googletest:gtest_main", 1205 "hilog:libhilog", 1206 ] 1207 } else { 1208 external_deps = [ 1209 "cJSON:cjson", 1210 "c_utils:utils", 1211 "googletest:gmock", 1212 "googletest:gtest_main", 1213 "hilog:libhilog", 1214 ] 1215 } 1216 external_deps += [ "huks:libhukssdk" ] 1217} 1218 1219ohos_unittest("LNNNetLedgerCommonTest") { 1220 module_out_path = module_output_path 1221 sources = [ 1222 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_oobe_manager_virtual.cpp", 1223 "net_ledger/lnn_ledger_common_test.cpp", 1224 "net_ledger/lnn_net_ledger_common_mock.cpp", 1225 ] 1226 1227 include_dirs = [ 1228 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1229 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1230 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 1231 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1232 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1233 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 1234 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1235 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1236 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1237 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1238 "$dsoftbus_root_path/core/bus_center/monitor/include", 1239 "$dsoftbus_root_path/core/authentication/include", 1240 "$dsoftbus_root_path/core/common/include", 1241 "$dsoftbus_dfx_path/interface/include", 1242 "$dsoftbus_root_path/adapter/common/include", 1243 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1244 "$dsoftbus_root_path/core/connection/interface", 1245 "$dsoftbus_root_path/core/connection/p2p/interface", 1246 "$dsoftbus_root_path/core/connection/p2p/common/include", 1247 "$dsoftbus_root_path/core/authentication/interface", 1248 "$dsoftbus_root_path/core/bus_center/interface", 1249 "$dsoftbus_root_path/core/bus_center/utils/include", 1250 "$dsoftbus_root_path/interfaces/kits/bus_center", 1251 "$dsoftbus_root_path/interfaces/kits/common", 1252 "$dsoftbus_root_path/core/adapter/bus_center/include", 1253 "unittest/common/", 1254 "$dsoftbus_root_path/core/connection/manager", 1255 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1256 "$dsoftbus_root_path/core/discovery/manager/include", 1257 "$dsoftbus_root_path/core/discovery/interface", 1258 "$dsoftbus_root_path/interfaces/kits/bus_center", 1259 "$dsoftbus_root_path/interfaces/kits/discovery", 1260 "$dsoftbus_root_path/core/bus_center/service/include", 1261 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 1262 ] 1263 1264 deps = [ 1265 "$dsoftbus_dfx_path:softbus_dfx", 1266 "$dsoftbus_root_path/adapter:softbus_adapter", 1267 "$dsoftbus_root_path/core/common:softbus_utils", 1268 "$dsoftbus_root_path/core/frame:softbus_server", 1269 ] 1270 if (dsoftbus_feature_lnn_frame) { 1271 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ] 1272 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c" ] 1273 } else { 1274 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ] 1275 } 1276 if (is_standard_system) { 1277 external_deps = [ 1278 "cJSON:cjson", 1279 "c_utils:utils", 1280 "device_auth:deviceauth_sdk", 1281 "dsoftbus:softbus_client", 1282 "googletest:gmock", 1283 "googletest:gtest_main", 1284 "hilog:libhilog", 1285 ] 1286 } else { 1287 external_deps = [ 1288 "cJSON:cjson", 1289 "c_utils:utils", 1290 "dsoftbus:softbus_client", 1291 "googletest:gmock", 1292 "googletest:gtest_main", 1293 "hilog:libhilog", 1294 ] 1295 } 1296 external_deps += [ "huks:libhukssdk" ] 1297} 1298 1299ohos_unittest("LNNDisctributedLedgerTest") { 1300 module_out_path = module_output_path 1301 sources = [ "net_ledger/lnn_disctributed_net_ledger_test.cpp" ] 1302 1303 include_dirs = [ 1304 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1305 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1306 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1307 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1308 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 1309 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1310 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src", 1311 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1312 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1313 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src", 1314 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1315 "$dsoftbus_root_path/core/bus_center/monitor/include", 1316 "$dsoftbus_root_path/core/authentication/include", 1317 "$dsoftbus_root_path/core/common/include", 1318 "$dsoftbus_dfx_path/interface/include", 1319 "$dsoftbus_root_path/adapter/common/include", 1320 "$dsoftbus_root_path/core/connection/interface", 1321 "$dsoftbus_root_path/core/connection/p2p/interface", 1322 "$dsoftbus_root_path/core/connection/p2p/common/include", 1323 "$dsoftbus_root_path/core/authentication/interface", 1324 "$dsoftbus_root_path/core/bus_center/interface", 1325 "$dsoftbus_root_path/core/bus_center/utils/include", 1326 "$dsoftbus_root_path/core/bus_center/utils/src", 1327 "$dsoftbus_root_path/interfaces/kits/bus_center", 1328 "$dsoftbus_root_path/interfaces/kits/common", 1329 "$dsoftbus_root_path/core/adapter/bus_center/include", 1330 "unittest/common/", 1331 "$dsoftbus_root_path/core/connection/manager", 1332 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1333 "$dsoftbus_root_path/core/discovery/manager/include", 1334 "$dsoftbus_root_path/core/discovery/interface", 1335 "$dsoftbus_root_path/interfaces/kits/discovery", 1336 "$dsoftbus_root_path/core/bus_center/service/include", 1337 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 1338 ] 1339 1340 deps = [ 1341 "$dsoftbus_dfx_path:softbus_dfx", 1342 "$dsoftbus_root_path/adapter:softbus_adapter", 1343 "$dsoftbus_root_path/core/common:softbus_utils", 1344 "$dsoftbus_root_path/core/frame:softbus_server", 1345 ] 1346 if (is_standard_system) { 1347 external_deps = [ 1348 "cJSON:cjson", 1349 "c_utils:utils", 1350 "device_auth:deviceauth_sdk", 1351 "dsoftbus:softbus_client", 1352 "googletest:gmock", 1353 "googletest:gtest_main", 1354 "hilog:libhilog", 1355 ] 1356 } else { 1357 external_deps = [ 1358 "cJSON:cjson", 1359 "c_utils:utils", 1360 "dsoftbus:softbus_client", 1361 "googletest:gmock", 1362 "googletest:gtest_main", 1363 "hilog:libhilog", 1364 ] 1365 } 1366 external_deps += [ "huks:libhukssdk" ] 1367} 1368 1369ohos_unittest("LNNMetaNodeLedgerTest") { 1370 module_out_path = module_output_path 1371 sources = [ "net_ledger/lnn_meta_node_ledger_test.cpp" ] 1372 1373 include_dirs = [ 1374 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1375 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1376 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1377 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1378 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 1379 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1380 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1381 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1382 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1383 "$dsoftbus_root_path/core/bus_center/monitor/include", 1384 "$dsoftbus_root_path/core/authentication/include", 1385 "$dsoftbus_root_path/core/common/include", 1386 "$dsoftbus_dfx_path/interface/include", 1387 "$dsoftbus_root_path/adapter/common/include", 1388 "$dsoftbus_root_path/core/connection/interface", 1389 "$dsoftbus_root_path/core/connection/p2p/interface", 1390 "$dsoftbus_root_path/core/connection/p2p/common/include", 1391 "$dsoftbus_root_path/core/authentication/interface", 1392 "$dsoftbus_root_path/core/bus_center/interface", 1393 "$dsoftbus_root_path/core/bus_center/utils/include", 1394 "$dsoftbus_root_path/interfaces/kits/bus_center", 1395 "$dsoftbus_root_path/interfaces/kits/common", 1396 "$dsoftbus_root_path/core/adapter/bus_center/include", 1397 "unittest/common/", 1398 "$dsoftbus_root_path/core/connection/manager", 1399 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1400 "$dsoftbus_root_path/core/discovery/manager/include", 1401 "$dsoftbus_root_path/core/discovery/interface", 1402 "$dsoftbus_root_path/interfaces/kits/bus_center", 1403 "$dsoftbus_root_path/interfaces/kits/discovery", 1404 "$dsoftbus_root_path/core/bus_center/service/include", 1405 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 1406 ] 1407 1408 deps = [ 1409 "$dsoftbus_dfx_path:softbus_dfx", 1410 "$dsoftbus_root_path/adapter:softbus_adapter", 1411 "$dsoftbus_root_path/core/common:softbus_utils", 1412 "$dsoftbus_root_path/core/frame:softbus_server", 1413 ] 1414 if (dsoftbus_feature_lnn_frame) { 1415 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ] 1416 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c" ] 1417 } else { 1418 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ] 1419 } 1420 if (is_standard_system) { 1421 external_deps = [ 1422 "cJSON:cjson", 1423 "c_utils:utils", 1424 "device_auth:deviceauth_sdk", 1425 "dsoftbus:softbus_client", 1426 "googletest:gmock", 1427 "googletest:gtest_main", 1428 "hilog:libhilog", 1429 ] 1430 } else { 1431 external_deps = [ 1432 "cJSON:cjson", 1433 "c_utils:utils", 1434 "dsoftbus:softbus_client", 1435 "googletest:gmock", 1436 "googletest:gtest_main", 1437 "hilog:libhilog", 1438 ] 1439 } 1440 external_deps += [ "huks:libhukssdk" ] 1441} 1442 1443ohos_unittest("LNNLaneExtMockTest") { 1444 module_out_path = module_output_path 1445 sources = [ 1446 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils_virtual.c", 1447 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c", 1448 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", 1449 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c", 1450 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c", 1451 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 1452 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c", 1453 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_conflict.c", 1454 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_ledger.c", 1455 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c", 1456 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c", 1457 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_model.c", 1458 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c", 1459 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c", 1460 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c", 1461 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_free_lane.c", 1462 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c", 1463 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 1464 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", 1465 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 1466 "lane/src/lnn_lane_deps_mock.cpp", 1467 "lane/src/lnn_lane_ext_test.cpp", 1468 "lane/src/lnn_lane_power_ctrl_deps_mock.cpp", 1469 "lane/src/lnn_wifi_adpter_mock.cpp", 1470 ] 1471 1472 include_dirs = [ 1473 "lane/include", 1474 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1475 "$dsoftbus_root_path/adapter/common/include", 1476 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1477 "$dsoftbus_root_path/adapter/common/net/hdi/include", 1478 "$dsoftbus_root_path/adapter/common/net/wifi/include", 1479 "$dsoftbus_root_path/core/adapter/bus_center/include", 1480 "$dsoftbus_root_path/core/authentication/include", 1481 "$dsoftbus_root_path/core/authentication/interface", 1482 "$dsoftbus_root_path/core/bus_center/interface", 1483 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 1484 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1485 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 1486 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1487 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1488 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 1489 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 1490 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1491 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1492 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1493 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1494 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1495 "$dsoftbus_root_path/core/bus_center/monitor/include", 1496 "$dsoftbus_root_path/core/bus_center/service/include", 1497 "$dsoftbus_root_path/core/bus_center/utils/include", 1498 "$dsoftbus_dfx_path/interface/include", 1499 "$dsoftbus_root_path/core/common/include", 1500 "$dsoftbus_root_path/core/connection/ble/include", 1501 "$dsoftbus_root_path/core/connection/interface", 1502 "$dsoftbus_root_path/core/connection/p2p/common/include", 1503 "$dsoftbus_root_path/core/connection/p2p/interface", 1504 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 1505 "$dsoftbus_root_path/core/discovery/interface", 1506 "$dsoftbus_root_path/core/discovery/manager/include", 1507 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1508 "$dsoftbus_root_path/interfaces/kits/bus_center", 1509 "$dsoftbus_root_path/interfaces/kits/common", 1510 "$dsoftbus_root_path/interfaces/kits/discovery", 1511 "$dsoftbus_root_path/dfx/interface/include/form", 1512 "unittest/common/", 1513 ] 1514 1515 if (enhanced_test) { 1516 sources += [ 1517 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/lnn_lane_prelink.c", 1518 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/lnn_lane_score.c", 1519 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/channel_rating_v2.c", 1520 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/lnn_rating_manager.c", 1521 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_collector.c", 1522 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_sync.c", 1523 ] 1524 include_dirs += [ 1525 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/include", 1526 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/include", 1527 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/wifi_direct_cpp", 1528 "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/action/adapter/include", 1529 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 1530 "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include", 1531 "$dsoftbus_root_path/core/discovery/ble/dispatcher/include", 1532 ] 1533 } else { 1534 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c" ] 1535 } 1536 1537 deps = [ 1538 "$dsoftbus_dfx_path:softbus_dfx", 1539 "$dsoftbus_root_path/adapter:softbus_adapter", 1540 "$dsoftbus_root_path/core/common:softbus_utils", 1541 ] 1542 1543 if (is_standard_system) { 1544 external_deps = [ 1545 "cJSON:cjson", 1546 "c_utils:utils", 1547 "device_auth:deviceauth_sdk", 1548 "googletest:gmock", 1549 "googletest:gtest_main", 1550 "hilog:libhilog", 1551 ] 1552 if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) { 1553 external_deps += [ "wifi:wifi_sdk" ] 1554 } 1555 } else { 1556 external_deps = [ 1557 "cJSON:cjson", 1558 "c_utils:utils", 1559 "googletest:gmock", 1560 "googletest:gtest_main", 1561 "hilog:libhilog", 1562 "wifi:wifi_sdk", 1563 ] 1564 } 1565} 1566 1567ohos_unittest("LNNLaneLinkLedgerTest") { 1568 module_out_path = module_output_path 1569 sources = [ 1570 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_ledger.c", 1571 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 1572 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_ledger_test.cpp", 1573 ] 1574 1575 include_dirs = [ 1576 "lane/include", 1577 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1578 "$dsoftbus_root_path/core/bus_center/utils/include/", 1579 "$dsoftbus_root_path/core/bus_center/interface", 1580 "$dsoftbus_root_path/adapter/common/net/wifi/include", 1581 "$dsoftbus_root_path/core/bus_center/interface", 1582 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1583 "$dsoftbus_root_path/core/discovery/manager/include", 1584 "$dsoftbus_root_path/core/discovery/interface", 1585 "$dsoftbus_root_path/interfaces/kits/bus_center", 1586 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1587 "$dsoftbus_root_path/adapter/common/net/hdi/include", 1588 ] 1589 1590 if (enhanced_test) { 1591 sources += [ 1592 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/lnn_lane_score.c", 1593 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/channel_rating_v2.c", 1594 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/lnn_rating_manager.c", 1595 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_collector.c", 1596 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_sync.c", 1597 ] 1598 include_dirs += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/include" ] 1599 } else { 1600 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c" ] 1601 } 1602 1603 deps = [ 1604 "$dsoftbus_dfx_path:softbus_dfx", 1605 "$dsoftbus_root_path/adapter:softbus_adapter", 1606 "$dsoftbus_root_path/core/common:softbus_utils", 1607 ] 1608 1609 if (is_standard_system) { 1610 external_deps = [ 1611 "cJSON:cjson", 1612 "c_utils:utils", 1613 "device_auth:deviceauth_sdk", 1614 "googletest:gmock", 1615 "googletest:gtest_main", 1616 "hilog:libhilog", 1617 ] 1618 if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) { 1619 external_deps += [ "wifi:wifi_sdk" ] 1620 } 1621 } else { 1622 external_deps = [ 1623 "cJSON:cjson", 1624 "c_utils:utils", 1625 "googletest:gmock", 1626 "googletest:gtest_main", 1627 "hilog:libhilog", 1628 "wifi:wifi_sdk", 1629 ] 1630 } 1631} 1632 1633ohos_unittest("LNNLaneMockTest") { 1634 module_out_path = module_output_path 1635 sources = [ 1636 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils_virtual.c", 1637 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c", 1638 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", 1639 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c", 1640 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c", 1641 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 1642 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c", 1643 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_conflict.c", 1644 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_ledger.c", 1645 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c", 1646 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c", 1647 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_model.c", 1648 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_power_control_virtual.c", 1649 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c", 1650 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c", 1651 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_parameter_utils_virtual.c", 1652 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c", 1653 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_free_lane.c", 1654 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c", 1655 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 1656 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", 1657 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 1658 "lane/src/lnn_lane_deps_mock.cpp", 1659 "lane/src/lnn_lane_test.cpp", 1660 "lane/src/lnn_wifi_adpter_mock.cpp", 1661 ] 1662 1663 include_dirs = [ 1664 "lane/include", 1665 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1666 "$dsoftbus_root_path/adapter/common/include", 1667 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1668 "$dsoftbus_root_path/adapter/common/net/hdi/include", 1669 "$dsoftbus_root_path/adapter/common/net/wifi/include", 1670 "$dsoftbus_root_path/core/adapter/bus_center/include", 1671 "$dsoftbus_root_path/core/authentication/include", 1672 "$dsoftbus_root_path/core/authentication/interface", 1673 "$dsoftbus_root_path/core/bus_center/interface", 1674 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 1675 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1676 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 1677 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1678 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1679 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 1680 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 1681 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1682 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1683 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1684 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1685 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1686 "$dsoftbus_root_path/core/bus_center/monitor/include", 1687 "$dsoftbus_root_path/core/bus_center/service/include", 1688 "$dsoftbus_root_path/core/bus_center/utils/include", 1689 "$dsoftbus_dfx_path/interface/include", 1690 "$dsoftbus_root_path/core/common/include", 1691 "$dsoftbus_root_path/core/connection/ble/include", 1692 "$dsoftbus_root_path/core/connection/interface", 1693 "$dsoftbus_root_path/core/connection/p2p/common/include", 1694 "$dsoftbus_root_path/core/connection/p2p/interface", 1695 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 1696 "$dsoftbus_root_path/core/discovery/interface", 1697 "$dsoftbus_root_path/core/discovery/manager/include", 1698 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1699 "$dsoftbus_root_path/interfaces/kits/bus_center", 1700 "$dsoftbus_root_path/interfaces/kits/common", 1701 "$dsoftbus_root_path/interfaces/kits/discovery", 1702 "$dsoftbus_root_path/dfx/interface/include/form", 1703 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/include", 1704 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/wifi_direct_cpp", 1705 "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/action/adapter/include", 1706 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 1707 "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include", 1708 "$dsoftbus_root_path/core/discovery/ble/dispatcher/include", 1709 "unittest/common/", 1710 ] 1711 1712 if (enhanced_test) { 1713 sources += [ 1714 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/lnn_lane_prelink.c", 1715 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/lnn_lane_score.c", 1716 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/channel_rating_v2.c", 1717 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/lnn_rating_manager.c", 1718 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_collector.c", 1719 "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_sync.c", 1720 ] 1721 include_dirs += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/include" ] 1722 } else { 1723 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c" ] 1724 } 1725 1726 deps = [ 1727 "$dsoftbus_dfx_path:softbus_dfx", 1728 "$dsoftbus_root_path/adapter:softbus_adapter", 1729 "$dsoftbus_root_path/core/common:softbus_utils", 1730 ] 1731 1732 if (is_standard_system) { 1733 external_deps = [ 1734 "cJSON:cjson", 1735 "c_utils:utils", 1736 "device_auth:deviceauth_sdk", 1737 "googletest:gmock", 1738 "googletest:gtest_main", 1739 "hilog:libhilog", 1740 ] 1741 if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) { 1742 external_deps += [ "wifi:wifi_sdk" ] 1743 } 1744 } else { 1745 external_deps = [ 1746 "cJSON:cjson", 1747 "c_utils:utils", 1748 "googletest:gmock", 1749 "googletest:gtest_main", 1750 "hilog:libhilog", 1751 "wifi:wifi_sdk", 1752 ] 1753 } 1754} 1755 1756ohos_unittest("LNNLaneQueryTest") { 1757 module_out_path = module_output_path 1758 sources = [ 1759 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", 1760 "lane/src/lnn_lane_query_deps_mock.cpp", 1761 "lane/src/lnn_lane_query_test.cpp", 1762 ] 1763 1764 include_dirs = [ 1765 "$dsoftbus_root_path/core/adapter/bus_center/include", 1766 "$dsoftbus_root_path/core/authentication/include", 1767 "$dsoftbus_root_path/core/authentication/interface", 1768 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1769 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 1770 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1771 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1772 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1773 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1774 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1775 "$dsoftbus_root_path/core/bus_center/interface", 1776 "$dsoftbus_root_path/core/bus_center/utils/include", 1777 "$dsoftbus_root_path/core/bus_center/service/include", 1778 "$dsoftbus_root_path/core/common/include", 1779 "$dsoftbus_dfx_path/interface/include", 1780 "$dsoftbus_root_path/adapter/common/include", 1781 "$dsoftbus_root_path/adapter/common/bus_center/include/", 1782 "$dsoftbus_root_path/adapter/common/net/wifi/include", 1783 "$dsoftbus_root_path/core/connection/interface", 1784 "$dsoftbus_root_path/core/connection/p2p/interface", 1785 "$dsoftbus_root_path/core/connection/p2p/common/include", 1786 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 1787 "$dsoftbus_root_path/core/discovery/manager/include", 1788 "$dsoftbus_root_path/core/discovery/interface", 1789 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1790 "$dsoftbus_root_path/interfaces/kits/bus_center", 1791 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include", 1792 "$dsoftbus_root_path/dfx/interface/include/form", 1793 "unittest/common/", 1794 ] 1795 1796 deps = [ 1797 "$dsoftbus_dfx_path:softbus_dfx", 1798 "$dsoftbus_root_path/adapter:softbus_adapter", 1799 "$dsoftbus_root_path/core/common:softbus_utils", 1800 ] 1801 1802 if (is_standard_system) { 1803 external_deps = [ 1804 "cJSON:cjson", 1805 "c_utils:utils", 1806 "device_auth:deviceauth_sdk", 1807 "googletest:gmock", 1808 "googletest:gtest_main", 1809 "hilog:libhilog", 1810 ] 1811 } else { 1812 external_deps = [ 1813 "cJSON:cjson", 1814 "c_utils:utils", 1815 "googletest:gtest_main", 1816 "hilog:libhilog", 1817 ] 1818 } 1819} 1820 1821ohos_unittest("LNNLaneLinkTest") { 1822 module_out_path = module_output_path 1823 sources = [ 1824 "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c", 1825 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", 1826 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c", 1827 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c", 1828 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 1829 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c", 1830 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c", 1831 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_prelink_virtual.c", 1832 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c", 1833 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c", 1834 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c", 1835 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c", 1836 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 1837 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", 1838 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", 1839 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp", 1840 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp", 1841 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_test.cpp", 1842 ] 1843 1844 if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature) { 1845 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ] 1846 } else { 1847 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ] 1848 } 1849 1850 include_dirs = [ 1851 "$dsoftbus_root_path/adapter/common/include", 1852 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1853 "$dsoftbus_root_path/adapter/common/net/wifi/include", 1854 "$dsoftbus_root_path/core/authentication/include", 1855 "$dsoftbus_root_path/core/authentication/interface", 1856 "$dsoftbus_root_path/core/adapter/bus_center/include", 1857 "$dsoftbus_root_path/core/bus_center/interface", 1858 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 1859 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1860 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 1861 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1862 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 1863 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1864 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1865 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1866 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1867 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1868 "$dsoftbus_root_path/core/bus_center/monitor/include", 1869 "$dsoftbus_root_path/core/bus_center/service/include", 1870 "$dsoftbus_root_path/core/bus_center/utils/include", 1871 "$dsoftbus_dfx_path/interface/include", 1872 "$dsoftbus_root_path/core/common/include", 1873 "$dsoftbus_root_path/core/connection/ble/include", 1874 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 1875 "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils", 1876 "$dsoftbus_root_path/core/discovery/interface", 1877 "$dsoftbus_root_path/core/discovery/manager/include", 1878 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1879 "$dsoftbus_root_path/interfaces/kits/bus_center", 1880 "$dsoftbus_root_path/interfaces/kits/common", 1881 "$dsoftbus_root_path/interfaces/kits/discovery", 1882 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include", 1883 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 1884 "$dsoftbus_root_path/core/adapter/bus_center/include", 1885 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 1886 "$dsoftbus_root_path/dfx/interface/include/form", 1887 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1888 ] 1889 1890 deps = [ 1891 "$dsoftbus_dfx_path:softbus_dfx", 1892 "$dsoftbus_root_path/adapter:softbus_adapter", 1893 "$dsoftbus_root_path/core/common:softbus_utils", 1894 ] 1895 1896 if (is_standard_system) { 1897 external_deps = [ 1898 "c_utils:utils", 1899 "device_auth:deviceauth_sdk", 1900 "googletest:gmock", 1901 "googletest:gtest_main", 1902 "hilog:libhilog", 1903 ] 1904 } else { 1905 external_deps = [ 1906 "c_utils:utils", 1907 "googletest:gmock", 1908 "googletest:gtest_main", 1909 "hilog:libhilog", 1910 ] 1911 } 1912} 1913 1914ohos_unittest("LNNLaneLinkExtTest") { 1915 module_out_path = module_output_path 1916 sources = [ 1917 "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c", 1918 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", 1919 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c", 1920 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 1921 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c", 1922 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c", 1923 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_prelink_virtual.c", 1924 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c", 1925 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c", 1926 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c", 1927 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c", 1928 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 1929 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", 1930 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp", 1931 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_net_capability_mock.cpp", 1932 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp", 1933 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_ext_test.cpp", 1934 ] 1935 1936 if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature) { 1937 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ] 1938 } else { 1939 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ] 1940 } 1941 1942 include_dirs = [ 1943 "$dsoftbus_root_path/adapter/common/include", 1944 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 1945 "$dsoftbus_root_path/adapter/common/net/wifi/include", 1946 "$dsoftbus_root_path/core/authentication/include", 1947 "$dsoftbus_root_path/core/authentication/interface", 1948 "$dsoftbus_root_path/core/adapter/bus_center/include", 1949 "$dsoftbus_root_path/core/bus_center/interface", 1950 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 1951 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 1952 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 1953 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 1954 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 1955 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 1956 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 1957 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 1958 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 1959 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 1960 "$dsoftbus_root_path/core/bus_center/monitor/include", 1961 "$dsoftbus_root_path/core/bus_center/service/include", 1962 "$dsoftbus_root_path/core/bus_center/utils/include", 1963 "$dsoftbus_dfx_path/interface/include", 1964 "$dsoftbus_root_path/core/common/include", 1965 "$dsoftbus_root_path/core/connection/ble/include", 1966 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 1967 "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils", 1968 "$dsoftbus_root_path/core/discovery/interface", 1969 "$dsoftbus_root_path/core/discovery/manager/include", 1970 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 1971 "$dsoftbus_root_path/interfaces/kits/bus_center", 1972 "$dsoftbus_root_path/interfaces/kits/common", 1973 "$dsoftbus_root_path/interfaces/kits/discovery", 1974 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include", 1975 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 1976 "$dsoftbus_root_path/core/adapter/bus_center/include", 1977 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 1978 "$dsoftbus_root_path/dfx/interface/include/form", 1979 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 1980 ] 1981 1982 deps = [ 1983 "$dsoftbus_dfx_path:softbus_dfx", 1984 "$dsoftbus_root_path/adapter:softbus_adapter", 1985 "$dsoftbus_root_path/core/common:softbus_utils", 1986 ] 1987 1988 if (is_standard_system) { 1989 external_deps = [ 1990 "c_utils:utils", 1991 "device_auth:deviceauth_sdk", 1992 "googletest:gmock", 1993 "googletest:gtest_main", 1994 "hilog:libhilog", 1995 ] 1996 } else { 1997 external_deps = [ 1998 "c_utils:utils", 1999 "googletest:gmock", 2000 "googletest:gtest_main", 2001 "hilog:libhilog", 2002 ] 2003 } 2004} 2005 2006ohos_unittest("LNNLaneHubTest") { 2007 module_out_path = module_output_path 2008 sources = [ 2009 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/src/lnn_lane_hub.c", 2010 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_lane_hub_deps_mock.cpp", 2011 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_lane_hub_test.cpp", 2012 ] 2013 2014 include_dirs = [ 2015 "lane/include", 2016 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2017 "$dsoftbus_root_path/interfaces/kits/bus_center", 2018 "$dsoftbus_root_path/core/bus_center/interface", 2019 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2020 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2021 "$dsoftbus_root_path/core/bus_center/service/include", 2022 "$dsoftbus_root_path/core/bus_center/lnn/lane/lane_hub/", 2023 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2024 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_qos/include", 2025 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include", 2026 ] 2027 2028 deps = [ 2029 "$dsoftbus_dfx_path:softbus_dfx", 2030 "$dsoftbus_root_path/adapter:softbus_adapter", 2031 "$dsoftbus_root_path/core/common:softbus_utils", 2032 ] 2033 2034 external_deps = [ 2035 "googletest:gmock_main", 2036 "googletest:gtest_main", 2037 "hilog:libhilog", 2038 ] 2039 2040 if (is_standard_system) { 2041 external_deps += [ 2042 "c_utils:utils", 2043 "device_auth:deviceauth_sdk", 2044 ] 2045 } 2046} 2047 2048ohos_unittest("LNNTransLaneMockTest") { 2049 module_out_path = module_output_path 2050 sources = [ 2051 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils_virtual.c", 2052 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_change_channel_virtual.c", 2053 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c", 2054 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 2055 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_prelink_virtual.c", 2056 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_reliability.c", 2057 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_parameter_utils_virtual.c", 2058 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_free_lane.c", 2059 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c", 2060 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 2061 "lane/src/lnn_lane_deps_mock.cpp", 2062 "lane/src/lnn_wifi_adpter_mock.cpp", 2063 "lane/trans_lane/lnn_trans_lane_deps_mock.cpp", 2064 "lane/trans_lane/lnn_trans_lane_test.cpp", 2065 ] 2066 2067 include_dirs = [ 2068 "lane/include", 2069 "lane/trans_lane", 2070 "$dsoftbus_root_path/adapter/common/include", 2071 "$dsoftbus_root_path/adapter/common/bus_center/include/", 2072 "$dsoftbus_root_path/adapter/common/net/hdi/include", 2073 "$dsoftbus_root_path/adapter/common/net/wifi/include", 2074 "$dsoftbus_root_path/core/adapter/bus_center/include", 2075 "$dsoftbus_root_path/core/authentication/include", 2076 "$dsoftbus_root_path/core/authentication/interface", 2077 "$dsoftbus_root_path/core/bus_center/interface", 2078 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 2079 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2080 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2081 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2082 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2083 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 2084 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2085 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2086 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2087 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2088 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2089 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2090 "$dsoftbus_root_path/core/bus_center/monitor/include", 2091 "$dsoftbus_root_path/core/bus_center/service/include", 2092 "$dsoftbus_root_path/core/bus_center/utils/include", 2093 "$dsoftbus_root_path/core/common/include", 2094 "$dsoftbus_dfx_path/interface/include", 2095 "$dsoftbus_root_path/core/connection/ble/include", 2096 "$dsoftbus_root_path/core/connection/interface", 2097 "$dsoftbus_root_path/core/connection/p2p/interface", 2098 "$dsoftbus_root_path/core/connection/p2p/common/include", 2099 "$dsoftbus_root_path/core/discovery/manager/include", 2100 "$dsoftbus_root_path/core/discovery/interface", 2101 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2102 "$dsoftbus_root_path/interfaces/kits/bus_center", 2103 "$dsoftbus_root_path/interfaces/kits/common", 2104 "$dsoftbus_root_path/interfaces/kits/discovery", 2105 "$dsoftbus_root_path/dfx/interface/include/form", 2106 "unittest/common/", 2107 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 2108 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 2109 ] 2110 2111 deps = [ 2112 "$dsoftbus_dfx_path:softbus_dfx", 2113 "$dsoftbus_root_path/adapter:softbus_adapter", 2114 "$dsoftbus_root_path/core/common:softbus_utils", 2115 ] 2116 2117 if (is_standard_system) { 2118 external_deps = [ 2119 "cJSON:cjson", 2120 "c_utils:utils", 2121 "device_auth:deviceauth_sdk", 2122 "googletest:gmock", 2123 "googletest:gtest_main", 2124 "hilog:libhilog", 2125 ] 2126 if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) { 2127 external_deps += [ "wifi:wifi_sdk" ] 2128 } 2129 } else { 2130 external_deps = [ 2131 "cJSON:cjson", 2132 "c_utils:utils", 2133 "googletest:gmock", 2134 "googletest:gtest_main", 2135 "hilog:libhilog", 2136 "wifi:wifi_sdk", 2137 ] 2138 } 2139} 2140 2141ohos_unittest("LNNDiscoveryInterfaceTest") { 2142 module_out_path = module_output_path 2143 sources = [ 2144 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp", 2145 "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp", 2146 "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c", 2147 "$dsoftbus_root_path/core/authentication/src/auth_interface.c", 2148 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src/lnn_coap_adapter_virtual.c", 2149 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src/lnn_discovery_interface.c", 2150 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 2151 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_file_utils.c", 2152 "$dsoftbus_root_path/tests/core/authentication/unittest/auth_common_mock.cpp", 2153 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp", 2154 "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/bus_center_mock.cpp", 2155 "disc_mgr/disc_manager_mock.cpp", 2156 "disc_mgr/lnn_discovery_interface_test.cpp", 2157 ] 2158 2159 include_dirs = [ 2160 "disc_mgr", 2161 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 2162 "$dsoftbus_root_path/adapter/common/include", 2163 "$dsoftbus_root_path/core/adapter/bus_center/include", 2164 "$dsoftbus_root_path/core/authentication/include", 2165 "$dsoftbus_root_path/core/authentication/interface", 2166 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2167 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src", 2168 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2169 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2170 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2171 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2172 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2173 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2174 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 2175 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2176 "$dsoftbus_root_path/core/bus_center/utils/include", 2177 "$dsoftbus_root_path/core/bus_center/interface", 2178 "$dsoftbus_root_path/core/bus_center/service/include", 2179 "$dsoftbus_root_path/core/common/include", 2180 "$dsoftbus_dfx_path/interface/include", 2181 "$dsoftbus_root_path/core/connection/interface", 2182 "$dsoftbus_root_path/core/bus_center/monitor/include", 2183 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2184 "$dsoftbus_root_path/core/discovery/manager/include", 2185 "$dsoftbus_root_path/core/discovery/interface", 2186 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2187 "$dsoftbus_root_path/interfaces/kits/discovery", 2188 "$dsoftbus_root_path/interfaces/kits/common", 2189 "$dsoftbus_root_path/interfaces/kits/bus_center", 2190 "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock", 2191 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 2192 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2193 ] 2194 2195 deps = [ 2196 "$dsoftbus_dfx_path:softbus_dfx", 2197 "$dsoftbus_root_path/adapter:softbus_adapter", 2198 "$dsoftbus_root_path/core/common:softbus_utils", 2199 ] 2200 2201 if (is_standard_system) { 2202 external_deps = [ 2203 "bounds_checking_function:libsec_shared", 2204 "c_utils:utils", 2205 "device_auth:deviceauth_sdk", 2206 "googletest:gmock", 2207 "googletest:gtest_main", 2208 "hilog:libhilog", 2209 "huks:libhukssdk", 2210 ] 2211 } else { 2212 external_deps = [ 2213 "bounds_checking_function:libsec_shared", 2214 "c_utils:utils", 2215 "device_auth:deviceauth_sdk", 2216 "googletest:gmock", 2217 "googletest:gtest_main", 2218 "hilog:libhilog", 2219 "huks:libhukssdk", 2220 ] 2221 } 2222} 2223 2224ohos_unittest("LNNLaneListenerTest") { 2225 module_out_path = module_output_path 2226 sources = [ 2227 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", 2228 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_parameter_utils_virtual.c", 2229 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 2230 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp", 2231 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_net_capability_mock.cpp", 2232 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_listener/lnn_lane_listener_deps_mock.cpp", 2233 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_listener/lnn_lane_listener_test.cpp", 2234 ] 2235 2236 include_dirs = [ 2237 "lane/include", 2238 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 2239 "$dsoftbus_root_path/core/authentication/include", 2240 "$dsoftbus_root_path/core/authentication/interface", 2241 "$dsoftbus_root_path/core/adapter/bus_center/include", 2242 "$dsoftbus_root_path/core/bus_center/interface", 2243 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 2244 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2245 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2246 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2247 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 2248 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2249 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2250 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2251 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2252 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2253 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2254 "$dsoftbus_root_path/core/bus_center/monitor/include", 2255 "$dsoftbus_root_path/core/bus_center/service/include", 2256 "$dsoftbus_root_path/core/bus_center/utils/include", 2257 "$dsoftbus_root_path/core/connection/ble/include", 2258 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 2259 "$dsoftbus_root_path/core/discovery/interface", 2260 "$dsoftbus_root_path/core/discovery/manager/include", 2261 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2262 "$dsoftbus_root_path/interfaces/kits/bus_center", 2263 "$dsoftbus_root_path/interfaces/kits/discovery", 2264 "$dsoftbus_root_path/dfx/interface/include/form", 2265 ] 2266 2267 deps = [ 2268 "$dsoftbus_dfx_path:softbus_dfx", 2269 "$dsoftbus_root_path/adapter:softbus_adapter", 2270 "$dsoftbus_root_path/core/common:softbus_utils", 2271 ] 2272 2273 if (is_standard_system) { 2274 external_deps = [ 2275 "c_utils:utils", 2276 "device_auth:deviceauth_sdk", 2277 "googletest:gmock", 2278 "googletest:gtest_main", 2279 "hilog:libhilog", 2280 ] 2281 } else { 2282 external_deps = [ 2283 "c_utils:utils", 2284 "googletest:gmock", 2285 "googletest:gtest_main", 2286 "hilog:libhilog", 2287 ] 2288 } 2289} 2290 2291if (!defined(ohos_lite) && enhanced_test) { 2292 ohos_unittest("LNNDbMockTest") { 2293 module_out_path = module_output_path 2294 sources = [ 2295 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp", 2296 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp", 2297 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl.c", 2298 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_fsm.c", 2299 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_strategy.c", 2300 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src/lnn_decision_db.c", 2301 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 2302 "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", 2303 "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c", 2304 "net_ledger/lnn_decision_db_deps_mock.cpp", 2305 "net_ledger/lnn_decision_db_test.cpp", 2306 ] 2307 sources += bus_center_decision_center_src 2308 2309 include_dirs = [ 2310 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2311 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2312 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2313 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2314 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 2315 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2316 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2317 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2318 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2319 "$dsoftbus_root_path/core/bus_center/monitor/include", 2320 "$dsoftbus_root_path/core/common/include", 2321 "$dsoftbus_root_path/adapter/common/include", 2322 "$dsoftbus_root_path/core/connection/interface", 2323 "$dsoftbus_root_path/core/connection/p2p/interface", 2324 "$dsoftbus_root_path/core/connection/p2p/common/include", 2325 "$dsoftbus_root_path/core/authentication/interface", 2326 "$dsoftbus_root_path/core/authentication/include", 2327 "$dsoftbus_root_path/core/bus_center/interface", 2328 "$dsoftbus_root_path/core/bus_center/utils/include", 2329 "$dsoftbus_root_path/interfaces/kits/bus_center", 2330 "$dsoftbus_root_path/interfaces/kits/common", 2331 "$dsoftbus_root_path/core/adapter/bus_center/include", 2332 "unittest/common/", 2333 "$dsoftbus_root_path/core/connection/manager", 2334 "$dsoftbus_root_path/adapter/common/bus_center/include/", 2335 "$dsoftbus_root_path/core/discovery/manager/include", 2336 "$dsoftbus_root_path/core/discovery/interface", 2337 "$dsoftbus_root_path/interfaces/kits/discovery", 2338 "$dsoftbus_root_path/core/bus_center/service/include", 2339 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 2340 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 2341 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 2342 "$dsoftbus_root_path/dsoftbus_enhance/adapter/common/mlps/interface", 2343 "$dsoftbus_root_path/interfaces/kits/lnn", 2344 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2345 "$dsoftbus_root_path/core/connection/ble/include", 2346 ] 2347 include_dirs += bus_center_decision_center_inc 2348 2349 deps = [ 2350 "$dsoftbus_root_path/adapter:softbus_adapter", 2351 "$dsoftbus_root_path/core/common:softbus_utils", 2352 ] 2353 2354 if (is_standard_system) { 2355 external_deps = [ 2356 "cJSON:cjson", 2357 "c_utils:utils", 2358 "device_auth:deviceauth_sdk", 2359 "googletest:gmock", 2360 "googletest:gtest_main", 2361 "hilog:libhilog", 2362 ] 2363 } else { 2364 external_deps = [ 2365 "cJSON:cjson", 2366 "c_utils:utils", 2367 "googletest:gmock", 2368 "googletest:gtest_main", 2369 "hilog:libhilog", 2370 ] 2371 } 2372 external_deps += [ "huks:libhukssdk" ] 2373 } 2374} 2375 2376ohos_unittest("LNNDataCloudSyncTest") { 2377 module_out_path = module_output_path 2378 sources = [ "net_builder/src/lnn_data_cloud_sync_test.cpp" ] 2379 2380 include_dirs = [ 2381 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2382 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2383 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2384 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2385 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2386 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2387 "$dsoftbus_root_path/core/bus_center/monitor/include", 2388 "$dsoftbus_root_path/core/common/include", 2389 "$dsoftbus_dfx_path/interface/include", 2390 "$dsoftbus_root_path/adapter/common/include", 2391 "$dsoftbus_root_path/core/connection/interface", 2392 "$dsoftbus_root_path/core/authentication/interface", 2393 "$dsoftbus_root_path/core/bus_center/interface", 2394 "$dsoftbus_root_path/core/bus_center/utils/include", 2395 "$dsoftbus_root_path/interfaces/kits/bus_center", 2396 "$dsoftbus_root_path/interfaces/kits/common", 2397 "$dsoftbus_root_path/interfaces/kits/discovery", 2398 "$dsoftbus_root_path/core/adapter/bus_center/include", 2399 "unittest/common/", 2400 "$dsoftbus_root_path/core/connection/manager", 2401 "$dsoftbus_root_path/adapter/common/bus_center/include/", 2402 "$dsoftbus_root_path/core/discovery/manager/include", 2403 "$dsoftbus_root_path/core/discovery/interface", 2404 "$dsoftbus_root_path/interfaces/kits/discovery", 2405 "$dsoftbus_root_path/core/bus_center/service/include", 2406 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 2407 ] 2408 2409 deps = [ 2410 "$dsoftbus_dfx_path:softbus_dfx", 2411 "$dsoftbus_root_path/adapter:softbus_adapter", 2412 "$dsoftbus_root_path/core/common:softbus_utils", 2413 "$dsoftbus_root_path/core/frame:softbus_server", 2414 ] 2415 2416 if (is_standard_system) { 2417 external_deps = [ 2418 "cJSON:cjson", 2419 "c_utils:utils", 2420 "device_auth:deviceauth_sdk", 2421 "dsoftbus:softbus_client", 2422 "googletest:gmock", 2423 "googletest:gtest_main", 2424 "hilog:libhilog", 2425 ] 2426 } else { 2427 external_deps = [ 2428 "cJSON:cjson", 2429 "c_utils:utils", 2430 "dsoftbus:softbus_client", 2431 "googletest:gmock", 2432 "googletest:gtest_main", 2433 "hilog:libhilog", 2434 ] 2435 } 2436} 2437 2438ohos_unittest("LNNDataCloudSyncMockTest") { 2439 module_out_path = module_output_path 2440 sources = [ 2441 "net_builder/src/lnn_data_cloud_sync_deps_mock.cpp", 2442 "net_builder/src/lnn_data_cloud_sync_mock_test.cpp", 2443 "net_builder/src/lnn_kv_adapter_wrapper_mock.cpp", 2444 "net_builder/src/lnn_net_ledger_mock.cpp", 2445 ] 2446 2447 include_dirs = [ 2448 "$dsoftbus_root_path/core/authentication/interface", 2449 "unittest/common/", 2450 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 2451 "$dsoftbus_root_path/core/adapter/bus_center/include", 2452 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2453 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2454 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src", 2455 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2456 "$dsoftbus_root_path/core/bus_center/interface", 2457 "$dsoftbus_root_path/core/bus_center/utils/include", 2458 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2459 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2460 "$dsoftbus_root_path/core/authentication/include", 2461 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2462 "$dsoftbus_root_path/core/discovery/manager/include", 2463 "$dsoftbus_root_path/core/discovery/interface", 2464 "$dsoftbus_root_path/interfaces/kits/bus_center", 2465 "$dsoftbus_root_path/interfaces/kits/discovery", 2466 "$dsoftbus_root_path/core/bus_center/service/include", 2467 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2468 ] 2469 2470 deps = [ 2471 "$dsoftbus_dfx_path:softbus_dfx", 2472 "$dsoftbus_root_path/adapter:softbus_adapter", 2473 "$dsoftbus_root_path/core/common:softbus_utils", 2474 ] 2475 2476 if (is_standard_system) { 2477 external_deps = [ 2478 "cJSON:cjson", 2479 "c_utils:utils", 2480 "device_auth:deviceauth_sdk", 2481 "googletest:gmock", 2482 "googletest:gtest_main", 2483 "hilog:libhilog", 2484 ] 2485 cflags = [ "-Wno-error" ] 2486 cflags_cc = cflags 2487 } else { 2488 external_deps = [ 2489 "cJSON:cjson", 2490 "c_utils:utils", 2491 "googletest:gmock", 2492 "googletest:gtest_main", 2493 "hilog:libhilog", 2494 ] 2495 } 2496} 2497 2498ohos_unittest("LNNLaneLinkWifiDirectTest") { 2499 module_out_path = module_output_path 2500 sources = [ 2501 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 2502 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c", 2503 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c", 2504 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_prelink_virtual.c", 2505 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c", 2506 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c", 2507 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 2508 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp", 2509 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_net_capability_mock.cpp", 2510 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp", 2511 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_wifi_direct_test.cpp", 2512 "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_async_callback_mock.cpp", 2513 ] 2514 2515 if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature) { 2516 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ] 2517 } else { 2518 sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ] 2519 } 2520 2521 include_dirs = [ 2522 "$dsoftbus_root_path/adapter/common/include", 2523 "$dsoftbus_root_path/adapter/common/net/wifi/include", 2524 "$dsoftbus_root_path/core/authentication/include", 2525 "$dsoftbus_root_path/core/authentication/interface", 2526 "$dsoftbus_root_path/core/adapter/bus_center/include", 2527 "$dsoftbus_root_path/core/bus_center/interface", 2528 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 2529 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2530 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2531 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2532 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2533 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2534 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2535 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2536 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2537 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2538 "$dsoftbus_root_path/core/bus_center/monitor/include", 2539 "$dsoftbus_root_path/core/bus_center/service/include", 2540 "$dsoftbus_root_path/core/bus_center/utils/include", 2541 "$dsoftbus_dfx_path/interface/include", 2542 "$dsoftbus_root_path/core/common/include", 2543 "$dsoftbus_root_path/core/connection/ble/include", 2544 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 2545 "$dsoftbus_root_path/core/discovery/interface", 2546 "$dsoftbus_root_path/core/discovery/manager/include", 2547 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2548 "$dsoftbus_root_path/interfaces/kits/bus_center", 2549 "$dsoftbus_root_path/interfaces/kits/common", 2550 "$dsoftbus_root_path/interfaces/kits/discovery", 2551 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include", 2552 "$dsoftbus_root_path/core/adapter/bus_center/include", 2553 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 2554 ] 2555 2556 deps = [ 2557 "$dsoftbus_dfx_path:softbus_dfx", 2558 "$dsoftbus_root_path/adapter:softbus_adapter", 2559 "$dsoftbus_root_path/core/common:softbus_utils", 2560 ] 2561 2562 if (is_standard_system) { 2563 external_deps = [ 2564 "c_utils:utils", 2565 "device_auth:deviceauth_sdk", 2566 "googletest:gmock", 2567 "googletest:gtest_main", 2568 "hilog:libhilog", 2569 ] 2570 } else { 2571 external_deps = [ 2572 "c_utils:utils", 2573 "googletest:gmock", 2574 "googletest:gtest_main", 2575 "hilog:libhilog", 2576 ] 2577 } 2578} 2579 2580ohos_unittest("LNNLaneDfxTest") { 2581 module_out_path = module_output_path 2582 sources = [ 2583 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c", 2584 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_dfx/lnn_lane_dfx_test.cpp", 2585 ] 2586 2587 include_dirs = [ 2588 "$dsoftbus_root_path/core/bus_center/interface", 2589 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2590 ] 2591 2592 deps = [ 2593 "$dsoftbus_dfx_path:softbus_dfx", 2594 "$dsoftbus_root_path/adapter:softbus_adapter", 2595 "$dsoftbus_root_path/core/common:softbus_utils", 2596 ] 2597 2598 external_deps = [ 2599 "googletest:gmock_main", 2600 "googletest:gtest_main", 2601 "hilog:libhilog", 2602 ] 2603 2604 if (is_standard_system) { 2605 external_deps += [ 2606 "c_utils:utils", 2607 "device_auth:deviceauth_sdk", 2608 ] 2609 } 2610} 2611 2612ohos_unittest("LNNLaneLinkConflictTest") { 2613 module_out_path = module_output_path 2614 sources = [ 2615 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 2616 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link_conflict/lnn_lane_link_conflict_deps_mock.cpp", 2617 "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link_conflict/lnn_lane_link_conflict_test.cpp", 2618 ] 2619 2620 include_dirs = [ 2621 "$dsoftbus_root_path/adapter/common/include", 2622 "$dsoftbus_root_path/adapter/common/net/wifi/include", 2623 "$dsoftbus_root_path/core/authentication/include", 2624 "$dsoftbus_root_path/core/authentication/interface", 2625 "$dsoftbus_root_path/core/adapter/bus_center/include", 2626 "$dsoftbus_root_path/core/bus_center/interface", 2627 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 2628 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2629 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2630 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2631 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 2632 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2633 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2634 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2635 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2636 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2637 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2638 "$dsoftbus_root_path/core/bus_center/monitor/include", 2639 "$dsoftbus_root_path/core/bus_center/service/include", 2640 "$dsoftbus_root_path/core/bus_center/utils/include", 2641 "$dsoftbus_dfx_path/interface/include", 2642 "$dsoftbus_root_path/core/common/include", 2643 "$dsoftbus_root_path/core/connection/ble/include", 2644 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 2645 "$dsoftbus_root_path/core/discovery/interface", 2646 "$dsoftbus_root_path/core/discovery/manager/include", 2647 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2648 "$dsoftbus_root_path/interfaces/kits/bus_center", 2649 "$dsoftbus_root_path/interfaces/kits/common", 2650 "$dsoftbus_root_path/interfaces/kits/discovery", 2651 ] 2652 2653 deps = [ 2654 "$dsoftbus_dfx_path:softbus_dfx", 2655 "$dsoftbus_root_path/adapter:softbus_adapter", 2656 "$dsoftbus_root_path/core/common:softbus_utils", 2657 ] 2658 2659 if (is_standard_system) { 2660 external_deps = [ 2661 "c_utils:utils", 2662 "device_auth:deviceauth_sdk", 2663 "googletest:gmock", 2664 "googletest:gtest_main", 2665 "hilog:libhilog", 2666 ] 2667 } else { 2668 external_deps = [ 2669 "c_utils:utils", 2670 "googletest:gmock", 2671 "googletest:gtest_main", 2672 "hilog:libhilog", 2673 ] 2674 } 2675} 2676 2677ohos_unittest("LNNPhysicalSubnetManagerTest") { 2678 module_out_path = module_output_path 2679 sources = [ 2680 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src/lnn_physical_subnet_manager.c", 2681 "net_buscenter/lnn_physical_subnet_manager_test.cpp", 2682 ] 2683 2684 include_dirs = [ 2685 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2686 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2687 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2688 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src", 2689 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2690 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 2691 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2692 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2693 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2694 "$dsoftbus_root_path/core/common/include", 2695 "$dsoftbus_dfx_path/interface/include", 2696 "$dsoftbus_root_path/adapter/common/include", 2697 "$dsoftbus_root_path/core/authentication/interface", 2698 "$dsoftbus_root_path/core/authentication/include", 2699 "$dsoftbus_root_path/core/bus_center/interface", 2700 "$dsoftbus_root_path/core/bus_center/utils/include", 2701 "$dsoftbus_root_path/interfaces/kits/bus_center", 2702 "$dsoftbus_root_path/interfaces/kits/common", 2703 "$dsoftbus_root_path/core/adapter/bus_center/include", 2704 "$dsoftbus_root_path/core/connection/manager", 2705 "$dsoftbus_root_path/adapter/common/bus_center/include/", 2706 "$dsoftbus_root_path/core/discovery/manager/include", 2707 "$dsoftbus_root_path/core/discovery/interface", 2708 "$dsoftbus_root_path/interfaces/kits/discovery", 2709 "$dsoftbus_root_path/core/bus_center/service/include", 2710 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 2711 "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", 2712 "$dsoftbus_root_path/core/bus_center/utils/include", 2713 "$dsoftbus_root_path/core/bus_center/ipc/include", 2714 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter", 2715 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 2716 "$dsoftbus_root_path/core/transmission/interface", 2717 "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface", 2718 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2719 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2720 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2721 ] 2722 2723 deps = [ 2724 "$dsoftbus_dfx_path:softbus_dfx", 2725 "$dsoftbus_root_path/adapter:softbus_adapter", 2726 "$dsoftbus_root_path/core/common:softbus_utils", 2727 ] 2728 2729 external_deps = [ 2730 "googletest:gmock_main", 2731 "googletest:gtest_main", 2732 "hilog:libhilog", 2733 ] 2734 2735 if (is_standard_system) { 2736 external_deps += [ 2737 "c_utils:utils", 2738 "device_auth:deviceauth_sdk", 2739 ] 2740 } 2741} 2742 2743ohos_unittest("LNNCtrlLaneMockTest") { 2744 module_out_path = module_output_path 2745 sources = [ 2746 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c", 2747 "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c", 2748 "lane/ctrl_lane/lnn_ctrl_lane_deps_mock.cpp", 2749 "lane/ctrl_lane/lnn_ctrl_lane_test.cpp", 2750 "lane/src/lnn_lane_deps_mock.cpp", 2751 ] 2752 2753 include_dirs = [ 2754 "lane/include", 2755 "lane/trans_lane", 2756 "$dsoftbus_root_path/adapter/common/include", 2757 "$dsoftbus_root_path/adapter/common/bus_center/include/", 2758 "$dsoftbus_root_path/adapter/common/net/hdi/include", 2759 "$dsoftbus_root_path/adapter/common/net/wifi/include", 2760 "$dsoftbus_root_path/core/adapter/bus_center/include", 2761 "$dsoftbus_root_path/core/authentication/include", 2762 "$dsoftbus_root_path/core/authentication/interface", 2763 "$dsoftbus_root_path/core/bus_center/interface", 2764 "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include", 2765 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2766 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include", 2767 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2768 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 2769 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src", 2770 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2771 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2772 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2773 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2774 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2775 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2776 "$dsoftbus_root_path/core/bus_center/monitor/include", 2777 "$dsoftbus_root_path/core/bus_center/service/include", 2778 "$dsoftbus_root_path/core/bus_center/utils/include", 2779 "$dsoftbus_root_path/core/common/include", 2780 "$dsoftbus_dfx_path/interface/include", 2781 "$dsoftbus_root_path/core/connection/ble/include", 2782 "$dsoftbus_root_path/core/connection/interface", 2783 "$dsoftbus_root_path/core/connection/p2p/interface", 2784 "$dsoftbus_root_path/core/connection/p2p/common/include", 2785 "$dsoftbus_root_path/core/discovery/manager/include", 2786 "$dsoftbus_root_path/core/discovery/interface", 2787 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2788 "$dsoftbus_root_path/interfaces/kits/bus_center", 2789 "$dsoftbus_root_path/interfaces/kits/common", 2790 "$dsoftbus_root_path/interfaces/kits/discovery", 2791 "unittest/common/", 2792 "$dsoftbus_root_path/core/connection/wifi_direct_cpp", 2793 ] 2794 2795 deps = [ 2796 "$dsoftbus_dfx_path:softbus_dfx", 2797 "$dsoftbus_root_path/adapter:softbus_adapter", 2798 "$dsoftbus_root_path/core/common:softbus_utils", 2799 ] 2800 2801 if (is_standard_system) { 2802 external_deps = [ 2803 "cJSON:cjson", 2804 "c_utils:utils", 2805 "device_auth:deviceauth_sdk", 2806 "googletest:gmock", 2807 "googletest:gtest_main", 2808 "hilog:libhilog", 2809 ] 2810 if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) { 2811 external_deps += [ "wifi:wifi_sdk" ] 2812 } 2813 } else { 2814 external_deps = [ 2815 "cJSON:cjson", 2816 "c_utils:utils", 2817 "googletest:gmock", 2818 "googletest:gtest_main", 2819 "hilog:libhilog", 2820 "wifi:wifi_sdk", 2821 ] 2822 } 2823} 2824 2825ohos_unittest("LNNConnIdCbManagerTest") { 2826 module_out_path = module_output_path 2827 sources = [ "net_builder/src/lnn_connId_cb_manager_test.cpp" ] 2828 2829 include_dirs = [ 2830 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2831 "$dsoftbus_root_path/core/common/include", 2832 "$dsoftbus_root_path/interfaces/kits/bus_center", 2833 "$dsoftbus_root_path/interfaces/kits/common", 2834 "$dsoftbus_root_path/core/adapter/bus_center/include", 2835 "unittest/common/", 2836 "$dsoftbus_root_path/interfaces/kits/discovery", 2837 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", 2838 ] 2839 2840 deps = [ 2841 "$dsoftbus_dfx_path:softbus_dfx", 2842 "$dsoftbus_root_path/adapter:softbus_adapter", 2843 "$dsoftbus_root_path/core/common:softbus_utils", 2844 "$dsoftbus_root_path/core/frame:softbus_server", 2845 ] 2846 2847 if (is_standard_system) { 2848 external_deps = [ 2849 "cJSON:cjson", 2850 "c_utils:utils", 2851 "device_auth:deviceauth_sdk", 2852 "dsoftbus:softbus_client", 2853 "googletest:gmock", 2854 "googletest:gtest_main", 2855 "hilog:libhilog", 2856 ] 2857 } else { 2858 external_deps = [ 2859 "cJSON:cjson", 2860 "c_utils:utils", 2861 "dsoftbus:softbus_client", 2862 "googletest:gmock", 2863 "googletest:gtest_main", 2864 "hilog:libhilog", 2865 ] 2866 } 2867} 2868 2869ohos_unittest("LNNNetLedgerMockTest") { 2870 module_out_path = module_output_path 2871 sources = [ 2872 "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c", 2873 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/src/lnn_data_cloud_sync_deps_mock.cpp", 2874 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger/lnn_net_ledger_mock_test.cpp", 2875 "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/bus_center_mock.cpp", 2876 ] 2877 2878 include_dirs = [ 2879 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", 2880 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", 2881 "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", 2882 "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", 2883 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 2884 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src", 2885 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 2886 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 2887 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src", 2888 "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", 2889 "$dsoftbus_root_path/adapter/common/net/bluetooth/include", 2890 "$dsoftbus_root_path/core/bus_center/monitor/include", 2891 "$dsoftbus_root_path/core/common/include", 2892 "$dsoftbus_dfx_path/interface/include", 2893 "$dsoftbus_root_path/adapter/common/include", 2894 "$dsoftbus_root_path/core/authentication/interface", 2895 "$dsoftbus_root_path/core/authentication/include", 2896 "$dsoftbus_root_path/core/bus_center/interface", 2897 "$dsoftbus_root_path/core/bus_center/utils/include", 2898 "$dsoftbus_root_path/interfaces/inner_kits/lnn", 2899 "$dsoftbus_root_path/interfaces/kits/bus_center", 2900 "$dsoftbus_root_path/interfaces/kits/common", 2901 "$dsoftbus_root_path/core/adapter/bus_center/include", 2902 "unittest/common/", 2903 "$dsoftbus_root_path/core/connection/manager", 2904 "$dsoftbus_root_path/adapter/common/bus_center/include/", 2905 "$dsoftbus_root_path/core/discovery/manager/include", 2906 "$dsoftbus_root_path/core/discovery/interface", 2907 "$dsoftbus_root_path/interfaces/kits/discovery", 2908 "$dsoftbus_root_path/core/bus_center/service/include", 2909 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", 2910 "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include", 2911 "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface", 2912 "$dsoftbus_root_path/interfaces/kits/common", 2913 "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock", 2914 "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include/", 2915 ] 2916 2917 deps = [ 2918 "$dsoftbus_dfx_path:softbus_dfx", 2919 "$dsoftbus_root_path/adapter:softbus_adapter", 2920 "$dsoftbus_root_path/core/common:softbus_utils", 2921 ] 2922 2923 if (is_standard_system) { 2924 external_deps = [ 2925 "cJSON:cjson", 2926 "c_utils:utils", 2927 "device_auth:deviceauth_sdk", 2928 "googletest:gmock", 2929 "googletest:gtest_main", 2930 "hilog:libhilog", 2931 ] 2932 } else { 2933 external_deps = [ 2934 "cJSON:cjson", 2935 "c_utils:utils", 2936 "googletest:gmock", 2937 "googletest:gtest_main", 2938 "hilog:libhilog", 2939 ] 2940 } 2941 external_deps += [ "huks:libhukssdk" ] 2942} 2943 2944ohos_unittest("LNNFeatureCapabilityTest") { 2945 module_out_path = module_output_path 2946 sources = [ "unittest/lnn_feature_capability_test.cpp" ] 2947 include_dirs = bus_center_unittest_dirs 2948 deps = bus_center_unittest_deps 2949 external_deps = [ 2950 "cJSON:cjson", 2951 "c_utils:utils", 2952 "hilog:libhilog", 2953 "ipc:ipc_single", 2954 ] 2955 if (dsoftbus_feature_deps_device_auth) { 2956 external_deps += [ "device_auth:deviceauth_sdk" ] 2957 } 2958} 2959 2960group("unittest") { 2961 testonly = true 2962 deps = [ 2963 ":LNNBatteryInfoTest", 2964 ":LNNBtNetworkImplMockTest", 2965 ":LNNConnIdCbManagerTest", 2966 ":LNNConnectionFsmMockTest", 2967 ":LNNConnectionFsmTest", 2968 ":LNNCtrlLaneMockTest", 2969 ":LNNDataCloudSyncMockTest", 2970 ":LNNDataCloudSyncTest", 2971 ":LNNDeviceNameInfoTest", 2972 ":LNNDiscoveryInterfaceTest", 2973 ":LNNDisctributedLedgerTest", 2974 ":LNNFeatureCapabilityTest", 2975 ":LNNHuksUtilsTest", 2976 ":LNNIpNetworkImplMockTest", 2977 ":LNNLaneDfxTest", 2978 ":LNNLaneExtMockTest", 2979 ":LNNLaneLinkExtTest", 2980 ":LNNLaneLinkLedgerTest", 2981 ":LNNLaneQueryTest", 2982 ":LNNLedgerMockTest", 2983 ":LNNNetBuilderMockTest", 2984 ":LNNNetBuilderTest", 2985 ":LNNNetLedgerCommonTest", 2986 ":LNNNetLedgerMockTest", 2987 ":LNNNetworkInfoTest", 2988 ":LNNNetworkManagerMockTest", 2989 ":LNNNodeWeightTest", 2990 ":LNNP2pInfoTest", 2991 ":LNNPhysicalSubnetManagerTest", 2992 ":LNNSyncInfoItemTest", 2993 ":LNNSyncInfoManagerTest", 2994 ":LNNTopoManagerTest", 2995 ":LedgerLaneHubTest", 2996 ":NetBuilderTest", 2997 ":NetLedgerTest", 2998 ] 2999 if (dsoftbus_feature_lnn_lane_mgr) { 3000 deps += [ 3001 ":LNNLaneLinkConflictTest", 3002 ":LNNLaneLinkTest", 3003 ":LNNLaneLinkWifiDirectTest", 3004 ":LNNLaneListenerTest", 3005 ":LNNLaneMockTest", 3006 ":LNNTransLaneMockTest", 3007 ":LaneTest", 3008 ] 3009 } 3010 if (dsoftbus_feature_lnn_meta_node) { 3011 deps += [ ":LNNMetaNodeLedgerTest" ] 3012 } 3013 if (!defined(ohos_lite) && enhanced_test) { 3014 deps += [ ":LNNDbMockTest" ] 3015 } 3016 if (enhanced_test) { 3017 deps += [ 3018 "$dsoftbus_root_path/dsoftbus_enhance/test/core/authentication:unittest", 3019 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/decision_center:unittest", 3020 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/heartbeat:unittest", 3021 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_channel_rating:unittest", 3022 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_qos:unittest", 3023 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_stastic:unittest", 3024 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_vap:unittest", 3025 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/time_sync:unittest", 3026 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/meta_node:unittest", 3027 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/net_builder/cipherkey:unittest", 3028 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/net_builder/fast_offline:unittest", 3029 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/net_builder/fast_online:unittest", 3030 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/unittest:unittest", 3031 "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/test:unittest", 3032 "$dsoftbus_root_path/dsoftbus_enhance/test/sdk/bus_center:unittest", 3033 ] 3034 } 3035} 3036 3037group("fuzztest") { 3038 testonly = true 3039 deps = [ "fuzztest:fuzztest" ] 3040 if (enhanced_test) { 3041 deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/fuzztest:fuzztest" ] 3042 } 3043} 3044