• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../../../dsoftbus.gni")
16
17module_output_path = "dsoftbus/soft_bus/LNN"
18dsoftbus_root_path = "../../../.."
19
20bus_center_unittest_dirs = [
21  "$dsoftbus_dfx_path/interface/include",
22  "$dsoftbus_dfx_path/interface/include/form",
23  "$dsoftbus_dfx_path/interface/include/legacy",
24  "$dsoftbus_root_path/adapter/common/bus_center/include/",
25  "$dsoftbus_root_path/adapter/common/include",
26  "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
27  "$dsoftbus_root_path/core/adapter/bus_center/include",
28  "$dsoftbus_root_path/core/authentication/include",
29  "$dsoftbus_root_path/core/authentication/interface",
30  "$dsoftbus_root_path/core/bus_center/interface",
31  "$dsoftbus_root_path/core/bus_center/ipc/include",
32  "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
33  "$dsoftbus_root_path/core/bus_center/ipc/standard/src",
34  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
35  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
36  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include",
37  "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
38  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
39  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
40  "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
41  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
42  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
43  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
44  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src",
45  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
46  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
47  "$dsoftbus_root_path/core/bus_center/monitor/include",
48  "$dsoftbus_root_path/core/bus_center/service/include",
49  "$dsoftbus_root_path/core/bus_center/utils/include",
50  "$dsoftbus_root_path/core/common/include",
51  "$dsoftbus_root_path/core/connection/interface",
52  "$dsoftbus_root_path/core/connection/manager",
53  "$dsoftbus_root_path/core/discovery/interface",
54  "$dsoftbus_root_path/core/discovery/manager/include",
55  "$dsoftbus_root_path/core/frame/standard/client_manager/include",
56  "$dsoftbus_root_path/interfaces/inner_kits/lnn",
57  "$dsoftbus_root_path/interfaces/inner_kits/transport",
58  "$dsoftbus_root_path/interfaces/kits/authentication",
59  "$dsoftbus_root_path/interfaces/kits/bus_center",
60  "$dsoftbus_root_path/interfaces/kits/common",
61  "$dsoftbus_root_path/interfaces/kits/connect",
62  "$dsoftbus_root_path/interfaces/kits/discovery",
63  "$dsoftbus_root_path/interfaces/kits/lnn",
64  "$dsoftbus_root_path/sdk/bus_center/manager/include",
65  "$dsoftbus_root_path/sdk/frame/standard/include",
66  "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
67  "unittest/common/",
68]
69
70bus_center_unittest_deps = [
71  "$dsoftbus_dfx_path:softbus_dfx",
72  "$dsoftbus_root_path/adapter:softbus_adapter",
73  "$dsoftbus_root_path/core/common:softbus_utils",
74  "$dsoftbus_root_path/core/frame:softbus_server",
75]
76
77lnn_mock_test_include_dirs = [
78  "$dsoftbus_dfx_path/interface/include",
79  "$dsoftbus_dfx_path/interface/include/form",
80  "$dsoftbus_dfx_path/interface/include/legacy",
81  "$dsoftbus_root_path/adapter/common/bus_center/include/",
82  "$dsoftbus_root_path/adapter/common/include",
83  "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
84  "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
85  "$dsoftbus_root_path/adapter/common/net/wifi/include",
86  "$dsoftbus_root_path/core/adapter/bus_center/include",
87  "$dsoftbus_root_path/core/authentication/include",
88  "$dsoftbus_root_path/core/authentication/interface",
89  "$dsoftbus_root_path/core/bus_center/interface",
90  "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
91  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
92  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
93  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
94  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src",
95  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
96  "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
97  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
98  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
99  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
100  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
101  "$dsoftbus_root_path/core/bus_center/monitor/include",
102  "$dsoftbus_root_path/core/bus_center/service/include",
103  "$dsoftbus_root_path/core/bus_center/utils/include",
104  "$dsoftbus_root_path/core/common/include",
105  "$dsoftbus_root_path/core/connection/interface",
106  "$dsoftbus_root_path/core/connection/manager",
107  "$dsoftbus_root_path/core/connection/p2p/common/include",
108  "$dsoftbus_root_path/core/connection/p2p/interface",
109  "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
110  "$dsoftbus_root_path/core/discovery/interface",
111  "$dsoftbus_root_path/core/discovery/manager/include",
112  "$dsoftbus_root_path/core/transmission/interface",
113  "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
114  "$dsoftbus_root_path/interfaces/inner_kits/lnn",
115  "$dsoftbus_root_path/interfaces/inner_kits/transport",
116  "$dsoftbus_root_path/interfaces/kits/adapter",
117  "$dsoftbus_root_path/interfaces/kits/authentication",
118  "$dsoftbus_root_path/interfaces/kits/bus_center",
119  "$dsoftbus_root_path/interfaces/kits/common",
120  "$dsoftbus_root_path/interfaces/kits/connect",
121  "$dsoftbus_root_path/interfaces/kits/disc",
122  "$dsoftbus_root_path/interfaces/kits/discovery",
123  "$dsoftbus_root_path/interfaces/kits/lnn",
124  "$dsoftbus_root_path/interfaces/kits/transport",
125  "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
126  "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
127  "unittest/common/",
128]
129
130lnn_mock_test_deps = [
131  "$dsoftbus_dfx_path:softbus_dfx",
132  "$dsoftbus_root_path/adapter:softbus_adapter",
133  "$dsoftbus_root_path/core/common:softbus_utils",
134  "$dsoftbus_root_path/core/frame:softbus_server",
135]
136
137lnn_mock_test_deps_exclude_softbus_server = [
138  "$dsoftbus_dfx_path:softbus_dfx",
139  "$dsoftbus_root_path/adapter:softbus_adapter",
140  "$dsoftbus_root_path/core/common:softbus_utils",
141]
142
143ohos_unittest("LaneTest") {
144  module_out_path = module_output_path
145  sources = [ "unittest/lane_test.cpp" ]
146  include_dirs = bus_center_unittest_dirs
147  deps = bus_center_unittest_deps
148
149  if (is_standard_system) {
150    external_deps = [
151      "cJSON:cjson",
152      "c_utils:utils",
153      "device_auth:deviceauth_sdk",
154      "googletest:gmock",
155      "googletest:gtest_main",
156      "hilog:libhilog",
157    ]
158  } else {
159    external_deps = [
160      "cJSON:cjson",
161      "c_utils:utils",
162      "googletest:gmock",
163      "googletest:gtest_main",
164      "hilog:libhilog",
165    ]
166  }
167  external_deps += [
168    "huks:libhukssdk",
169    "ipc:ipc_single",
170  ]
171}
172
173ohos_unittest("NetLedgerTest") {
174  module_out_path = module_output_path
175  sources = [ "unittest/net_ledger_test.cpp" ]
176  include_dirs = bus_center_unittest_dirs
177  deps = bus_center_unittest_deps
178
179  if (is_standard_system) {
180    external_deps = [
181      "cJSON:cjson",
182      "c_utils:utils",
183      "device_auth:deviceauth_sdk",
184      "googletest:gmock",
185      "googletest:gtest_main",
186      "hilog:libhilog",
187    ]
188  } else {
189    external_deps = [
190      "cJSON:cjson",
191      "c_utils:utils",
192      "googletest:gmock",
193      "googletest:gtest_main",
194      "hilog:libhilog",
195    ]
196  }
197  external_deps += [
198    "huks:libhukssdk",
199    "ipc:ipc_single",
200  ]
201}
202
203ohos_unittest("NetBuilderTest") {
204  module_out_path = module_output_path
205  sources = [ "unittest/net_builder_test.cpp" ]
206  include_dirs = bus_center_unittest_dirs
207  deps = bus_center_unittest_deps
208
209  if (is_standard_system) {
210    external_deps = [
211      "cJSON:cjson",
212      "c_utils:utils",
213      "device_auth:deviceauth_sdk",
214      "googletest:gmock",
215      "googletest:gtest_main",
216      "hilog:libhilog",
217    ]
218  } else {
219    external_deps = [
220      "cJSON:cjson",
221      "c_utils:utils",
222      "googletest:gmock",
223      "googletest:gtest_main",
224      "hilog:libhilog",
225    ]
226  }
227  external_deps += [
228    "huks:libhukssdk",
229    "ipc:ipc_single",
230  ]
231}
232
233ohos_unittest("LNNInitMonitorTest") {
234  module_out_path = module_output_path
235  sources = [ "unittest/lnn_init_monitor_test.cpp" ]
236  include_dirs = bus_center_unittest_dirs
237  include_dirs += [
238    "$dsoftbus_root_path/core/bus_center/monitor/include",
239    "$dsoftbus_root_path/core/bus_center/monitor/src",
240  ]
241  deps = bus_center_unittest_deps
242
243  external_deps = [
244    "cJSON:cjson",
245    "c_utils:utils",
246    "googletest:gmock",
247    "hilog:libhilog",
248    "huks:libhukssdk",
249    "ipc:ipc_single",
250  ]
251  if (dsoftbus_feature_deps_device_auth) {
252    external_deps += [ "device_auth:deviceauth_sdk" ]
253  }
254}
255
256ohos_unittest("LNNHuksUtilsTest") {
257  module_out_path = module_output_path
258  sources = [ "unittest/lnn_huks_test.cpp" ]
259  include_dirs = bus_center_unittest_dirs
260  deps = bus_center_unittest_deps
261
262  if (is_standard_system) {
263    external_deps = [
264      "cJSON:cjson",
265      "c_utils:utils",
266      "device_auth:deviceauth_sdk",
267      "googletest:gmock",
268      "googletest:gtest_main",
269      "hilog:libhilog",
270    ]
271  } else {
272    external_deps = [
273      "cJSON:cjson",
274      "c_utils:utils",
275      "googletest:gmock",
276      "googletest:gtest_main",
277      "hilog:libhilog",
278    ]
279  }
280  external_deps += [
281    "huks:libhukssdk",
282    "ipc:ipc_single",
283  ]
284}
285
286ohos_unittest("LedgerLaneHubTest") {
287  module_out_path = module_output_path
288  sources = [
289    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
290    "unittest/ledger_lane_hub_test.cpp",
291  ]
292  include_dirs = bus_center_unittest_dirs
293  deps = bus_center_unittest_deps
294
295  include_dirs += [
296    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
297    "$dsoftbus_root_path/core/bus_center/monitor/include",
298    "$dsoftbus_root_path/interfaces/kits/common",
299  ]
300  if (is_standard_system) {
301    external_deps = [
302      "cJSON:cjson",
303      "c_utils:utils",
304      "device_auth:deviceauth_sdk",
305      "googletest:gmock",
306      "googletest:gtest_main",
307      "hilog:libhilog",
308    ]
309  } else {
310    external_deps = [
311      "cJSON:cjson",
312      "c_utils:utils",
313      "googletest:gmock",
314      "googletest:gtest_main",
315      "hilog:libhilog",
316    ]
317  }
318  external_deps += [
319    "huks:libhukssdk",
320    "ipc:ipc_single",
321  ]
322}
323
324ohos_unittest("LNNNetBuilderTest") {
325  module_out_path = module_output_path
326  sources = [ "net_builder/src/lnn_net_builder_test.cpp" ]
327
328  include_dirs = [
329    "$dsoftbus_dfx_path/interface/include",
330    "$dsoftbus_dfx_path/interface/include/form",
331    "$dsoftbus_root_path/adapter/common/bus_center/include/",
332    "$dsoftbus_root_path/adapter/common/include",
333    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
334    "$dsoftbus_root_path/core/adapter/bus_center/include",
335    "$dsoftbus_root_path/core/authentication/interface",
336    "$dsoftbus_root_path/core/bus_center/interface",
337    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
338    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
339    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
340    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
341    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
342    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
343    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
344    "$dsoftbus_root_path/core/bus_center/monitor/include",
345    "$dsoftbus_root_path/core/bus_center/service/include",
346    "$dsoftbus_root_path/core/bus_center/utils/include",
347    "$dsoftbus_root_path/core/common/include",
348    "$dsoftbus_root_path/core/connection/interface",
349    "$dsoftbus_root_path/core/connection/manager",
350    "$dsoftbus_root_path/core/discovery/interface",
351    "$dsoftbus_root_path/core/discovery/manager/include",
352    "$dsoftbus_root_path/interfaces/kits/adapter",
353    "$dsoftbus_root_path/interfaces/kits/authentication",
354    "$dsoftbus_root_path/interfaces/kits/bus_center",
355    "$dsoftbus_root_path/interfaces/kits/common",
356    "$dsoftbus_root_path/interfaces/kits/connect",
357    "$dsoftbus_root_path/interfaces/kits/disc",
358    "$dsoftbus_root_path/interfaces/kits/discovery",
359    "$dsoftbus_root_path/interfaces/kits/lnn",
360    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
361    "unittest/common/",
362  ]
363
364  deps = [
365    "$dsoftbus_dfx_path:softbus_dfx",
366    "$dsoftbus_root_path/adapter:softbus_adapter",
367    "$dsoftbus_root_path/core/common:softbus_utils",
368    "$dsoftbus_root_path/core/frame:softbus_server",
369  ]
370
371  if (is_standard_system) {
372    external_deps = [
373      "cJSON:cjson",
374      "c_utils:utils",
375      "device_auth:deviceauth_sdk",
376      "dsoftbus:softbus_client",
377      "googletest:gmock",
378      "googletest:gtest_main",
379      "hilog:libhilog",
380    ]
381  } else {
382    external_deps = [
383      "cJSON:cjson",
384      "c_utils:utils",
385      "dsoftbus:softbus_client",
386      "googletest:gmock",
387      "googletest:gtest_main",
388      "hilog:libhilog",
389    ]
390  }
391}
392
393ohos_unittest("LNNNetBuilderMockTest") {
394  module_out_path = module_output_path
395  sources = [
396    "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c",
397    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper_virtual.cpp",
398    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
399    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connId_callback_manager.c",
400    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
401    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
402    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
403    "net_builder/src/lnn_net_builder_deps_mock.cpp",
404    "net_builder/src/lnn_net_builder_mock_test.cpp",
405  ]
406
407  include_dirs = [
408    "$dsoftbus_dfx_path/interface/include",
409    "$dsoftbus_dfx_path/interface/include/form",
410    "$dsoftbus_dfx_path/interface/include/legacy",
411    "$dsoftbus_root_path/adapter/common/bus_center/include/",
412    "$dsoftbus_root_path/adapter/common/include",
413    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
414    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
415    "$dsoftbus_root_path/adapter/common/net/wifi/include",
416    "$dsoftbus_root_path/core/adapter/bus_center/include",
417    "$dsoftbus_root_path/core/authentication/include",
418    "$dsoftbus_root_path/core/authentication/interface",
419    "$dsoftbus_root_path/core/bus_center/interface",
420    "$dsoftbus_root_path/core/bus_center/ipc/include",
421    "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
422    "$dsoftbus_root_path/core/bus_center/ipc/standard/src",
423    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
424    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
425    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
426    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
427    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src",
428    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
429    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
430    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
431    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
432    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
433    "$dsoftbus_root_path/core/bus_center/monitor/include",
434    "$dsoftbus_root_path/core/bus_center/service/include",
435    "$dsoftbus_root_path/core/bus_center/utils/include",
436    "$dsoftbus_root_path/core/common/include",
437    "$dsoftbus_root_path/core/connection/interface",
438    "$dsoftbus_root_path/core/connection/manager",
439    "$dsoftbus_root_path/core/connection/p2p/common/include",
440    "$dsoftbus_root_path/core/connection/p2p/interface",
441    "$dsoftbus_root_path/core/connection/p2p/manager/include",
442    "$dsoftbus_root_path/core/discovery/interface",
443    "$dsoftbus_root_path/core/discovery/manager/include",
444    "$dsoftbus_root_path/core/frame/init/include",
445    "$dsoftbus_root_path/core/transmission/interface",
446    "$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
447    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
448    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
449    "$dsoftbus_root_path/interfaces/inner_kits/transport",
450    "$dsoftbus_root_path/interfaces/kits/adapter",
451    "$dsoftbus_root_path/interfaces/kits/authentication",
452    "$dsoftbus_root_path/interfaces/kits/bus_center",
453    "$dsoftbus_root_path/interfaces/kits/common",
454    "$dsoftbus_root_path/interfaces/kits/connect",
455    "$dsoftbus_root_path/interfaces/kits/disc",
456    "$dsoftbus_root_path/interfaces/kits/discovery",
457    "$dsoftbus_root_path/interfaces/kits/lnn",
458    "$dsoftbus_root_path/interfaces/kits/transport",
459    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
460    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
461    "$dsoftbus_root_path/tests/interface/enhance",
462    "unittest/common/",
463  ]
464
465  deps = [
466    "$dsoftbus_dfx_path:softbus_dfx",
467    "$dsoftbus_root_path/adapter:softbus_adapter",
468    "$dsoftbus_root_path/core/common:softbus_utils",
469    "$dsoftbus_root_path/core/frame:softbus_server",
470  ]
471
472  if (is_standard_system) {
473    external_deps = [
474      "cJSON:cjson",
475      "c_utils:utils",
476      "device_auth:deviceauth_sdk",
477      "googletest:gmock",
478      "googletest:gtest_main",
479      "hilog:libhilog",
480    ]
481  } else {
482    external_deps = [
483      "cJSON:cjson",
484      "c_utils:utils",
485      "googletest:gmock",
486      "googletest:gtest_main",
487      "hilog:libhilog",
488    ]
489  }
490}
491
492ohos_unittest("LNNConnectionFsmTest") {
493  module_out_path = module_output_path
494  sources = [
495    "$dsoftbus_root_path/core/authentication/src/auth_pre_link.c",
496    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connId_callback_manager.c",
497    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c",
498    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c",
499    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c",
500    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c",
501    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c",
502    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
503    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c",
504    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
505    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
506    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
507    "$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c",
508    "$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c",
509    "$dsoftbus_root_path/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c",
510    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/src/lnn_sync_info_mock.cpp",
511    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp",
512    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
513    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
514    "net_builder/src/lnn_auth_mock.cpp",
515    "net_builder/src/lnn_connection_fsm_mock.cpp",
516    "net_builder/src/lnn_connection_fsm_test.cpp",
517    "net_builder/src/lnn_net_ledger_mock.cpp",
518    "net_builder/src/lnn_service_mock.cpp",
519    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
520    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
521  ]
522
523  include_dirs = lnn_mock_test_include_dirs
524  include_dirs += [
525    "$dsoftbus_root_path/core/adapter/transmission/include",
526    "$dsoftbus_root_path/core/bus_center/ipc/include",
527    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_qos/include",
528    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
529    "$dsoftbus_root_path/core/bus_center/monitor/include/",
530    "$dsoftbus_root_path/core/common/security/permission/include",
531    "$dsoftbus_root_path/core/frame/common/include",
532    "$dsoftbus_root_path/core/frame/init/include",
533    "$dsoftbus_root_path/core/transmission/session/include",
534    "$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
535    "$dsoftbus_root_path/core/transmission/trans_channel/common/include",
536    "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface",
537    "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
538    "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
539    "$dsoftbus_root_path/interfaces/inner_kits/transport",
540    "$dsoftbus_root_path/tests/interface/enhance",
541  ]
542
543  deps = [
544    "$dsoftbus_dfx_path:softbus_dfx",
545    "$dsoftbus_root_path/adapter:softbus_adapter",
546    "$dsoftbus_root_path/core/common:softbus_utils",
547  ]
548
549  if (is_standard_system) {
550    external_deps = [
551      "cJSON:cjson",
552      "c_utils:utils",
553      "device_auth:deviceauth_sdk",
554      "googletest:gmock",
555      "googletest:gtest_main",
556      "hilog:libhilog",
557    ]
558  } else {
559    external_deps = [
560      "cJSON:cjson",
561      "c_utils:utils",
562      "googletest:gmock",
563      "googletest:gtest_main",
564      "hilog:libhilog",
565    ]
566  }
567}
568
569ohos_unittest("LNNConnectionFsmMockTest") {
570  module_out_path = module_output_path
571  sources = [
572    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c",
573    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c",
574    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c",
575    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c",
576    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c",
577    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
578    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c",
579    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_sync_info_manager.c",
580    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
581    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
582    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp",
583    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
584    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
585    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
586    "net_builder/src/lnn_auth_mock.cpp",
587    "net_builder/src/lnn_connection_fsm_mock_test.cpp",
588    "net_builder/src/lnn_net_ledger_mock.cpp",
589    "net_builder/src/lnn_service_mock.cpp",
590  ]
591
592  include_dirs = lnn_mock_test_include_dirs
593  include_dirs += [
594    "$dsoftbus_root_path/core/bus_center/monitor/include",
595    "$dsoftbus_root_path/core/frame/init/include",
596    "$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
597  ]
598  deps = lnn_mock_test_deps
599  deps +=[ "$dsoftbus_root_path/core/connection/wifi_direct_cpp:wifi_direct" ]
600  if (is_standard_system) {
601    external_deps = [
602      "cJSON:cjson",
603      "c_utils:utils",
604      "device_auth:deviceauth_sdk",
605      "googletest:gmock",
606      "googletest:gtest_main",
607      "hilog:libhilog",
608    ]
609  } else {
610    external_deps = [
611      "cJSON:cjson",
612      "c_utils:utils",
613      "googletest:gmock",
614      "googletest:gtest_main",
615      "hilog:libhilog",
616    ]
617  }
618}
619
620ohos_unittest("LNNBatteryInfoTest") {
621  module_out_path = module_output_path
622  sources = [
623    "net_builder/src/lnn_battery_info_test.cpp",
624    "net_builder/src/lnn_net_ledger_mock.cpp",
625    "net_builder/src/lnn_sync_info_mock.cpp",
626  ]
627
628  include_dirs = lnn_mock_test_include_dirs
629  deps = lnn_mock_test_deps_exclude_softbus_server
630
631  if (is_standard_system) {
632    external_deps = [
633      "cJSON:cjson",
634      "c_utils:utils",
635      "device_auth:deviceauth_sdk",
636      "googletest:gmock",
637      "googletest:gtest_main",
638      "hilog:libhilog",
639    ]
640  } else {
641    external_deps = [
642      "cJSON:cjson",
643      "c_utils:utils",
644      "googletest:gmock",
645      "googletest:gtest_main",
646      "hilog:libhilog",
647    ]
648  }
649}
650
651ohos_unittest("LNNSyncInfoItemTest") {
652  module_out_path = module_output_path
653  sources = [
654    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
655    "net_builder/src/lnn_net_builder_mock.cpp",
656    "net_builder/src/lnn_net_ledger_mock.cpp",
657    "net_builder/src/lnn_service_mock.cpp",
658    "net_builder/src/lnn_sync_info_mock.cpp",
659    "net_builder/src/lnn_sync_item_info_test.cpp",
660  ]
661
662  include_dirs = lnn_mock_test_include_dirs
663  deps = lnn_mock_test_deps_exclude_softbus_server
664
665  if (is_standard_system) {
666    external_deps = [
667      "cJSON:cjson",
668      "c_utils:utils",
669      "device_auth:deviceauth_sdk",
670      "googletest:gmock",
671      "googletest:gtest_main",
672      "hilog:libhilog",
673    ]
674  } else {
675    external_deps = [
676      "cJSON:cjson",
677      "c_utils:utils",
678      "googletest:gmock",
679      "googletest:gtest_main",
680      "hilog:libhilog",
681    ]
682  }
683}
684
685ohos_unittest("LNNDeviceNameInfoTest") {
686  module_out_path = module_output_path
687  sources = [
688    "$dsoftbus_root_path/core/authentication/src/virtual/auth_session_fsm_virtual.c",
689    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_virtual.c",
690    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
691    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
692    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
693    "net_builder/src/lnn_devicename_info_test.cpp",
694    "net_builder/src/lnn_net_ledger_mock.cpp",
695    "net_builder/src/lnn_service_mock.cpp",
696    "net_builder/src/lnn_sync_info_mock.cpp",
697  ]
698
699  include_dirs = lnn_mock_test_include_dirs
700  deps = lnn_mock_test_deps_exclude_softbus_server
701
702  if (is_standard_system) {
703    external_deps = [
704      "cJSON:cjson",
705      "c_utils:utils",
706      "device_auth:deviceauth_sdk",
707      "googletest:gmock",
708      "googletest:gtest_main",
709      "hilog:libhilog",
710    ]
711  } else {
712    external_deps = [
713      "cJSON:cjson",
714      "c_utils:utils",
715      "googletest:gmock",
716      "googletest:gtest_main",
717      "hilog:libhilog",
718    ]
719  }
720}
721
722ohos_unittest("LNNNetworkInfoTest") {
723  module_out_path = module_output_path
724  sources = [
725    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
726    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
727    "net_builder/src/lnn_net_builder_mock.cpp",
728    "net_builder/src/lnn_net_ledger_mock.cpp",
729    "net_builder/src/lnn_network_info_test.cpp",
730    "net_builder/src/lnn_service_mock.cpp",
731    "net_builder/src/lnn_sync_info_mock.cpp",
732  ]
733
734  include_dirs = lnn_mock_test_include_dirs
735  include_dirs += [
736    "$dsoftbus_root_path/interfaces/kits/connect",
737  ]
738  deps = lnn_mock_test_deps_exclude_softbus_server
739  deps += [
740    "$dsoftbus_root_path/adapter:softbus_adapter",
741    "$dsoftbus_root_path/core/frame:softbus_server",
742    "$dsoftbus_root_path/core/connection/wifi_direct_cpp:wifi_direct",
743  ]
744
745  if (is_standard_system) {
746    external_deps = [
747      "cJSON:cjson",
748      "c_utils:utils",
749      "device_auth:deviceauth_sdk",
750      "googletest:gmock",
751      "googletest:gtest_main",
752      "hilog:libhilog",
753    ]
754  } else {
755    external_deps = [
756      "cJSON:cjson",
757      "c_utils:utils",
758      "googletest:gmock",
759      "googletest:gtest_main",
760      "hilog:libhilog",
761    ]
762  }
763}
764
765ohos_unittest("LNNNodeWeightTest") {
766  module_out_path = module_output_path
767  sources = [
768    "net_builder/src/lnn_net_ledger_mock.cpp",
769    "net_builder/src/lnn_node_weight_test.cpp",
770    "net_builder/src/lnn_service_mock.cpp",
771    "net_builder/src/lnn_sync_info_mock.cpp",
772  ]
773
774  include_dirs = lnn_mock_test_include_dirs
775  deps = lnn_mock_test_deps_exclude_softbus_server
776
777  if (is_standard_system) {
778    external_deps = [
779      "cJSON:cjson",
780      "c_utils:utils",
781      "device_auth:deviceauth_sdk",
782      "googletest:gmock",
783      "googletest:gtest_main",
784      "hilog:libhilog",
785    ]
786  } else {
787    external_deps = [
788      "cJSON:cjson",
789      "c_utils:utils",
790      "googletest:gmock",
791      "googletest:gtest_main",
792      "hilog:libhilog",
793    ]
794  }
795}
796
797ohos_unittest("LNNP2pInfoTest") {
798  module_out_path = module_output_path
799  sources = [
800    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
801    "net_builder/src/lnn_net_ledger_mock.cpp",
802    "net_builder/src/lnn_p2p_info_test.cpp",
803    "net_builder/src/lnn_service_mock.cpp",
804    "net_builder/src/lnn_sync_info_mock.cpp",
805  ]
806
807  include_dirs = lnn_mock_test_include_dirs
808  deps = lnn_mock_test_deps_exclude_softbus_server
809
810  if (is_standard_system) {
811    external_deps = [
812      "cJSON:cjson",
813      "c_utils:utils",
814      "device_auth:deviceauth_sdk",
815      "googletest:gmock",
816      "googletest:gtest_main",
817      "hilog:libhilog",
818    ]
819  } else {
820    external_deps = [
821      "cJSON:cjson",
822      "c_utils:utils",
823      "googletest:gmock",
824      "googletest:gtest_main",
825      "hilog:libhilog",
826    ]
827  }
828}
829
830ohos_unittest("LNNSyncInfoManagerTest") {
831  module_out_path = module_output_path
832  sources = [
833    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm.c",
834    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm_process.c",
835    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c",
836    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c",
837    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c",
838    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c",
839    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
840    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c",
841    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
842    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
843    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
844    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp",
845    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
846    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
847    "net_builder/mock/lnn_sync_info_manager_mock.cpp",
848    "net_builder/src/lnn_auth_mock.cpp",
849    "net_builder/src/lnn_net_ledger_mock.cpp",
850    "net_builder/src/lnn_service_mock.cpp",
851    "net_builder/src/lnn_sync_info_manager_test.cpp",
852  ]
853
854  include_dirs = lnn_mock_test_include_dirs
855  include_dirs += [
856    "$dsoftbus_root_path/adapter/common/include",
857    "$dsoftbus_root_path/core/authentication/include",
858    "$dsoftbus_root_path/core/bus_center/ipc/include",
859    "$dsoftbus_root_path/core/bus_center/monitor/include/",
860    "$dsoftbus_root_path/core/frame/init/include",
861    "$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
862    "$dsoftbus_root_path/interfaces/kits/adapter ",
863    "$dsoftbus_root_path/interfaces/kits/authentication",
864  ]
865
866  deps = lnn_mock_test_deps
867  deps += [ "$dsoftbus_root_path/core/connection/wifi_direct_cpp:wifi_direct" ]
868  if (is_standard_system) {
869    external_deps = [
870      "c_utils:utils",
871      "device_auth:deviceauth_sdk",
872      "googletest:gmock",
873      "googletest:gtest_main",
874      "hilog:libhilog",
875    ]
876  } else {
877    external_deps = [
878      "c_utils:utils",
879      "googletest:gmock",
880      "googletest:gtest_main",
881      "hilog:libhilog",
882    ]
883  }
884}
885
886ohos_unittest("LNNTopoManagerTest") {
887  module_out_path = module_output_path
888  sources = [
889    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
890    "net_builder/src/lnn_net_ledger_mock.cpp",
891    "net_builder/src/lnn_service_mock.cpp",
892    "net_builder/src/lnn_sync_info_mock.cpp",
893    "net_builder/src/lnn_topo_manager_test.cpp",
894  ]
895
896  include_dirs = lnn_mock_test_include_dirs
897  include_dirs += [ "$dsoftbus_root_path/core/authentication/include" ]
898  deps = lnn_mock_test_deps_exclude_softbus_server
899
900  if (is_standard_system) {
901    external_deps = [
902      "cJSON:cjson",
903      "c_utils:utils",
904      "device_auth:deviceauth_sdk",
905      "googletest:gmock",
906      "googletest:gtest_main",
907      "hilog:libhilog",
908    ]
909  } else {
910    external_deps = [
911      "cJSON:cjson",
912      "c_utils:utils",
913      "googletest:gmock",
914      "googletest:gtest_main",
915      "hilog:libhilog",
916    ]
917  }
918}
919
920ohos_unittest("LNNBtNetworkImplMockTest") {
921  module_out_path = module_output_path
922  sources = [
923    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
924    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_connection_addr_utils.c",
925    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
926    "net_builder/src/lnn_auth_mock.cpp",
927    "net_buscenter/lnn_bt_network_impl_mock.cpp",
928    "net_buscenter/lnn_bt_network_impl_test.cpp",
929  ]
930
931  include_dirs = [
932    "$dsoftbus_dfx_path/interface/include",
933    "$dsoftbus_dfx_path/interface/include/form",
934    "$dsoftbus_root_path/adapter/common/bus_center/include/",
935    "$dsoftbus_root_path/adapter/common/include",
936    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
937    "$dsoftbus_root_path/core/adapter/bus_center/include",
938    "$dsoftbus_root_path/core/authentication/include",
939    "$dsoftbus_root_path/core/authentication/interface",
940    "$dsoftbus_root_path/core/bus_center/interface",
941    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
942    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
943    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
944    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
945    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
946    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
947    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
948    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
949    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
950    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
951    "$dsoftbus_root_path/core/bus_center/service/include",
952    "$dsoftbus_root_path/core/bus_center/utils/include",
953    "$dsoftbus_root_path/core/common/include",
954    "$dsoftbus_root_path/core/connection/manager",
955    "$dsoftbus_root_path/core/discovery/interface",
956    "$dsoftbus_root_path/core/discovery/manager/include",
957    "$dsoftbus_root_path/core/transmission/interface",
958    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
959    "$dsoftbus_root_path/interfaces/kits/authentication",
960    "$dsoftbus_root_path/interfaces/kits/bus_center",
961    "$dsoftbus_root_path/interfaces/kits/common",
962    "$dsoftbus_root_path/interfaces/kits/disc",
963    "$dsoftbus_root_path/interfaces/kits/discovery",
964    "$dsoftbus_root_path/interfaces/kits/lnn",
965    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
966    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
967    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
968  ]
969
970  deps = [
971    "$dsoftbus_dfx_path:softbus_dfx",
972    "$dsoftbus_root_path/adapter:softbus_adapter",
973    "$dsoftbus_root_path/core/common:softbus_utils",
974    "$dsoftbus_root_path/core/frame:softbus_server",
975  ]
976
977  if (is_standard_system) {
978    external_deps = [
979      "c_utils:utils",
980      "device_auth:deviceauth_sdk",
981      "dsoftbus:softbus_client",
982      "googletest:gmock",
983      "googletest:gtest_main",
984      "hilog:libhilog",
985    ]
986  } else {
987    external_deps = [
988      "c_utils:utils",
989      "dsoftbus:softbus_client",
990      "googletest:gmock",
991      "googletest:gtest_main",
992      "hilog:libhilog",
993    ]
994  }
995}
996
997ohos_unittest("LNNNetworkManagerMockTest") {
998  module_out_path = module_output_path
999  sources = [
1000    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp",
1001    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl_virtual.c",
1002    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
1003    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_common_utils.c",
1004    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1005    "net_builder/src/lnn_auth_mock.cpp",
1006    "net_builder/src/lnn_net_ledger_mock.cpp",
1007    "net_buscenter/lnn_network_manager_mock.cpp",
1008    "net_buscenter/lnn_network_manager_test.cpp",
1009  ]
1010  include_dirs = lnn_mock_test_include_dirs
1011  include_dirs += [
1012    "$dsoftbus_dfx_path/interface/include",
1013    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1014    "$dsoftbus_root_path/adapter/common/include",
1015    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1016    "$dsoftbus_root_path/core/adapter/bus_center/include",
1017    "$dsoftbus_root_path/core/authentication/include",
1018    "$dsoftbus_root_path/core/authentication/interface",
1019    "$dsoftbus_root_path/core/bus_center/interface",
1020    "$dsoftbus_root_path/core/bus_center/ipc/include",
1021    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1022    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1023    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1024    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1025    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1026    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1027    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
1028    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1029    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1030    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1031    "$dsoftbus_root_path/core/bus_center/monitor/include",
1032    "$dsoftbus_root_path/core/bus_center/service/include",
1033    "$dsoftbus_root_path/core/bus_center/utils/include",
1034    "$dsoftbus_root_path/core/common/include",
1035    "$dsoftbus_root_path/core/connection/manager",
1036    "$dsoftbus_root_path/core/discovery/interface",
1037    "$dsoftbus_root_path/core/discovery/manager/include",
1038    "$dsoftbus_root_path/core/frame/init/include",
1039    "$dsoftbus_root_path/core/transmission/interface",
1040    "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface",
1041    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1042    "$dsoftbus_root_path/interfaces/kits/adapter",
1043    "$dsoftbus_root_path/interfaces/kits/authentication",
1044    "$dsoftbus_root_path/interfaces/kits/bus_center",
1045    "$dsoftbus_root_path/interfaces/kits/common",
1046    "$dsoftbus_root_path/interfaces/kits/discovery",
1047    "$dsoftbus_root_path/interfaces/kits/lnn",
1048    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1049    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
1050    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1051  ]
1052  deps = [
1053    "$dsoftbus_dfx_path:softbus_dfx",
1054    "$dsoftbus_root_path/adapter:softbus_adapter",
1055    "$dsoftbus_root_path/core/common:softbus_utils",
1056    "$dsoftbus_root_path/core/frame:softbus_server",
1057  ]
1058
1059  if (is_standard_system) {
1060    external_deps = [
1061      "c_utils:utils",
1062      "device_auth:deviceauth_sdk",
1063      "googletest:gmock",
1064      "googletest:gtest_main",
1065      "hilog:libhilog",
1066    ]
1067  } else {
1068    external_deps = [
1069      "c_utils:utils",
1070      "googletest:gmock",
1071      "googletest:gtest_main",
1072      "hilog:libhilog",
1073    ]
1074  }
1075}
1076
1077ohos_unittest("LNNIpNetworkImplMockTest") {
1078  module_out_path = module_output_path
1079  sources = [
1080    "net_buscenter/lnn_ip_network_impl_mock.cpp",
1081    "net_buscenter/lnn_ip_network_impl_test.cpp",
1082  ]
1083
1084  include_dirs = [
1085    "$dsoftbus_dfx_path/interface/include",
1086    "$dsoftbus_dfx_path/interface/include/form",
1087    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1088    "$dsoftbus_root_path/adapter/common/include",
1089    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1090    "$dsoftbus_root_path/core/adapter/bus_center/include",
1091    "$dsoftbus_root_path/core/authentication/include",
1092    "$dsoftbus_root_path/core/authentication/interface",
1093    "$dsoftbus_root_path/core/bus_center/interface",
1094    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1095    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1096    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1097    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1098    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1099    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1100    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
1101    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1102    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1103    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1104    "$dsoftbus_root_path/core/bus_center/service/include",
1105    "$dsoftbus_root_path/core/bus_center/utils/include",
1106    "$dsoftbus_root_path/core/common/include",
1107    "$dsoftbus_root_path/core/connection/coap/include",
1108    "$dsoftbus_root_path/core/connection/manager",
1109    "$dsoftbus_root_path/core/discovery/interface",
1110    "$dsoftbus_root_path/core/discovery/manager/include",
1111    "$dsoftbus_root_path/core/transmission/interface",
1112    "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
1113    "$dsoftbus_root_path/interfaces/kits/adapter",
1114    "$dsoftbus_root_path/interfaces/kits/authentication",
1115    "$dsoftbus_root_path/interfaces/kits/bus_center",
1116    "$dsoftbus_root_path/interfaces/kits/common",
1117    "$dsoftbus_root_path/interfaces/kits/disc",
1118    "$dsoftbus_root_path/interfaces/kits/discovery",
1119    "$dsoftbus_root_path/interfaces/kits/lnn",
1120    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1121    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
1122    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1123  ]
1124
1125  deps = [
1126    "$dsoftbus_dfx_path:softbus_dfx",
1127    "$dsoftbus_root_path/adapter:softbus_adapter",
1128    "$dsoftbus_root_path/core/common:softbus_utils",
1129    "$dsoftbus_root_path/core/frame:softbus_server",
1130  ]
1131
1132  if (is_standard_system) {
1133    external_deps = [
1134      "c_utils:utils",
1135      "device_auth:deviceauth_sdk",
1136      "dsoftbus:softbus_client",
1137      "googletest:gmock",
1138      "googletest:gtest_main",
1139      "hilog:libhilog",
1140    ]
1141  } else {
1142    external_deps = [
1143      "c_utils:utils",
1144      "dsoftbus:softbus_client",
1145      "googletest:gmock",
1146      "googletest:gtest_main",
1147      "hilog:libhilog",
1148    ]
1149  }
1150}
1151
1152ohos_unittest("LNNUsbNetworkImplMockTest") {
1153  module_out_path = module_output_path
1154  sources = [
1155    "net_buscenter/lnn_usb_network_impl_mock.cpp",
1156    "net_buscenter/lnn_usb_network_impl_test.cpp",
1157  ]
1158
1159  include_dirs = [
1160    "$dsoftbus_dfx_path/interface/include",
1161    "$dsoftbus_dfx_path/interface/include/form",
1162    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1163    "$dsoftbus_root_path/adapter/common/include",
1164    "$dsoftbus_root_path/core/adapter/bus_center/include",
1165    "$dsoftbus_root_path/core/authentication/interface",
1166    "$dsoftbus_root_path/core/bus_center/interface",
1167    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1168    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1169    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1170    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1171    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
1172    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1173    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1174    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1175    "$dsoftbus_root_path/core/bus_center/service/include",
1176    "$dsoftbus_root_path/core/bus_center/utils/include",
1177    "$dsoftbus_root_path/core/common/include",
1178    "$dsoftbus_root_path/core/connection/coap/include",
1179    "$dsoftbus_root_path/core/connection/manager",
1180    "$dsoftbus_root_path/core/discovery/interface",
1181    "$dsoftbus_root_path/core/discovery/manager/include",
1182    "$dsoftbus_root_path/core/transmission/interface",
1183    "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
1184    "$dsoftbus_root_path/interfaces/kits/bus_center",
1185    "$dsoftbus_root_path/interfaces/kits/common",
1186    "$dsoftbus_root_path/interfaces/kits/discovery",
1187    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1188    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
1189    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1190  ]
1191
1192  deps = [
1193    "$dsoftbus_dfx_path:softbus_dfx",
1194    "$dsoftbus_root_path/adapter:softbus_adapter",
1195    "$dsoftbus_root_path/core/common:softbus_utils",
1196    "$dsoftbus_root_path/core/frame:softbus_server",
1197  ]
1198
1199  external_deps = [
1200    "c_utils:utils",
1201    "dsoftbus:softbus_client",
1202    "googletest:gmock",
1203    "hilog:libhilog",
1204  ]
1205
1206  if (is_standard_system) {
1207    external_deps += [ "device_auth:deviceauth_sdk" ]
1208  }
1209}
1210
1211ohos_unittest("LNNLedgerMockTest") {
1212  module_out_path = module_output_path
1213  sources = [
1214    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp",
1215    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c",
1216    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_ledger.c",
1217    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c",
1218    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c",
1219    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c",
1220    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
1221    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1222    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1223    "net_ledger/lnn_local_ledger_deps_mock.cpp",
1224    "net_ledger/lnn_local_ledger_test.cpp",
1225  ]
1226
1227  include_dirs = [
1228    "$dsoftbus_dfx_path/interface/include",
1229    "$dsoftbus_dfx_path/interface/include/form",
1230    "$dsoftbus_dfx_path/interface/include/legacy",
1231    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1232    "$dsoftbus_root_path/adapter/common/include",
1233    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
1234    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1235    "$dsoftbus_root_path/core/adapter/bus_center/include",
1236    "$dsoftbus_root_path/core/authentication/include",
1237    "$dsoftbus_root_path/core/authentication/interface",
1238    "$dsoftbus_root_path/core/bus_center/interface",
1239    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1240    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1241    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1242    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1243    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1244    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1245    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1246    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1247    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1248    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1249    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1250    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src",
1251    "$dsoftbus_root_path/core/bus_center/monitor/include",
1252    "$dsoftbus_root_path/core/bus_center/service/include",
1253    "$dsoftbus_root_path/core/bus_center/utils/include",
1254    "$dsoftbus_root_path/core/common/include",
1255    "$dsoftbus_root_path/core/connection/interface",
1256    "$dsoftbus_root_path/core/connection/manager",
1257    "$dsoftbus_root_path/core/connection/p2p/common/include",
1258    "$dsoftbus_root_path/core/connection/p2p/interface",
1259    "$dsoftbus_root_path/core/discovery/interface",
1260    "$dsoftbus_root_path/core/discovery/manager/include",
1261    "$dsoftbus_root_path/core/frame/init/include",
1262    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1263    "$dsoftbus_root_path/interfaces/inner_kits/transport",
1264    "$dsoftbus_root_path/interfaces/kits/adapter",
1265    "$dsoftbus_root_path/interfaces/kits/authentication",
1266    "$dsoftbus_root_path/interfaces/kits/bus_center",
1267    "$dsoftbus_root_path/interfaces/kits/common",
1268    "$dsoftbus_root_path/interfaces/kits/connect",
1269    "$dsoftbus_root_path/interfaces/kits/disc",
1270    "$dsoftbus_root_path/interfaces/kits/discovery",
1271    "$dsoftbus_root_path/interfaces/kits/lnn",
1272    "lane/include",
1273    "unittest/common/",
1274  ]
1275
1276  deps = [
1277    "$dsoftbus_dfx_path:softbus_dfx",
1278    "$dsoftbus_root_path/adapter:softbus_adapter",
1279    "$dsoftbus_root_path/core/common:softbus_utils",
1280    "$dsoftbus_root_path/core/frame:softbus_server",
1281  ]
1282
1283  if (is_standard_system) {
1284    external_deps = [
1285      "cJSON:cjson",
1286      "c_utils:utils",
1287      "device_auth:deviceauth_sdk",
1288      "googletest:gmock",
1289      "googletest:gtest_main",
1290      "hilog:libhilog",
1291    ]
1292  } else {
1293    external_deps = [
1294      "cJSON:cjson",
1295      "c_utils:utils",
1296      "googletest:gmock",
1297      "googletest:gtest_main",
1298      "hilog:libhilog",
1299    ]
1300  }
1301  external_deps += [ "huks:libhukssdk" ]
1302}
1303
1304ohos_unittest("LNNNetLedgerCommonTest") {
1305  module_out_path = module_output_path
1306  sources = [
1307    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_oobe_manager_virtual.cpp",
1308    "net_ledger/lnn_ledger_common_test.cpp",
1309    "net_ledger/lnn_net_ledger_common_mock.cpp",
1310  ]
1311
1312  include_dirs = [
1313    "$dsoftbus_dfx_path/interface/include",
1314    "$dsoftbus_dfx_path/interface/include/form",
1315    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1316    "$dsoftbus_root_path/adapter/common/include",
1317    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1318    "$dsoftbus_root_path/core/adapter/bus_center/include",
1319    "$dsoftbus_root_path/core/authentication/include",
1320    "$dsoftbus_root_path/core/authentication/interface",
1321    "$dsoftbus_root_path/core/bus_center/interface",
1322    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1323    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1324    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1325    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1326    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1327    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1328    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1329    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1330    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1331    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1332    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1333    "$dsoftbus_root_path/core/bus_center/monitor/include",
1334    "$dsoftbus_root_path/core/bus_center/service/include",
1335    "$dsoftbus_root_path/core/bus_center/utils/include",
1336    "$dsoftbus_root_path/core/common/include",
1337    "$dsoftbus_root_path/core/connection/interface",
1338    "$dsoftbus_root_path/core/connection/manager",
1339    "$dsoftbus_root_path/core/connection/p2p/common/include",
1340    "$dsoftbus_root_path/core/connection/p2p/interface",
1341    "$dsoftbus_root_path/core/discovery/interface",
1342    "$dsoftbus_root_path/core/discovery/manager/include",
1343    "$dsoftbus_root_path/core/frame/init/include",
1344    "$dsoftbus_root_path/interfaces/kits/adapter",
1345    "$dsoftbus_root_path/interfaces/kits/authentication",
1346    "$dsoftbus_root_path/interfaces/kits/bus_center",
1347    "$dsoftbus_root_path/interfaces/kits/common",
1348    "$dsoftbus_root_path/interfaces/kits/connect",
1349    "$dsoftbus_root_path/interfaces/kits/disc",
1350    "$dsoftbus_root_path/interfaces/kits/discovery",
1351    "$dsoftbus_root_path/interfaces/kits/lnn",
1352    "unittest/common/",
1353  ]
1354
1355  deps = [
1356    "$dsoftbus_dfx_path:softbus_dfx",
1357    "$dsoftbus_root_path/adapter:softbus_adapter",
1358    "$dsoftbus_root_path/core/common:softbus_utils",
1359    "$dsoftbus_root_path/core/frame:softbus_server",
1360  ]
1361  if (dsoftbus_feature_lnn_frame) {
1362    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ]
1363    sources += [
1364      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c",
1365      "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1366    ]
1367  } else {
1368    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ]
1369  }
1370  if (is_standard_system) {
1371    external_deps = [
1372      "cJSON:cjson",
1373      "c_utils:utils",
1374      "device_auth:deviceauth_sdk",
1375      "dsoftbus:softbus_client",
1376      "googletest:gmock",
1377      "googletest:gtest_main",
1378      "hilog:libhilog",
1379    ]
1380  } else {
1381    external_deps = [
1382      "cJSON:cjson",
1383      "c_utils:utils",
1384      "dsoftbus:softbus_client",
1385      "googletest:gmock",
1386      "googletest:gtest_main",
1387      "hilog:libhilog",
1388    ]
1389  }
1390  external_deps += [ "huks:libhukssdk" ]
1391}
1392
1393ohos_unittest("LNNSleCapabilityTest") {
1394  module_out_path = module_output_path
1395  sources = [
1396    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
1397    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1398    "net_ledger/lnn_sle_capability_mock.cpp",
1399    "net_ledger/lnn_sle_capability_test.cpp",
1400  ]
1401  include_dirs = [
1402    "$dsoftbus_dfx_path/interface/include",
1403    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1404    "$dsoftbus_root_path/adapter/common/include",
1405    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
1406    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1407    "$dsoftbus_root_path/core/adapter/bus_center/include",
1408    "$dsoftbus_root_path/core/authentication/include",
1409    "$dsoftbus_root_path/core/authentication/interface",
1410    "$dsoftbus_root_path/core/bus_center/interface",
1411    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1412    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1413    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1414    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1415    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1416    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1417    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1418    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1419    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
1420    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1421    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1422    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1423    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src",
1424    "$dsoftbus_root_path/core/bus_center/monitor/include",
1425    "$dsoftbus_root_path/core/bus_center/service/include",
1426    "$dsoftbus_root_path/core/bus_center/utils/include",
1427    "$dsoftbus_root_path/core/common/include",
1428    "$dsoftbus_root_path/core/connection/interface",
1429    "$dsoftbus_root_path/core/connection/manager",
1430    "$dsoftbus_root_path/core/connection/p2p/common/include",
1431    "$dsoftbus_root_path/core/connection/p2p/interface",
1432    "$dsoftbus_root_path/core/discovery/interface",
1433    "$dsoftbus_root_path/core/discovery/manager/include",
1434    "$dsoftbus_root_path/core/frame/init/include",
1435    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1436    "$dsoftbus_root_path/interfaces/kits/adapter",
1437    "$dsoftbus_root_path/interfaces/kits/authentication",
1438    "$dsoftbus_root_path/interfaces/kits/bus_center",
1439    "$dsoftbus_root_path/interfaces/kits/common",
1440    "$dsoftbus_root_path/interfaces/kits/connect",
1441    "$dsoftbus_root_path/interfaces/kits/disc",
1442    "$dsoftbus_root_path/interfaces/kits/discovery",
1443    "$dsoftbus_root_path/interfaces/kits/lnn",
1444    "lane/include",
1445    "unittest/common/",
1446  ]
1447
1448  deps = [
1449    "$dsoftbus_dfx_path:softbus_dfx",
1450    "$dsoftbus_root_path/adapter:softbus_adapter",
1451    "$dsoftbus_root_path/core/common:softbus_utils",
1452    "$dsoftbus_root_path/core/frame:softbus_server",
1453  ]
1454
1455  if (is_standard_system) {
1456    external_deps = [
1457      "cJSON:cjson",
1458      "c_utils:utils",
1459      "device_auth:deviceauth_sdk",
1460      "googletest:gmock",
1461      "googletest:gtest_main",
1462      "hilog:libhilog",
1463    ]
1464  } else {
1465    external_deps = [
1466      "cJSON:cjson",
1467      "c_utils:utils",
1468      "googletest:gmock",
1469      "googletest:gtest_main",
1470      "hilog:libhilog",
1471    ]
1472  }
1473}
1474
1475ohos_unittest("LNNDisctributedLedgerTest") {
1476  module_out_path = module_output_path
1477  sources = [
1478    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1479    "net_ledger/lnn_disctributed_net_ledger_test.cpp",
1480    "net_ledger/lnn_disctributed_net_ledger_mock.cpp",
1481  ]
1482
1483  include_dirs = [
1484    "$dsoftbus_dfx_path/interface/include",
1485    "$dsoftbus_dfx_path/interface/include/form",
1486    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1487    "$dsoftbus_root_path/adapter/common/include",
1488    "$dsoftbus_root_path/core/adapter/bus_center/include",
1489    "$dsoftbus_root_path/core/authentication/include",
1490    "$dsoftbus_root_path/core/authentication/interface",
1491    "$dsoftbus_root_path/core/bus_center/interface",
1492    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1493    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1494    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1495    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1496    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1497    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1498    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1499    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
1500    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1501    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1502    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src",
1503    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1504    "$dsoftbus_root_path/core/bus_center/monitor/include",
1505    "$dsoftbus_root_path/core/bus_center/service/include",
1506    "$dsoftbus_root_path/core/bus_center/utils/include",
1507    "$dsoftbus_root_path/core/bus_center/utils/src",
1508    "$dsoftbus_root_path/core/common/include",
1509    "$dsoftbus_root_path/core/connection/interface",
1510    "$dsoftbus_root_path/core/connection/manager",
1511    "$dsoftbus_root_path/core/connection/p2p/common/include",
1512    "$dsoftbus_root_path/core/connection/p2p/interface",
1513    "$dsoftbus_root_path/core/discovery/interface",
1514    "$dsoftbus_root_path/core/discovery/manager/include",
1515    "$dsoftbus_root_path/core/frame/init/include",
1516    "$dsoftbus_root_path/interfaces/kits/adapter",
1517    "$dsoftbus_root_path/interfaces/kits/authentication",
1518    "$dsoftbus_root_path/interfaces/kits/bus_center",
1519    "$dsoftbus_root_path/interfaces/kits/common",
1520    "$dsoftbus_root_path/interfaces/kits/connect",
1521    "$dsoftbus_root_path/interfaces/kits/disc",
1522    "$dsoftbus_root_path/interfaces/kits/discovery",
1523    "$dsoftbus_root_path/interfaces/kits/lnn",
1524    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger",
1525    "$dsoftbus_root_path/tests/interface/enhance",
1526    "unittest/common/",
1527  ]
1528
1529  deps = [
1530    "$dsoftbus_dfx_path:softbus_dfx",
1531    "$dsoftbus_root_path/adapter:softbus_adapter",
1532    "$dsoftbus_root_path/core/common:softbus_utils",
1533    "$dsoftbus_root_path/core/frame:softbus_server",
1534  ]
1535  if (is_standard_system) {
1536    external_deps = [
1537      "cJSON:cjson",
1538      "c_utils:utils",
1539      "device_auth:deviceauth_sdk",
1540      "dsoftbus:softbus_client",
1541      "googletest:gmock",
1542      "googletest:gtest_main",
1543      "hilog:libhilog",
1544    ]
1545  } else {
1546    external_deps = [
1547      "cJSON:cjson",
1548      "c_utils:utils",
1549      "dsoftbus:softbus_client",
1550      "googletest:gmock",
1551      "googletest:gtest_main",
1552      "hilog:libhilog",
1553    ]
1554  }
1555  external_deps += [
1556    "huks:libhukssdk",
1557    "googletest:gmock",
1558    ]
1559}
1560
1561ohos_unittest("LNNDistributedNetLedgerManagerTest") {
1562  module_out_path = module_output_path
1563  sources = [
1564    "net_ledger/lnn_distributed_net_ledger_manager_mock.cpp",
1565    "net_ledger/lnn_distributed_net_ledger_manager_test.cpp",
1566  ]
1567
1568  include_dirs = [
1569    "$dsoftbus_dfx_path/interface/include",
1570    "$dsoftbus_dfx_path/interface/include/form",
1571    "$dsoftbus_root_path/adapter/common/bus_center/include",
1572    "$dsoftbus_root_path/adapter/common/include",
1573    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
1574    "$dsoftbus_root_path/core/adapter/bus_center/include",
1575    "$dsoftbus_root_path/core/authentication/include",
1576    "$dsoftbus_root_path/core/authentication/interface",
1577    "$dsoftbus_root_path/core/bus_center/interface",
1578    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1579    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1580    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1581    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1582    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1583    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1584    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1585    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1586    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1587    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1588    "$dsoftbus_root_path/core/bus_center/monitor/include",
1589    "$dsoftbus_root_path/core/bus_center/service/include",
1590    "$dsoftbus_root_path/core/bus_center/utils/include",
1591    "$dsoftbus_root_path/core/common/include",
1592    "$dsoftbus_root_path/core/discovery/interface",
1593    "$dsoftbus_root_path/core/discovery/manager/include",
1594    "$dsoftbus_root_path/core/frame/init/include",
1595    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1596    "$dsoftbus_root_path/interfaces/kits/bus_center",
1597    "$dsoftbus_root_path/interfaces/kits/common",
1598    "unittest/common/",
1599  ]
1600
1601  deps = [
1602    "$dsoftbus_dfx_path:softbus_dfx",
1603    "$dsoftbus_root_path/adapter:softbus_adapter",
1604    "$dsoftbus_root_path/core/common:softbus_utils",
1605    "$dsoftbus_root_path/core/frame:softbus_server",
1606  ]
1607
1608  external_deps = [
1609    "cJSON:cjson",
1610    "c_utils:utils",
1611    "device_auth:deviceauth_sdk",
1612    "googletest:gmock_main",
1613    "hilog:libhilog",
1614  ]
1615}
1616
1617ohos_unittest("LNNMetaNodeLedgerTest") {
1618  module_out_path = module_output_path
1619  sources = [ "net_ledger/lnn_meta_node_ledger_test.cpp" ]
1620
1621  include_dirs = [
1622    "$dsoftbus_dfx_path/interface/include",
1623    "$dsoftbus_dfx_path/interface/include/form",
1624    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1625    "$dsoftbus_root_path/adapter/common/include",
1626    "$dsoftbus_root_path/core/adapter/bus_center/include",
1627    "$dsoftbus_root_path/core/authentication/include",
1628    "$dsoftbus_root_path/core/authentication/interface",
1629    "$dsoftbus_root_path/core/bus_center/interface",
1630    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1631    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1632    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1633    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1634    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1635    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1636    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1637    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1638    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1639    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1640    "$dsoftbus_root_path/core/bus_center/monitor/include",
1641    "$dsoftbus_root_path/core/bus_center/service/include",
1642    "$dsoftbus_root_path/core/bus_center/utils/include",
1643    "$dsoftbus_root_path/core/common/include",
1644    "$dsoftbus_root_path/core/connection/interface",
1645    "$dsoftbus_root_path/core/connection/manager",
1646    "$dsoftbus_root_path/core/connection/p2p/common/include",
1647    "$dsoftbus_root_path/core/connection/p2p/interface",
1648    "$dsoftbus_root_path/core/discovery/interface",
1649    "$dsoftbus_root_path/core/discovery/manager/include",
1650    "$dsoftbus_root_path/core/frame/init/include",
1651    "$dsoftbus_root_path/interfaces/kits/adapter",
1652    "$dsoftbus_root_path/interfaces/kits/authentication",
1653    "$dsoftbus_root_path/interfaces/kits/bus_center",
1654    "$dsoftbus_root_path/interfaces/kits/common",
1655    "$dsoftbus_root_path/interfaces/kits/connect",
1656    "$dsoftbus_root_path/interfaces/kits/disc",
1657    "$dsoftbus_root_path/interfaces/kits/discovery",
1658    "$dsoftbus_root_path/interfaces/kits/lnn",
1659    "unittest/common/",
1660  ]
1661
1662  deps = [
1663    "$dsoftbus_dfx_path:softbus_dfx",
1664    "$dsoftbus_root_path/adapter:softbus_adapter",
1665    "$dsoftbus_root_path/core/common:softbus_utils",
1666    "$dsoftbus_root_path/core/frame:softbus_server",
1667  ]
1668  if (dsoftbus_feature_lnn_frame) {
1669    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ]
1670    sources += [
1671      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c",
1672      "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1673    ]
1674  } else {
1675    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ]
1676  }
1677  if (is_standard_system) {
1678    external_deps = [
1679      "cJSON:cjson",
1680      "c_utils:utils",
1681      "device_auth:deviceauth_sdk",
1682      "dsoftbus:softbus_client",
1683      "googletest:gmock",
1684      "googletest:gtest_main",
1685      "hilog:libhilog",
1686    ]
1687  } else {
1688    external_deps = [
1689      "cJSON:cjson",
1690      "c_utils:utils",
1691      "dsoftbus:softbus_client",
1692      "googletest:gmock",
1693      "googletest:gtest_main",
1694      "hilog:libhilog",
1695    ]
1696  }
1697  external_deps += [ "huks:libhukssdk" ]
1698}
1699
1700ohos_unittest("LNNLaneExtMockTest") {
1701  module_out_path = module_output_path
1702  sources = [
1703    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils_virtual.c",
1704    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c",
1705    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
1706    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
1707    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c",
1708    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
1709    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c",
1710    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_conflict.c",
1711    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_ledger.c",
1712    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
1713    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
1714    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_model.c",
1715    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c",
1716    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
1717    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_free_lane.c",
1718    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c",
1719    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1720    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
1721    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1722    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1723    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
1724    "lane/src/lnn_lane_deps_mock.cpp",
1725    "lane/src/lnn_lane_ext_test.cpp",
1726    "lane/src/lnn_lane_power_ctrl_deps_mock.cpp",
1727    "lane/src/lnn_wifi_adpter_mock.cpp",
1728    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
1729  ]
1730
1731  include_dirs = [
1732    "$dsoftbus_dfx_path/interface/include",
1733    "$dsoftbus_dfx_path/interface/include/form",
1734    "$dsoftbus_dfx_path/interface/include/legacy",
1735    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1736    "$dsoftbus_root_path/adapter/common/include",
1737    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1738    "$dsoftbus_root_path/adapter/common/net/hdi/include",
1739    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1740    "$dsoftbus_root_path/core/adapter/bus_center/include",
1741    "$dsoftbus_root_path/core/authentication/include",
1742    "$dsoftbus_root_path/core/authentication/interface",
1743    "$dsoftbus_root_path/core/bus_center/interface",
1744    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
1745    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1746    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1747    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1748    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1749    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
1750    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1751    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1752    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1753    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1754    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1755    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1756    "$dsoftbus_root_path/core/bus_center/monitor/include",
1757    "$dsoftbus_root_path/core/bus_center/service/include",
1758    "$dsoftbus_root_path/core/bus_center/utils/include",
1759    "$dsoftbus_root_path/core/common/include",
1760    "$dsoftbus_root_path/core/connection/ble/include",
1761    "$dsoftbus_root_path/core/connection/interface",
1762    "$dsoftbus_root_path/core/connection/p2p/common/include",
1763    "$dsoftbus_root_path/core/connection/p2p/interface",
1764    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1765    "$dsoftbus_root_path/core/discovery/interface",
1766    "$dsoftbus_root_path/core/discovery/manager/include",
1767    "$dsoftbus_root_path/core/frame/common/include",
1768    "$dsoftbus_root_path/core/frame/init/include",
1769    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1770    "$dsoftbus_root_path/interfaces/inner_kits/transport",
1771    "$dsoftbus_root_path/interfaces/kits/bus_center",
1772    "$dsoftbus_root_path/interfaces/kits/common",
1773    "$dsoftbus_root_path/interfaces/kits/discovery",
1774    "$dsoftbus_root_path/tests/interface/enhance",
1775    "lane/include",
1776    "unittest/common/",
1777  ]
1778
1779  deps = [
1780    "$dsoftbus_dfx_path:softbus_dfx",
1781    "$dsoftbus_root_path/adapter:softbus_adapter",
1782    "$dsoftbus_root_path/core/common:softbus_utils",
1783  ]
1784
1785  if (is_standard_system) {
1786    external_deps = [
1787      "cJSON:cjson",
1788      "c_utils:utils",
1789      "device_auth:deviceauth_sdk",
1790      "googletest:gmock",
1791      "googletest:gtest_main",
1792      "hilog:libhilog",
1793    ]
1794    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
1795      external_deps += [ "wifi:wifi_sdk" ]
1796    }
1797  } else {
1798    external_deps = [
1799      "cJSON:cjson",
1800      "c_utils:utils",
1801      "googletest:gmock",
1802      "googletest:gtest_main",
1803      "hilog:libhilog",
1804      "wifi:wifi_sdk",
1805    ]
1806  }
1807}
1808
1809ohos_unittest("LNNLaneSelectTest") {
1810  module_out_path = module_output_path
1811  sources = [
1812    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c",
1813    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c",
1814    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
1815    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1816    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
1817    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1818    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
1819    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
1820    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_select/lnn_lane_select_test.cpp",
1821    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
1822    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_select_mock.cpp",
1823    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_wifi_adpter_mock.cpp",
1824    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
1825  ]
1826
1827  include_dirs = [
1828    "lane/include",
1829    "lane_link",
1830    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1831    "$dsoftbus_root_path/adapter/common/net/hdi/include",
1832    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1833    "$dsoftbus_root_path/core/adapter/bus_center/include",
1834    "$dsoftbus_root_path/core/authentication/include",
1835    "$dsoftbus_root_path/core/authentication/interface",
1836    "$dsoftbus_root_path/core/bus_center/interface",
1837    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1838    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1839    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1840    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1841    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1842    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1843    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1844    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1845    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1846    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1847    "$dsoftbus_root_path/core/bus_center/monitor/include",
1848    "$dsoftbus_root_path/core/bus_center/service/include",
1849    "$dsoftbus_root_path/core/bus_center/utils/include",
1850    "$dsoftbus_root_path/core/connection/ble/include",
1851    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1852    "$dsoftbus_root_path/core/discovery/interface",
1853    "$dsoftbus_root_path/core/discovery/manager/include",
1854    "$dsoftbus_root_path/dfx/interface/include/form",
1855    "$dsoftbus_root_path/dfx/interface/include/legacy",
1856    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1857    "$dsoftbus_root_path/interfaces/kits/bus_center",
1858    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub",
1859  ]
1860
1861  deps = [
1862    "$dsoftbus_dfx_path:softbus_dfx",
1863    "$dsoftbus_root_path/adapter:softbus_adapter",
1864    "$dsoftbus_root_path/core/common:softbus_utils",
1865  ]
1866
1867  external_deps = [
1868    "cJSON:cjson",
1869    "c_utils:utils",
1870    "googletest:gmock",
1871    "hilog:libhilog",
1872  ]
1873}
1874
1875ohos_unittest("LNNSelectRuleTest") {
1876  module_out_path = module_output_path
1877  sources = [
1878    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c",
1879    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
1880    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1881    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_select_rule_mock.cpp",
1882    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_select_rule_test.cpp",
1883  ]
1884
1885  include_dirs = [
1886    "$dsoftbus_root_path/adapter/common/net/hdi/include",
1887    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1888    "$dsoftbus_root_path/core/adapter/bus_center/include",
1889    "$dsoftbus_root_path/core/authentication/interface",
1890    "$dsoftbus_root_path/core/connection/ble/include",
1891    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1892    "$dsoftbus_root_path/core/bus_center/interface",
1893    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1894    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1895    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1896    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1897    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1898    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1899    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1900    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1901    "$dsoftbus_root_path/core/bus_center/monitor/include",
1902    "$dsoftbus_root_path/core/bus_center/service/include",
1903    "$dsoftbus_root_path/core/bus_center/utils/include",
1904    "$dsoftbus_root_path/core/discovery/interface",
1905    "$dsoftbus_root_path/core/discovery/manager/include",
1906    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link",
1907    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
1908    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub",
1909    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1910    "$dsoftbus_root_path/interfaces/kits/bus_center",
1911    "$dsoftbus_root_path/interfaces/kits/lnn",
1912  ]
1913
1914  deps = [
1915    "$dsoftbus_dfx_path:softbus_dfx",
1916    "$dsoftbus_root_path/adapter:softbus_adapter",
1917    "$dsoftbus_root_path/core/common:softbus_utils",
1918  ]
1919
1920  external_deps = [
1921    "cJSON:cjson",
1922    "c_utils:utils",
1923    "googletest:gmock",
1924    "hilog:libhilog",
1925  ]
1926}
1927
1928ohos_unittest("LNNLaneLinkLedgerTest") {
1929  module_out_path = module_output_path
1930  sources = [
1931    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_ledger.c",
1932    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1933    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_ledger_test.cpp",
1934  ]
1935
1936  include_dirs = [
1937    "$dsoftbus_dfx_path/interface/include/form",
1938    "$dsoftbus_root_path/adapter/common/net/hdi/include",
1939    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1940    "$dsoftbus_root_path/core/bus_center/interface",
1941    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1942    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1943    "$dsoftbus_root_path/core/bus_center/utils/include/",
1944    "$dsoftbus_root_path/core/discovery/interface",
1945    "$dsoftbus_root_path/core/discovery/manager/include",
1946    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1947    "$dsoftbus_root_path/interfaces/inner_kits/transport",
1948    "$dsoftbus_root_path/interfaces/kits/bus_center",
1949    "lane/include",
1950  ]
1951
1952  deps = [
1953    "$dsoftbus_dfx_path:softbus_dfx",
1954    "$dsoftbus_root_path/adapter:softbus_adapter",
1955    "$dsoftbus_root_path/core/common:softbus_utils",
1956  ]
1957
1958  if (is_standard_system) {
1959    external_deps = [
1960      "cJSON:cjson",
1961      "c_utils:utils",
1962      "device_auth:deviceauth_sdk",
1963      "googletest:gmock",
1964      "googletest:gtest_main",
1965      "hilog:libhilog",
1966    ]
1967    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
1968      external_deps += [ "wifi:wifi_sdk" ]
1969    }
1970  } else {
1971    external_deps = [
1972      "cJSON:cjson",
1973      "c_utils:utils",
1974      "googletest:gmock",
1975      "googletest:gtest_main",
1976      "hilog:libhilog",
1977      "wifi:wifi_sdk",
1978    ]
1979  }
1980}
1981
1982ohos_unittest("LNNLaneMockTest") {
1983  module_out_path = module_output_path
1984  sources = [
1985    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils_virtual.c",
1986    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c",
1987    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
1988    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
1989    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c",
1990    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
1991    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c",
1992    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_conflict.c",
1993    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_ledger.c",
1994    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
1995    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
1996    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_model.c",
1997    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c",
1998    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
1999    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_free_lane.c",
2000    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c",
2001    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2002    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
2003    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
2004    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
2005    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
2006    "lane/src/lnn_lane_deps_mock.cpp",
2007    "lane/src/lnn_lane_test.cpp",
2008    "lane/src/lnn_wifi_adpter_mock.cpp",
2009    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
2010  ]
2011
2012  include_dirs = [
2013    "$dsoftbus_dfx_path/interface/include",
2014    "$dsoftbus_dfx_path/interface/include/form",
2015    "$dsoftbus_dfx_path/interface/include/legacy",
2016    "$dsoftbus_root_path/adapter/common/bus_center/include/",
2017    "$dsoftbus_root_path/adapter/common/include",
2018    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2019    "$dsoftbus_root_path/adapter/common/net/hdi/include",
2020    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2021    "$dsoftbus_root_path/core/adapter/bus_center/include",
2022    "$dsoftbus_root_path/core/authentication/include",
2023    "$dsoftbus_root_path/core/authentication/interface",
2024    "$dsoftbus_root_path/core/bus_center/interface",
2025    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2026    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2027    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2028    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2029    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2030    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
2031    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2032    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2033    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2034    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2035    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2036    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2037    "$dsoftbus_root_path/core/bus_center/monitor/include",
2038    "$dsoftbus_root_path/core/bus_center/service/include",
2039    "$dsoftbus_root_path/core/bus_center/utils/include",
2040    "$dsoftbus_root_path/core/common/include",
2041    "$dsoftbus_root_path/core/connection/ble/include",
2042    "$dsoftbus_root_path/core/connection/interface",
2043    "$dsoftbus_root_path/core/connection/p2p/common/include",
2044    "$dsoftbus_root_path/core/connection/p2p/interface",
2045    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2046    "$dsoftbus_root_path/core/discovery/ble/dispatcher/include",
2047    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include",
2048    "$dsoftbus_root_path/core/discovery/interface",
2049    "$dsoftbus_root_path/core/discovery/manager/include",
2050    "$dsoftbus_root_path/core/frame/common/include",
2051    "$dsoftbus_root_path/core/frame/init/init/include",
2052    "$dsoftbus_root_path/core/transmission/trans_channel/common/include",
2053    "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/include",
2054    "$dsoftbus_root_path/dsoftbus_enhance/core/connection/wifi_direct_cpp",
2055    "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/action/adapter/include",
2056    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2057    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2058    "$dsoftbus_root_path/interfaces/kits/adapter",
2059    "$dsoftbus_root_path/interfaces/kits/authentication",
2060    "$dsoftbus_root_path/interfaces/kits/bus_center",
2061    "$dsoftbus_root_path/interfaces/kits/common",
2062    "$dsoftbus_root_path/interfaces/kits/connect",
2063    "$dsoftbus_root_path/interfaces/kits/disc",
2064    "$dsoftbus_root_path/interfaces/kits/discovery",
2065    "$dsoftbus_root_path/interfaces/kits/transport",
2066    "lane/include",
2067    "unittest/common/",
2068  ]
2069
2070  deps = [
2071    "$dsoftbus_dfx_path:softbus_dfx",
2072    "$dsoftbus_root_path/adapter:softbus_adapter",
2073    "$dsoftbus_root_path/core/common:softbus_utils",
2074  ]
2075
2076  if (is_standard_system) {
2077    external_deps = [
2078      "cJSON:cjson",
2079      "c_utils:utils",
2080      "device_auth:deviceauth_sdk",
2081      "googletest:gmock",
2082      "googletest:gtest_main",
2083      "hilog:libhilog",
2084    ]
2085    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
2086      external_deps += [ "wifi:wifi_sdk" ]
2087    }
2088  } else {
2089    external_deps = [
2090      "cJSON:cjson",
2091      "c_utils:utils",
2092      "googletest:gmock",
2093      "googletest:gtest_main",
2094      "hilog:libhilog",
2095      "wifi:wifi_sdk",
2096    ]
2097  }
2098}
2099
2100ohos_unittest("LNNTimeSyncTest") {
2101  module_out_path = module_output_path
2102  sources = [
2103    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/mock/auth_mock.cpp",
2104    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/event_mock.cpp",
2105    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/ledger_mock.cpp",
2106    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_lane_hub_time_sync_test.cpp",
2107  ]
2108  include_dirs = [
2109    "$dsoftbus_dfx_path/interface/include/form",
2110    "$dsoftbus_root_path/adapter/common/include",
2111    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2112    "$dsoftbus_root_path/core/adapter/bus_center/include",
2113    "$dsoftbus_root_path/core/authentication/include",
2114    "$dsoftbus_root_path/core/authentication/interface",
2115    "$dsoftbus_root_path/core/bus_center/interface",
2116    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2117    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2118    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include",
2119    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/src",
2120    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2121    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2122    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2123    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2124    "$dsoftbus_root_path/core/bus_center/service/include",
2125    "$dsoftbus_root_path/core/bus_center/utils/include",
2126    "$dsoftbus_root_path/core/common/include",
2127    "$dsoftbus_root_path/core/connection/p2p/common/include",
2128    "$dsoftbus_root_path/core/connection/p2p/interface",
2129    "$dsoftbus_root_path/core/discovery/interface",
2130    "$dsoftbus_root_path/core/discovery/manager/include",
2131    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2132    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2133    "$dsoftbus_root_path/interfaces/kits/bus_center",
2134    "$dsoftbus_root_path/interfaces/kits/common",
2135    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock",
2136    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/mock",
2137    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2138  ]
2139
2140  deps = [
2141    "$dsoftbus_root_path/adapter:softbus_adapter",
2142    "$dsoftbus_root_path/core/common:softbus_utils",
2143    "$dsoftbus_root_path/core/frame:softbus_server",
2144  ]
2145
2146  external_deps = [
2147    "cJSON:cjson",
2148    "c_utils:utils",
2149    "device_auth:deviceauth_sdk",
2150    "googletest:gmock",
2151    "googletest:gtest_main",
2152    "hilog:libhilog",
2153  ]
2154
2155  cflags = [
2156    "-fPIC",
2157    "-std=c99",
2158  ]
2159  cflags_cc = cflags
2160}
2161
2162ohos_unittest("LNNTimeSyncOtherTest") {
2163  module_out_path = module_output_path
2164  sources = [
2165    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/time_sync_other_mock.cpp",
2166    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_lane_hub_time_sync_other_test.cpp",
2167  ]
2168  include_dirs = [
2169    "$dsoftbus_dfx_path/interface/include/form",
2170    "$dsoftbus_root_path/adapter/common/include",
2171    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2172    "$dsoftbus_root_path/core/adapter/bus_center/include",
2173    "$dsoftbus_root_path/core/authentication/include",
2174    "$dsoftbus_root_path/core/authentication/interface",
2175    "$dsoftbus_root_path/core/bus_center/interface",
2176    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2177    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2178    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include",
2179    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/src",
2180    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2181    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2182    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2183    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2184    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2185    "$dsoftbus_root_path/core/bus_center/service/include",
2186    "$dsoftbus_root_path/core/bus_center/utils/include",
2187    "$dsoftbus_root_path/core/common/include",
2188    "$dsoftbus_root_path/core/connection/p2p/common/include",
2189    "$dsoftbus_root_path/core/connection/p2p/interface",
2190    "$dsoftbus_root_path/core/discovery/interface",
2191    "$dsoftbus_root_path/core/discovery/manager/include",
2192    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2193    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2194    "$dsoftbus_root_path/interfaces/kits/bus_center",
2195    "$dsoftbus_root_path/interfaces/kits/common",
2196    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock",
2197    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/mock",
2198    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2199  ]
2200
2201  deps = [
2202    "$dsoftbus_root_path/adapter:softbus_adapter",
2203    "$dsoftbus_root_path/core/common:softbus_utils",
2204    "$dsoftbus_root_path/core/frame:softbus_server",
2205  ]
2206
2207  external_deps = [
2208    "cJSON:cjson",
2209    "c_utils:utils",
2210    "device_auth:deviceauth_sdk",
2211    "googletest:gmock",
2212    "googletest:gtest_main",
2213    "hilog:libhilog",
2214  ]
2215
2216  cflags = [
2217    "-fPIC",
2218    "-std=c99",
2219  ]
2220  cflags_cc = cflags
2221}
2222
2223ohos_unittest("LNNHeartBeatTest") {
2224  module_out_path = module_output_path
2225  sources = [
2226    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/event_mock.cpp",
2227    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/ledger_mock.cpp",
2228    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/heartbeat_new_mock.cpp",
2229    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/softbus_broadcast_mgr_mock.cpp",
2230    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
2231    "$dsoftbus_root_path/core/authentication/src/auth_tcp_connection.c",
2232    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl.c",
2233    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_fsm.c",
2234    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_medium_mgr.c",
2235    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_strategy.c",
2236    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils.c",
2237    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c",
2238    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
2239    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2240    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_common_utils.c",
2241    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_connection_addr_utils.c",
2242    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
2243    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/mock/auth_mock.cpp",
2244    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
2245    "$dsoftbus_root_path/core/transmission/trans_channel/manager/src/trans_channel_manager.c",
2246    "$dsoftbus_root_path/core/transmission/trans_channel/proxy/src/softbus_proxychannel_manager.c",
2247    "$dsoftbus_root_path/core/transmission/trans_channel/auth/src/trans_auth_manager.c",
2248    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/heartbeat/lnn_heartbeat_test.cpp",
2249  ]
2250
2251  include_dirs = [
2252    "$dsoftbus_dfx_path/interface/include/form",
2253    "$dsoftbus_dfx_path/interface/include/legacy",
2254    "$dsoftbus_root_path/adapter/common/bus_center/include",
2255    "$dsoftbus_root_path/adapter/common/include",
2256    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
2257    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2258    "$dsoftbus_root_path/core/adapter/bus_center/include",
2259    "$dsoftbus_root_path/core/adapter/transmission/include",
2260    "$dsoftbus_root_path/core/authentication/include",
2261    "$dsoftbus_root_path/core/authentication/interface",
2262    "$dsoftbus_root_path/core/broadcast/common/include",
2263    "$dsoftbus_root_path/core/broadcast/scheduler/interface",
2264    "$dsoftbus_root_path/core/bus_center/interface",
2265    "$dsoftbus_root_path/core/bus_center/ipc/include",
2266    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2267    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2268    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2269    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2270    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src",
2271    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2272    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_qos/include",
2273    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2274    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2275    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2276    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2277    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
2278    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2279    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2280    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src",
2281    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2282    "$dsoftbus_root_path/core/bus_center/monitor/include",
2283    "$dsoftbus_root_path/core/bus_center/service/include",
2284    "$dsoftbus_root_path/core/bus_center/service/src",
2285    "$dsoftbus_root_path/core/bus_center/utils/include",
2286    "$dsoftbus_root_path/core/bus_center/utils/src",
2287    "$dsoftbus_root_path/core/common/include",
2288    "$dsoftbus_root_path/core/common/security/permission/include",
2289    "$dsoftbus_root_path/core/connection/ble/include",
2290    "$dsoftbus_root_path/core/connection/p2p/common/include",
2291    "$dsoftbus_root_path/core/connection/p2p/interface",
2292    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2293    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include",
2294    "$dsoftbus_root_path/core/discovery/interface",
2295    "$dsoftbus_root_path/core/discovery/manager/include",
2296    "$dsoftbus_root_path/core/transmission/session/include",
2297    "$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
2298    "$dsoftbus_root_path/core/transmission/trans_channel/common/include",
2299    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
2300    "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface",
2301    "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
2302    "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
2303    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2304    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2305    "$dsoftbus_root_path/interfaces/kits/bus_center",
2306    "$dsoftbus_root_path/interfaces/kits/common",
2307    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock",
2308    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/mock",
2309    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2310  ]
2311
2312  external_deps = [
2313    "cJSON:cjson",
2314    "c_utils:utils",
2315    "device_auth:deviceauth_sdk",
2316  ]
2317
2318  deps = [
2319    "$dsoftbus_dfx_path:softbus_dfx",
2320    "$dsoftbus_root_path/adapter:softbus_adapter",
2321    "$dsoftbus_root_path/core/common:softbus_utils",
2322    "$dsoftbus_root_path/core/frame:softbus_server",
2323    "$dsoftbus_root_path/core/connection/wifi_direct_cpp:wifi_direct",
2324  ]
2325
2326  external_deps += [
2327    "googletest:gmock",
2328    "googletest:gtest_main",
2329    "hilog:libhilog",
2330    "bluetooth:btframework",
2331  ]
2332}
2333
2334ohos_unittest("LNNHeartBeatDeviceRootTest")
2335{
2336  module_out_path = module_output_path
2337  sources = [
2338    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/heartbeat/lnn_heartbeat_device_root_test.cpp",
2339    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock/lnn_heartbeat_device_root_mock.cpp",
2340  ]
2341
2342  include_dirs = [
2343    "$dsoftbus_dfx_path/interface/include/form",
2344    "$dsoftbus_dfx_path/interface/include/legacy",
2345    "$dsoftbus_root_path/adapter/common/bus_center/include",
2346    "$dsoftbus_root_path/adapter/common/include",
2347    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
2348    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2349    "$dsoftbus_root_path/core/adapter/bus_center/include",
2350    "$dsoftbus_root_path/core/adapter/transmission/include",
2351    "$dsoftbus_root_path/core/authentication/include",
2352    "$dsoftbus_root_path/core/authentication/interface",
2353    "$dsoftbus_root_path/core/broadcast/common/include",
2354    "$dsoftbus_root_path/core/broadcast/scheduler/interface",
2355    "$dsoftbus_root_path/core/bus_center/interface",
2356    "$dsoftbus_root_path/core/bus_center/ipc/include",
2357    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2358    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2359    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2360    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2361    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src",
2362    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2363    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_qos/include",
2364    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2365    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2366    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2367    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2368    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
2369    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2370    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2371    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src",
2372    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2373    "$dsoftbus_root_path/core/bus_center/monitor/include",
2374    "$dsoftbus_root_path/core/bus_center/service/include",
2375    "$dsoftbus_root_path/core/bus_center/service/src",
2376    "$dsoftbus_root_path/core/bus_center/utils/include",
2377    "$dsoftbus_root_path/core/bus_center/utils/src",
2378    "$dsoftbus_root_path/core/common/include",
2379    "$dsoftbus_root_path/core/common/security/permission/include",
2380    "$dsoftbus_root_path/core/connection/ble/include",
2381    "$dsoftbus_root_path/core/connection/p2p/common/include",
2382    "$dsoftbus_root_path/core/connection/p2p/interface",
2383    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2384    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include",
2385    "$dsoftbus_root_path/core/discovery/interface",
2386    "$dsoftbus_root_path/core/discovery/manager/include",
2387    "$dsoftbus_root_path/core/transmission/session/include",
2388    "$dsoftbus_root_path/core/transmission/trans_channel/auth/include",
2389    "$dsoftbus_root_path/core/transmission/trans_channel/common/include",
2390    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
2391    "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface",
2392    "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
2393    "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
2394    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2395    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2396    "$dsoftbus_root_path/interfaces/kits/bus_center",
2397    "$dsoftbus_root_path/interfaces/kits/common",
2398    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/mock",
2399    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/mock",
2400    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2401  ]
2402
2403  external_deps = [
2404    "cJSON:cjson",
2405    "c_utils:utils",
2406    "device_auth:deviceauth_sdk",
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    "$dsoftbus_root_path/core/connection/wifi_direct_cpp:wifi_direct",
2415  ]
2416
2417  external_deps += [
2418    "googletest:gmock",
2419    "googletest:gtest_main",
2420    "hilog:libhilog",
2421    "bluetooth:btframework",
2422  ]
2423}
2424
2425ohos_unittest("LNNLaneQueryTest") {
2426  module_out_path = module_output_path
2427  sources = [
2428    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
2429    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
2430    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
2431    "lane/src/lnn_lane_query_deps_mock.cpp",
2432    "lane/src/lnn_lane_query_test.cpp",
2433  ]
2434
2435  include_dirs = [
2436    "$dsoftbus_dfx_path/interface/include",
2437    "$dsoftbus_dfx_path/interface/include/form",
2438    "$dsoftbus_dfx_path/interface/include/legacy",
2439    "$dsoftbus_root_path/adapter/common/bus_center/include/",
2440    "$dsoftbus_root_path/adapter/common/include",
2441    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2442    "$dsoftbus_root_path/core/adapter/bus_center/include",
2443    "$dsoftbus_root_path/core/authentication/include",
2444    "$dsoftbus_root_path/core/authentication/interface",
2445    "$dsoftbus_root_path/core/bus_center/interface",
2446    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2447    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
2448    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2449    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2450    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2451    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2452    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2453    "$dsoftbus_root_path/core/bus_center/service/include",
2454    "$dsoftbus_root_path/core/bus_center/utils/include",
2455    "$dsoftbus_root_path/core/common/include",
2456    "$dsoftbus_root_path/core/connection/interface",
2457    "$dsoftbus_root_path/core/connection/p2p/common/include",
2458    "$dsoftbus_root_path/core/connection/p2p/interface",
2459    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2460    "$dsoftbus_root_path/core/discovery/interface",
2461    "$dsoftbus_root_path/core/discovery/manager/include",
2462    "$dsoftbus_root_path/core/frame/common/include",
2463    "$dsoftbus_root_path/core/frame/init/init/include",
2464    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2465    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2466    "$dsoftbus_root_path/interfaces/kits/adapter",
2467    "$dsoftbus_root_path/interfaces/kits/authentication",
2468    "$dsoftbus_root_path/interfaces/kits/bus_center",
2469    "$dsoftbus_root_path/interfaces/kits/connect",
2470    "$dsoftbus_root_path/interfaces/kits/disc",
2471    "$dsoftbus_root_path/interfaces/kits/lnn",
2472    "$dsoftbus_root_path/interfaces/kits/transport",
2473    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
2474    "unittest/common/",
2475  ]
2476
2477  deps = [
2478    "$dsoftbus_dfx_path:softbus_dfx",
2479    "$dsoftbus_root_path/adapter:softbus_adapter",
2480    "$dsoftbus_root_path/core/common:softbus_utils",
2481  ]
2482
2483  if (is_standard_system) {
2484    external_deps = [
2485      "cJSON:cjson",
2486      "c_utils:utils",
2487      "device_auth:deviceauth_sdk",
2488      "googletest:gmock",
2489      "googletest:gtest_main",
2490      "hilog:libhilog",
2491    ]
2492  } else {
2493    external_deps = [
2494      "cJSON:cjson",
2495      "c_utils:utils",
2496      "googletest:gtest_main",
2497      "hilog:libhilog",
2498    ]
2499  }
2500}
2501
2502ohos_unittest("LNNLaneLinkTest") {
2503  module_out_path = module_output_path
2504  sources = [
2505    "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c",
2506    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
2507    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
2508    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c",
2509    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
2510    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
2511    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
2512    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2513    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
2514    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
2515    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
2516    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
2517    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_test.cpp",
2518    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
2519  ]
2520
2521  if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature) {
2522    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ]
2523  } else {
2524    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ]
2525  }
2526
2527  include_dirs = [
2528    "$dsoftbus_dfx_path/interface/include",
2529    "$dsoftbus_dfx_path/interface/include/form",
2530    "$dsoftbus_dfx_path/interface/include/legacy",
2531    "$dsoftbus_root_path/adapter/common/include",
2532    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2533    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2534    "$dsoftbus_root_path/core/adapter/bus_center/include",
2535    "$dsoftbus_root_path/core/authentication/include",
2536    "$dsoftbus_root_path/core/authentication/interface",
2537    "$dsoftbus_root_path/core/bus_center/interface",
2538    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2539    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2540    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2541    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2542    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2543    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2544    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2545    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2546    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2547    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2548    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2549    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2550    "$dsoftbus_root_path/core/bus_center/monitor/include",
2551    "$dsoftbus_root_path/core/bus_center/service/include",
2552    "$dsoftbus_root_path/core/bus_center/utils/include",
2553    "$dsoftbus_root_path/core/common/include",
2554    "$dsoftbus_root_path/core/connection/ble/include",
2555    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2556    "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils",
2557    "$dsoftbus_root_path/core/discovery/interface",
2558    "$dsoftbus_root_path/core/discovery/manager/include",
2559    "$dsoftbus_root_path/core/frame/init/include",
2560    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2561    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2562    "$dsoftbus_root_path/interfaces/kits/adapter",
2563    "$dsoftbus_root_path/interfaces/kits/authentication",
2564    "$dsoftbus_root_path/interfaces/kits/bus_center",
2565    "$dsoftbus_root_path/interfaces/kits/common",
2566    "$dsoftbus_root_path/interfaces/kits/connect",
2567    "$dsoftbus_root_path/interfaces/kits/disc",
2568    "$dsoftbus_root_path/interfaces/kits/discovery",
2569    "$dsoftbus_root_path/interfaces/kits/lnn",
2570    "$dsoftbus_root_path/interfaces/kits/transport",
2571    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
2572    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2573  ]
2574
2575  deps = [
2576    "$dsoftbus_dfx_path:softbus_dfx",
2577    "$dsoftbus_root_path/adapter:softbus_adapter",
2578    "$dsoftbus_root_path/core/common:softbus_utils",
2579    "$dsoftbus_root_path/core/frame:softbus_server",
2580  ]
2581
2582  if (is_standard_system) {
2583    external_deps = [
2584      "c_utils:utils",
2585      "device_auth:deviceauth_sdk",
2586      "googletest:gmock",
2587      "googletest:gtest_main",
2588      "hilog:libhilog",
2589    ]
2590  } else {
2591    external_deps = [
2592      "c_utils:utils",
2593      "googletest:gmock",
2594      "googletest:gtest_main",
2595      "hilog:libhilog",
2596    ]
2597  }
2598}
2599
2600ohos_unittest("LNNLaneLinkP2pTest") {
2601  module_out_path = module_output_path
2602  sources = [
2603    "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c",
2604    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
2605    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
2606    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
2607    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
2608    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
2609    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2610    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
2611    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
2612    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
2613    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
2614    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_p2p_test.cpp",
2615  ]
2616
2617  include_dirs = [
2618    "$dsoftbus_dfx_path/interface/include",
2619    "$dsoftbus_dfx_path/interface/include/form",
2620    "$dsoftbus_dfx_path/interface/include/legacy",
2621    "$dsoftbus_root_path/adapter/common/include",
2622    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2623    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2624    "$dsoftbus_root_path/core/adapter/bus_center/include",
2625    "$dsoftbus_root_path/core/authentication/include",
2626    "$dsoftbus_root_path/core/authentication/interface",
2627    "$dsoftbus_root_path/core/bus_center/interface",
2628    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2629    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2630    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2631    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2632    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2633    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
2634    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2635    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2636    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2637    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2638    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2639    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2640    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2641    "$dsoftbus_root_path/core/bus_center/monitor/include",
2642    "$dsoftbus_root_path/core/bus_center/service/include",
2643    "$dsoftbus_root_path/core/bus_center/utils/include",
2644    "$dsoftbus_root_path/core/common/include",
2645    "$dsoftbus_root_path/core/connection/ble/include",
2646    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2647    "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils",
2648    "$dsoftbus_root_path/core/discovery/interface",
2649    "$dsoftbus_root_path/core/discovery/manager/include",
2650    "$dsoftbus_root_path/core/frame/init/include",
2651    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2652    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2653    "$dsoftbus_root_path/interfaces/kits/adapter",
2654    "$dsoftbus_root_path/interfaces/kits/authentication",
2655    "$dsoftbus_root_path/interfaces/kits/bus_center",
2656    "$dsoftbus_root_path/interfaces/kits/common",
2657    "$dsoftbus_root_path/interfaces/kits/connect",
2658    "$dsoftbus_root_path/interfaces/kits/disc",
2659    "$dsoftbus_root_path/interfaces/kits/discovery",
2660    "$dsoftbus_root_path/interfaces/kits/lnn",
2661    "$dsoftbus_root_path/interfaces/kits/transport",
2662    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
2663    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2664  ]
2665
2666  deps = [
2667    "$dsoftbus_dfx_path:softbus_dfx",
2668    "$dsoftbus_root_path/adapter:softbus_adapter",
2669    "$dsoftbus_root_path/core/common:softbus_utils",
2670    "$dsoftbus_root_path/core/frame:softbus_server",
2671  ]
2672
2673  if (is_standard_system) {
2674    external_deps = [
2675      "c_utils:utils",
2676      "device_auth:deviceauth_sdk",
2677      "googletest:gmock",
2678      "hilog:libhilog",
2679    ]
2680  } else {
2681    external_deps = [
2682      "c_utils:utils",
2683      "googletest:gmock",
2684      "hilog:libhilog",
2685    ]
2686  }
2687}
2688
2689ohos_unittest("LNNLaneLinkExtTest") {
2690  module_out_path = module_output_path
2691  sources = [
2692    "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c",
2693    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
2694    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
2695    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
2696    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
2697    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
2698    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
2699    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2700    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
2701    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
2702    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_net_capability_mock.cpp",
2703    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
2704    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_ext_test.cpp",
2705    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
2706  ]
2707
2708  if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature) {
2709    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ]
2710  } else {
2711    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ]
2712  }
2713
2714  include_dirs = [
2715    "$dsoftbus_dfx_path/interface/include",
2716    "$dsoftbus_dfx_path/interface/include/form",
2717    "$dsoftbus_dfx_path/interface/include/legacy",
2718    "$dsoftbus_root_path/adapter/common/include",
2719    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2720    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2721    "$dsoftbus_root_path/core/adapter/bus_center/include",
2722    "$dsoftbus_root_path/core/authentication/include",
2723    "$dsoftbus_root_path/core/authentication/interface",
2724    "$dsoftbus_root_path/core/bus_center/interface",
2725    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2726    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2727    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2728    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2729    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2730    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2731    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2732    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2733    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2734    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2735    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2736    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2737    "$dsoftbus_root_path/core/bus_center/monitor/include",
2738    "$dsoftbus_root_path/core/bus_center/service/include",
2739    "$dsoftbus_root_path/core/bus_center/utils/include",
2740    "$dsoftbus_root_path/core/common/include",
2741    "$dsoftbus_root_path/core/connection/ble/include",
2742    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2743    "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils",
2744    "$dsoftbus_root_path/core/discovery/interface",
2745    "$dsoftbus_root_path/core/discovery/manager/include",
2746    "$dsoftbus_root_path/core/frame/init/include",
2747    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2748    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2749    "$dsoftbus_root_path/interfaces/kits/adapter",
2750    "$dsoftbus_root_path/interfaces/kits/authentication",
2751    "$dsoftbus_root_path/interfaces/kits/bus_center",
2752    "$dsoftbus_root_path/interfaces/kits/common",
2753    "$dsoftbus_root_path/interfaces/kits/connect",
2754    "$dsoftbus_root_path/interfaces/kits/disc",
2755    "$dsoftbus_root_path/interfaces/kits/discovery",
2756    "$dsoftbus_root_path/interfaces/kits/lnn",
2757    "$dsoftbus_root_path/interfaces/kits/transport",
2758    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
2759    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2760  ]
2761
2762  deps = [
2763    "$dsoftbus_dfx_path:softbus_dfx",
2764    "$dsoftbus_root_path/adapter:softbus_adapter",
2765    "$dsoftbus_root_path/core/common:softbus_utils",
2766    "$dsoftbus_root_path/core/frame:softbus_server",
2767  ]
2768
2769  if (is_standard_system) {
2770    external_deps = [
2771      "c_utils:utils",
2772      "device_auth:deviceauth_sdk",
2773      "googletest:gmock",
2774      "googletest:gtest_main",
2775      "hilog:libhilog",
2776    ]
2777  } else {
2778    external_deps = [
2779      "c_utils:utils",
2780      "googletest:gmock",
2781      "googletest:gtest_main",
2782      "hilog:libhilog",
2783    ]
2784  }
2785}
2786
2787ohos_unittest("LNNLaneHubTest") {
2788  module_out_path = module_output_path
2789  sources = [
2790    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/src/lnn_lane_hub.c",
2791    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_lane_hub_deps_mock.cpp",
2792    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_hub/lnn_lane_hub_test.cpp",
2793    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
2794    "$dsoftbus_root_path/tests/core/frame/common/src/softbus_init_common.c",
2795  ]
2796
2797  include_dirs = [
2798    "$dsoftbus_dfx_path/interface/include/form",
2799    "$dsoftbus_root_path/core/bus_center/interface",
2800    "$dsoftbus_root_path/core/bus_center/lnn/lane/lane_hub/",
2801    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2802    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2803    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2804    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_qos/include",
2805    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include",
2806    "$dsoftbus_root_path/core/bus_center/service/include",
2807    "$dsoftbus_root_path/core/frame/common/include",
2808    "$dsoftbus_root_path/core/frame/init/include",
2809    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2810    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2811    "$dsoftbus_root_path/interfaces/kits/bus_center",
2812    "$dsoftbus_root_path/interfaces/kits/lnn",
2813    "$dsoftbus_root_path/tests/interfaces/enhance",
2814    "lane/include",
2815  ]
2816
2817  deps = [
2818    "$dsoftbus_dfx_path:softbus_dfx",
2819    "$dsoftbus_root_path/adapter:softbus_adapter",
2820    "$dsoftbus_root_path/core/common:softbus_utils",
2821  ]
2822
2823  external_deps = [
2824    "googletest:gmock_main",
2825    "googletest:gtest_main",
2826    "hilog:libhilog",
2827  ]
2828
2829  if (is_standard_system) {
2830    external_deps += [
2831      "c_utils:utils",
2832      "device_auth:deviceauth_sdk",
2833    ]
2834  }
2835}
2836
2837ohos_unittest("LNNTransLaneMockTest") {
2838  module_out_path = module_output_path
2839  sources = [
2840    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_utils_virtual.c",
2841    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
2842    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
2843    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_reliability.c",
2844    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_free_lane.c",
2845    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c",
2846    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2847    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
2848    "lane/src/lnn_lane_deps_mock.cpp",
2849    "lane/src/lnn_wifi_adpter_mock.cpp",
2850    "lane/trans_lane/lnn_trans_lane_deps_mock.cpp",
2851    "lane/trans_lane/lnn_trans_lane_test.cpp",
2852  ]
2853
2854  include_dirs = [
2855    "$dsoftbus_dfx_path/interface/include",
2856    "$dsoftbus_dfx_path/interface/include/form",
2857    "$dsoftbus_dfx_path/interface/include/legacy",
2858    "$dsoftbus_root_path/adapter/common/bus_center/include/",
2859    "$dsoftbus_root_path/adapter/common/include",
2860    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2861    "$dsoftbus_root_path/adapter/common/net/hdi/include",
2862    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2863    "$dsoftbus_root_path/core/adapter/bus_center/include",
2864    "$dsoftbus_root_path/core/authentication/include",
2865    "$dsoftbus_root_path/core/authentication/interface",
2866    "$dsoftbus_root_path/core/bus_center/interface",
2867    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2868    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2869    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2870    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2871    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2872    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
2873    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2874    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2875    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2876    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2877    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2878    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2879    "$dsoftbus_root_path/core/bus_center/monitor/include",
2880    "$dsoftbus_root_path/core/bus_center/service/include",
2881    "$dsoftbus_root_path/core/bus_center/utils/include",
2882    "$dsoftbus_root_path/core/common/include",
2883    "$dsoftbus_root_path/core/connection/ble/include",
2884    "$dsoftbus_root_path/core/connection/interface",
2885    "$dsoftbus_root_path/core/connection/p2p/common/include",
2886    "$dsoftbus_root_path/core/connection/p2p/interface",
2887    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2888    "$dsoftbus_root_path/core/discovery/interface",
2889    "$dsoftbus_root_path/core/discovery/manager/include",
2890    "$dsoftbus_root_path/core/frame/init/include",
2891    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2892    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2893    "$dsoftbus_root_path/interfaces/kits/adapter",
2894    "$dsoftbus_root_path/interfaces/kits/authentication",
2895    "$dsoftbus_root_path/interfaces/kits/bus_center",
2896    "$dsoftbus_root_path/interfaces/kits/common",
2897    "$dsoftbus_root_path/interfaces/kits/connect",
2898    "$dsoftbus_root_path/interfaces/kits/disc",
2899    "$dsoftbus_root_path/interfaces/kits/discovery",
2900    "$dsoftbus_root_path/interfaces/kits/lnn",
2901    "$dsoftbus_root_path/interfaces/kits/transport",
2902    "lane/include",
2903    "lane/trans_lane",
2904    "unittest/common/",
2905  ]
2906
2907  deps = [
2908    "$dsoftbus_dfx_path:softbus_dfx",
2909    "$dsoftbus_root_path/adapter:softbus_adapter",
2910    "$dsoftbus_root_path/core/common:softbus_utils",
2911  ]
2912
2913  if (is_standard_system) {
2914    external_deps = [
2915      "cJSON:cjson",
2916      "c_utils:utils",
2917      "device_auth:deviceauth_sdk",
2918      "googletest:gmock",
2919      "googletest:gtest_main",
2920      "hilog:libhilog",
2921    ]
2922    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
2923      external_deps += [ "wifi:wifi_sdk" ]
2924    }
2925  } else {
2926    external_deps = [
2927      "cJSON:cjson",
2928      "c_utils:utils",
2929      "googletest:gmock",
2930      "googletest:gtest_main",
2931      "hilog:libhilog",
2932      "wifi:wifi_sdk",
2933    ]
2934  }
2935}
2936
2937ohos_unittest("LNNDiscoveryInterfaceTest") {
2938  module_out_path = module_output_path
2939  sources = [
2940    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
2941    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
2942    "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c",
2943    "$dsoftbus_root_path/core/authentication/src/auth_interface.c",
2944    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src/lnn_discovery_interface.c",
2945    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
2946    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_file_utils.c",
2947    "$dsoftbus_root_path/tests/core/authentication/unittest/auth_common_mock.cpp",
2948    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp",
2949    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/bus_center_mock.cpp",
2950    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
2951    "$dsoftbus_root_path/core/frame/init/src/g_enhance_auth_func.c",
2952    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
2953    "disc_mgr/disc_manager_mock.cpp",
2954    "disc_mgr/lnn_discovery_interface_test.cpp",
2955    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
2956  ]
2957
2958  include_dirs = [
2959    "$dsoftbus_dfx_path/interface/include",
2960    "$dsoftbus_dfx_path/interface/include/form",
2961    "$dsoftbus_dfx_path/interface/include/legacy",
2962    "$dsoftbus_root_path/adapter/common/include",
2963    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
2964    "$dsoftbus_root_path/core/adapter/bus_center/include",
2965    "$dsoftbus_root_path/core/authentication/include",
2966    "$dsoftbus_root_path/core/authentication/interface",
2967    "$dsoftbus_root_path/core/bus_center/interface",
2968    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2969    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src",
2970    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2971    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
2972    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2973    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2974    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2975    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2976    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2977    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
2978    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2979    "$dsoftbus_root_path/core/bus_center/monitor/include",
2980    "$dsoftbus_root_path/core/bus_center/service/include",
2981    "$dsoftbus_root_path/core/bus_center/utils/include",
2982    "$dsoftbus_root_path/core/common/include",
2983    "$dsoftbus_root_path/core/connection/interface",
2984    "$dsoftbus_root_path/core/discovery/interface",
2985    "$dsoftbus_root_path/core/discovery/manager/include",
2986    "$dsoftbus_root_path/core/frame/common/include",
2987    "$dsoftbus_root_path/core/frame/init/include",
2988    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2989    "$dsoftbus_root_path/interfaces/inner_kits/transport",
2990    "$dsoftbus_root_path/interfaces/kits/adapter",
2991    "$dsoftbus_root_path/interfaces/kits/authentication",
2992    "$dsoftbus_root_path/interfaces/kits/bus_center",
2993    "$dsoftbus_root_path/interfaces/kits/common",
2994    "$dsoftbus_root_path/interfaces/kits/connect",
2995    "$dsoftbus_root_path/interfaces/kits/disc",
2996    "$dsoftbus_root_path/interfaces/kits/discovery",
2997    "$dsoftbus_root_path/interfaces/kits/lnn",
2998    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2999    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock",
3000    "disc_mgr",
3001  ]
3002
3003  deps = [
3004    "$dsoftbus_dfx_path:softbus_dfx",
3005    "$dsoftbus_root_path/adapter:softbus_adapter",
3006    "$dsoftbus_root_path/core/common:softbus_utils",
3007  ]
3008
3009  if (is_standard_system) {
3010    external_deps = [
3011      "bounds_checking_function:libsec_shared",
3012      "c_utils:utils",
3013      "device_auth:deviceauth_sdk",
3014      "googletest:gmock",
3015      "googletest:gtest_main",
3016      "hilog:libhilog",
3017      "huks:libhukssdk",
3018    ]
3019  } else {
3020    external_deps = [
3021      "bounds_checking_function:libsec_shared",
3022      "c_utils:utils",
3023      "device_auth:deviceauth_sdk",
3024      "googletest:gmock",
3025      "googletest:gtest_main",
3026      "hilog:libhilog",
3027      "huks:libhukssdk",
3028    ]
3029  }
3030}
3031
3032ohos_unittest("LNNLaneListenerTest") {
3033  module_out_path = module_output_path
3034  sources = [
3035    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
3036    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
3037    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
3038    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_net_capability_mock.cpp",
3039    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_listener/lnn_lane_listener_deps_mock.cpp",
3040    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_listener/lnn_lane_listener_test.cpp",
3041    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3042    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
3043    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
3044  ]
3045
3046  include_dirs = [
3047    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
3048    "$dsoftbus_root_path/core/adapter/bus_center/include",
3049    "$dsoftbus_root_path/core/authentication/include",
3050    "$dsoftbus_root_path/core/authentication/interface",
3051    "$dsoftbus_root_path/core/bus_center/interface",
3052    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
3053    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3054    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
3055    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3056    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3057    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
3058    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
3059    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3060    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3061    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3062    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3063    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3064    "$dsoftbus_root_path/core/bus_center/monitor/include",
3065    "$dsoftbus_root_path/core/bus_center/service/include",
3066    "$dsoftbus_root_path/core/bus_center/utils/include",
3067    "$dsoftbus_root_path/core/connection/ble/include",
3068    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
3069    "$dsoftbus_root_path/core/discovery/interface",
3070    "$dsoftbus_root_path/core/discovery/manager/include",
3071    "$dsoftbus_root_path/core/frame/common/include",
3072    "$dsoftbus_root_path/core/frame/init/include",
3073    "$dsoftbus_root_path/dfx/interface/include/form",
3074    "$dsoftbus_root_path/dfx/interface/include/legacy",
3075    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3076    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3077    "$dsoftbus_root_path/interfaces/kits/adapter",
3078    "$dsoftbus_root_path/interfaces/kits/authentication",
3079    "$dsoftbus_root_path/interfaces/kits/bus_center",
3080    "$dsoftbus_root_path/interfaces/kits/connect",
3081    "$dsoftbus_root_path/interfaces/kits/disc",
3082    "$dsoftbus_root_path/interfaces/kits/discovery",
3083    "$dsoftbus_root_path/interfaces/kits/lnn",
3084    "$dsoftbus_root_path/interfaces/kits/transport",
3085    "lane/include",
3086  ]
3087
3088  deps = [
3089    "$dsoftbus_dfx_path:softbus_dfx",
3090    "$dsoftbus_root_path/adapter:softbus_adapter",
3091    "$dsoftbus_root_path/core/common:softbus_utils",
3092  ]
3093
3094  if (is_standard_system) {
3095    external_deps = [
3096      "c_utils:utils",
3097      "device_auth:deviceauth_sdk",
3098      "googletest:gmock",
3099      "googletest:gtest_main",
3100      "hilog:libhilog",
3101    ]
3102  } else {
3103    external_deps = [
3104      "c_utils:utils",
3105      "googletest:gmock",
3106      "googletest:gtest_main",
3107      "hilog:libhilog",
3108    ]
3109  }
3110}
3111
3112if (!defined(ohos_lite)) {
3113  ohos_unittest("LNNDbMockTest") {
3114    module_out_path = module_output_path
3115    sources = [
3116      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
3117      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp",
3118      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl.c",
3119      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_fsm.c",
3120      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_strategy.c",
3121      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src/lnn_decision_db.c",
3122      "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
3123      "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
3124      "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c",
3125      "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3126      "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
3127      "net_ledger/lnn_decision_db_deps_mock.cpp",
3128      "net_ledger/lnn_decision_db_test.cpp",
3129      "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
3130    ]
3131
3132    include_dirs = [
3133      "$dsoftbus_dfx_path/interface/include/form",
3134      "$dsoftbus_dfx_path/interface/include/legacy",
3135      "$dsoftbus_root_path/adapter/common/bus_center/include/",
3136      "$dsoftbus_root_path/adapter/common/include",
3137      "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
3138      "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
3139      "$dsoftbus_root_path/core/adapter/bus_center/include",
3140      "$dsoftbus_root_path/core/authentication/include",
3141      "$dsoftbus_root_path/core/authentication/interface",
3142      "$dsoftbus_root_path/core/bus_center/interface",
3143      "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3144      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3145      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3146      "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3147      "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
3148      "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3149      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3150      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
3151      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3152      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3153      "$dsoftbus_root_path/core/bus_center/monitor/include",
3154      "$dsoftbus_root_path/core/bus_center/service/include",
3155      "$dsoftbus_root_path/core/bus_center/utils/include",
3156      "$dsoftbus_root_path/core/common/include",
3157      "$dsoftbus_root_path/core/connection/ble/include",
3158      "$dsoftbus_root_path/core/connection/interface",
3159      "$dsoftbus_root_path/core/connection/manager",
3160      "$dsoftbus_root_path/core/connection/p2p/common/include",
3161      "$dsoftbus_root_path/core/connection/p2p/interface",
3162      "$dsoftbus_root_path/core/discovery/interface",
3163      "$dsoftbus_root_path/core/discovery/manager/include",
3164      "$dsoftbus_root_path/core/frame/common/include",
3165      "$dsoftbus_root_path/core/frame/init/include",
3166      "$dsoftbus_root_path/dsoftbus_enhance/adapter/common/mlps/interface",
3167      "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3168      "$dsoftbus_root_path/interfaces/inner_kits/transport",
3169      "$dsoftbus_root_path/interfaces/kits/adapter",
3170      "$dsoftbus_root_path/interfaces/kits/authentication",
3171      "$dsoftbus_root_path/interfaces/kits/bus_center",
3172      "$dsoftbus_root_path/interfaces/kits/common",
3173      "$dsoftbus_root_path/interfaces/kits/connect",
3174      "$dsoftbus_root_path/interfaces/kits/disc",
3175      "$dsoftbus_root_path/interfaces/kits/discovery",
3176      "$dsoftbus_root_path/interfaces/kits/lnn",
3177      "unittest/common/",
3178    ]
3179
3180    deps = [
3181      "$dsoftbus_root_path/adapter:softbus_adapter",
3182      "$dsoftbus_root_path/dfx:softbus_dfx",
3183      "$dsoftbus_root_path/core/common:softbus_utils",
3184    ]
3185
3186    if (is_standard_system) {
3187      external_deps = [
3188        "cJSON:cjson",
3189        "c_utils:utils",
3190        "device_auth:deviceauth_sdk",
3191        "googletest:gmock",
3192        "googletest:gtest_main",
3193        "hilog:libhilog",
3194      ]
3195    } else {
3196      external_deps = [
3197        "cJSON:cjson",
3198        "c_utils:utils",
3199        "googletest:gmock",
3200        "googletest:gtest_main",
3201        "hilog:libhilog",
3202      ]
3203    }
3204    external_deps += [ "huks:libhukssdk" ]
3205  }
3206}
3207
3208ohos_unittest("LNNDataCloudSyncTest") {
3209  module_out_path = module_output_path
3210  sources = [ "net_builder/src/lnn_data_cloud_sync_test.cpp" ]
3211
3212  include_dirs = [
3213    "$dsoftbus_dfx_path/interface/include",
3214    "$dsoftbus_dfx_path/interface/include/form",
3215    "$dsoftbus_root_path/adapter/common/bus_center/include/",
3216    "$dsoftbus_root_path/adapter/common/include",
3217    "$dsoftbus_root_path/core/adapter/bus_center/include",
3218    "$dsoftbus_root_path/core/authentication/interface",
3219    "$dsoftbus_root_path/core/bus_center/interface",
3220    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3221    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3222    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3223    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3224    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3225    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3226    "$dsoftbus_root_path/core/bus_center/monitor/include",
3227    "$dsoftbus_root_path/core/bus_center/service/include",
3228    "$dsoftbus_root_path/core/bus_center/utils/include",
3229    "$dsoftbus_root_path/core/common/include",
3230    "$dsoftbus_root_path/core/connection/interface",
3231    "$dsoftbus_root_path/core/connection/manager",
3232    "$dsoftbus_root_path/core/discovery/interface",
3233    "$dsoftbus_root_path/core/discovery/manager/include",
3234    "$dsoftbus_root_path/interfaces/kits/authentication",
3235    "$dsoftbus_root_path/interfaces/kits/bus_center",
3236    "$dsoftbus_root_path/interfaces/kits/common",
3237    "$dsoftbus_root_path/interfaces/kits/connect",
3238    "$dsoftbus_root_path/interfaces/kits/disc",
3239    "$dsoftbus_root_path/interfaces/kits/discovery",
3240    "$dsoftbus_root_path/interfaces/kits/lnn",
3241    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
3242    "unittest/common/",
3243  ]
3244
3245  deps = [
3246    "$dsoftbus_dfx_path:softbus_dfx",
3247    "$dsoftbus_root_path/adapter:softbus_adapter",
3248    "$dsoftbus_root_path/core/common:softbus_utils",
3249    "$dsoftbus_root_path/core/frame:softbus_server",
3250  ]
3251
3252  if (is_standard_system) {
3253    external_deps = [
3254      "cJSON:cjson",
3255      "c_utils:utils",
3256      "device_auth:deviceauth_sdk",
3257      "dsoftbus:softbus_client",
3258      "googletest:gmock",
3259      "googletest:gtest_main",
3260      "hilog:libhilog",
3261    ]
3262  } else {
3263    external_deps = [
3264      "cJSON:cjson",
3265      "c_utils:utils",
3266      "dsoftbus:softbus_client",
3267      "googletest:gmock",
3268      "googletest:gtest_main",
3269      "hilog:libhilog",
3270    ]
3271  }
3272}
3273
3274ohos_unittest("LNNDataCloudSyncMockTest") {
3275  module_out_path = module_output_path
3276  sources = [
3277    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3278    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
3279    "net_builder/src/lnn_data_cloud_sync_deps_mock.cpp",
3280    "net_builder/src/lnn_data_cloud_sync_mock_test.cpp",
3281    "net_builder/src/lnn_kv_adapter_wrapper_mock.cpp",
3282    "net_builder/src/lnn_net_ledger_mock.cpp",
3283    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
3284  ]
3285
3286  include_dirs = [
3287    "$dsoftbus_dfx_path/interface/include/form",
3288    "$dsoftbus_root_path/core/adapter/bus_center/include",
3289    "$dsoftbus_root_path/core/authentication/include",
3290    "$dsoftbus_root_path/core/authentication/interface",
3291    "$dsoftbus_root_path/core/bus_center/interface",
3292    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3293    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3294    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src",
3295    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3296    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
3297    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3298    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3299    "$dsoftbus_root_path/core/bus_center/service/include",
3300    "$dsoftbus_root_path/core/bus_center/utils/include",
3301    "$dsoftbus_root_path/core/discovery/interface",
3302    "$dsoftbus_root_path/core/discovery/manager/include",
3303    "$dsoftbus_root_path/core/frame/common/include",
3304    "$dsoftbus_root_path/core/frame/init/include",
3305    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3306    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3307    "$dsoftbus_root_path/interfaces/kits/adapter",
3308    "$dsoftbus_root_path/interfaces/kits/authentication",
3309    "$dsoftbus_root_path/interfaces/kits/bus_center",
3310    "$dsoftbus_root_path/interfaces/kits/disc",
3311    "$dsoftbus_root_path/interfaces/kits/discovery",
3312    "$dsoftbus_root_path/interfaces/kits/lnn",
3313    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
3314    "$dsoftbus_root_path/tests/interface/enhance",
3315    "unittest/common/",
3316  ]
3317
3318  deps = [
3319    "$dsoftbus_dfx_path:softbus_dfx",
3320    "$dsoftbus_root_path/adapter:softbus_adapter",
3321    "$dsoftbus_root_path/core/common:softbus_utils",
3322  ]
3323
3324  if (is_standard_system) {
3325    external_deps = [
3326      "cJSON:cjson",
3327      "c_utils:utils",
3328      "device_auth:deviceauth_sdk",
3329      "googletest:gmock",
3330      "googletest:gtest_main",
3331      "hilog:libhilog",
3332    ]
3333    cflags = [ "-Wno-error" ]
3334    cflags_cc = cflags
3335  } else {
3336    external_deps = [
3337      "cJSON:cjson",
3338      "c_utils:utils",
3339      "googletest:gmock",
3340      "googletest:gtest_main",
3341      "hilog:libhilog",
3342    ]
3343  }
3344}
3345
3346ohos_unittest("LNNLaneLinkWifiDirectTest") {
3347  module_out_path = module_output_path
3348  sources = [
3349    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
3350    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
3351    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
3352    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
3353    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
3354    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
3355    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_net_capability_mock.cpp",
3356    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
3357    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_wifi_direct_test.cpp",
3358    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_async_callback_mock.cpp",
3359    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3360    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
3361    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
3362  ]
3363
3364  if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature) {
3365    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ]
3366  } else {
3367    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ]
3368  }
3369
3370  include_dirs = [
3371    "$dsoftbus_dfx_path/interface/include",
3372    "$dsoftbus_dfx_path/interface/include/form",
3373    "$dsoftbus_dfx_path/interface/include/legacy",
3374    "$dsoftbus_root_path/adapter/common/include",
3375    "$dsoftbus_root_path/adapter/common/net/wifi/include",
3376    "$dsoftbus_root_path/core/adapter/bus_center/include",
3377    "$dsoftbus_root_path/core/authentication/include",
3378    "$dsoftbus_root_path/core/authentication/interface",
3379    "$dsoftbus_root_path/core/bus_center/interface",
3380    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
3381    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3382    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
3383    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3384    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3385    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
3386    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3387    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3388    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3389    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3390    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3391    "$dsoftbus_root_path/core/bus_center/monitor/include",
3392    "$dsoftbus_root_path/core/bus_center/service/include",
3393    "$dsoftbus_root_path/core/bus_center/utils/include",
3394    "$dsoftbus_root_path/core/common/include",
3395    "$dsoftbus_root_path/core/connection/ble/include",
3396    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
3397    "$dsoftbus_root_path/core/discovery/interface",
3398    "$dsoftbus_root_path/core/discovery/manager/include",
3399    "$dsoftbus_root_path/core/frame/common/include",
3400    "$dsoftbus_root_path/core/frame/init/include",
3401    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3402    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3403    "$dsoftbus_root_path/interfaces/kits/adapter",
3404    "$dsoftbus_root_path/interfaces/kits/authentication",
3405    "$dsoftbus_root_path/interfaces/kits/bus_center",
3406    "$dsoftbus_root_path/interfaces/kits/common",
3407    "$dsoftbus_root_path/interfaces/kits/connect",
3408    "$dsoftbus_root_path/interfaces/kits/disc",
3409    "$dsoftbus_root_path/interfaces/kits/discovery",
3410    "$dsoftbus_root_path/interfaces/kits/lnn",
3411    "$dsoftbus_root_path/interfaces/kits/transport",
3412    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
3413    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
3414  ]
3415
3416  deps = [
3417    "$dsoftbus_dfx_path:softbus_dfx",
3418    "$dsoftbus_root_path/adapter:softbus_adapter",
3419    "$dsoftbus_root_path/core/common:softbus_utils",
3420  ]
3421
3422  if (is_standard_system) {
3423    external_deps = [
3424      "c_utils:utils",
3425      "device_auth:deviceauth_sdk",
3426      "googletest:gmock",
3427      "googletest:gtest_main",
3428      "hilog:libhilog",
3429    ]
3430  } else {
3431    external_deps = [
3432      "c_utils:utils",
3433      "googletest:gmock",
3434      "googletest:gtest_main",
3435      "hilog:libhilog",
3436    ]
3437  }
3438}
3439
3440ohos_unittest("LNNLaneDfxTest") {
3441  module_out_path = module_output_path
3442  sources = [
3443    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_dfx.c",
3444    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_dfx/lnn_lane_dfx_test.cpp",
3445  ]
3446
3447  include_dirs = [
3448    "$dsoftbus_root_path/core/bus_center/interface",
3449    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3450    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3451  ]
3452
3453  deps = [
3454    "$dsoftbus_dfx_path:softbus_dfx",
3455    "$dsoftbus_root_path/adapter:softbus_adapter",
3456    "$dsoftbus_root_path/core/common:softbus_utils",
3457  ]
3458
3459  external_deps = [
3460    "googletest:gmock_main",
3461    "googletest:gtest_main",
3462    "hilog:libhilog",
3463  ]
3464
3465  if (is_standard_system) {
3466    external_deps += [
3467      "c_utils:utils",
3468      "device_auth:deviceauth_sdk",
3469    ]
3470  }
3471}
3472
3473ohos_unittest("LNNLaneLinkConflictTest") {
3474  module_out_path = module_output_path
3475  sources = [
3476    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3477    "$dsoftbus_root_path/core/frame/common/src/softbus_init_common.c",
3478    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
3479    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link_conflict/lnn_lane_link_conflict_deps_mock.cpp",
3480    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link_conflict/lnn_lane_link_conflict_test.cpp",
3481  ]
3482
3483  include_dirs = [
3484    "$dsoftbus_dfx_path/interface/include",
3485    "$dsoftbus_dfx_path/interface/include/form",
3486    "$dsoftbus_root_path/adapter/common/include",
3487    "$dsoftbus_root_path/adapter/common/net/wifi/include",
3488    "$dsoftbus_root_path/core/adapter/bus_center/include",
3489    "$dsoftbus_root_path/core/authentication/include",
3490    "$dsoftbus_root_path/core/authentication/interface",
3491    "$dsoftbus_root_path/core/bus_center/interface",
3492    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
3493    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3494    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
3495    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3496    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
3497    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
3498    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3499    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3500    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3501    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3502    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3503    "$dsoftbus_root_path/core/bus_center/monitor/include",
3504    "$dsoftbus_root_path/core/bus_center/service/include",
3505    "$dsoftbus_root_path/core/bus_center/utils/include",
3506    "$dsoftbus_root_path/core/common/include",
3507    "$dsoftbus_root_path/core/connection/ble/include",
3508    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
3509    "$dsoftbus_root_path/core/discovery/interface",
3510    "$dsoftbus_root_path/core/discovery/manager/include",
3511    "$dsoftbus_root_path/core/frame/common/include",
3512    "$dsoftbus_root_path/core/frame/init/include",
3513    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3514    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3515    "$dsoftbus_root_path/interfaces/kits/adapter",
3516    "$dsoftbus_root_path/interfaces/kits/authentication",
3517    "$dsoftbus_root_path/interfaces/kits/bus_center",
3518    "$dsoftbus_root_path/interfaces/kits/common",
3519    "$dsoftbus_root_path/interfaces/kits/connect",
3520    "$dsoftbus_root_path/interfaces/kits/disc",
3521    "$dsoftbus_root_path/interfaces/kits/discovery",
3522    "$dsoftbus_root_path/interfaces/kits/lnn",
3523    "$dsoftbus_root_path/interfaces/kits/transport",
3524  ]
3525
3526  deps = [
3527    "$dsoftbus_dfx_path:softbus_dfx",
3528    "$dsoftbus_root_path/adapter:softbus_adapter",
3529    "$dsoftbus_root_path/core/common:softbus_utils",
3530  ]
3531
3532  if (is_standard_system) {
3533    external_deps = [
3534      "c_utils:utils",
3535      "device_auth:deviceauth_sdk",
3536      "googletest:gmock",
3537      "googletest:gtest_main",
3538      "hilog:libhilog",
3539    ]
3540  } else {
3541    external_deps = [
3542      "c_utils:utils",
3543      "googletest:gmock",
3544      "googletest:gtest_main",
3545      "hilog:libhilog",
3546    ]
3547  }
3548}
3549
3550ohos_unittest("LNNPhysicalSubnetManagerTest") {
3551  module_out_path = module_output_path
3552  sources = [
3553    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src/lnn_physical_subnet_manager.c",
3554    "net_buscenter/lnn_physical_subnet_manager_test.cpp",
3555  ]
3556
3557  include_dirs = [
3558    "$dsoftbus_dfx_path/interface/include",
3559    "$dsoftbus_root_path/adapter/common/bus_center/include/",
3560    "$dsoftbus_root_path/adapter/common/include",
3561    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
3562    "$dsoftbus_root_path/core/adapter/bus_center/include",
3563    "$dsoftbus_root_path/core/authentication/include",
3564    "$dsoftbus_root_path/core/authentication/interface",
3565    "$dsoftbus_root_path/core/bus_center/interface",
3566    "$dsoftbus_root_path/core/bus_center/ipc/include",
3567    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3568    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3569    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3570    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3571    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
3572    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3573    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
3574    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3575    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3576    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3577    "$dsoftbus_root_path/core/bus_center/service/include",
3578    "$dsoftbus_root_path/core/bus_center/utils/include",
3579    "$dsoftbus_root_path/core/common/include",
3580    "$dsoftbus_root_path/core/connection/manager",
3581    "$dsoftbus_root_path/core/discovery/interface",
3582    "$dsoftbus_root_path/core/discovery/manager/include",
3583    "$dsoftbus_root_path/core/frame/common/include",
3584    "$dsoftbus_root_path/core/frame/init/include",
3585    "$dsoftbus_root_path/core/transmission/interface",
3586    "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface",
3587    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3588    "$dsoftbus_root_path/interfaces/kits/adapter",
3589    "$dsoftbus_root_path/interfaces/kits/authentication",
3590    "$dsoftbus_root_path/interfaces/kits/bus_center",
3591    "$dsoftbus_root_path/interfaces/kits/common",
3592    "$dsoftbus_root_path/interfaces/kits/connect",
3593    "$dsoftbus_root_path/interfaces/kits/disc",
3594    "$dsoftbus_root_path/interfaces/kits/discovery",
3595    "$dsoftbus_root_path/interfaces/kits/lnn",
3596    "$dsoftbus_root_path/interfaces/kits/transport",
3597    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
3598    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
3599    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
3600  ]
3601
3602  deps = [
3603    "$dsoftbus_dfx_path:softbus_dfx",
3604    "$dsoftbus_root_path/adapter:softbus_adapter",
3605    "$dsoftbus_root_path/core/common:softbus_utils",
3606  ]
3607
3608  external_deps = [
3609    "googletest:gmock_main",
3610    "googletest:gtest_main",
3611    "hilog:libhilog",
3612  ]
3613
3614  if (is_standard_system) {
3615    external_deps += [
3616      "c_utils:utils",
3617      "device_auth:deviceauth_sdk",
3618    ]
3619  }
3620}
3621
3622ohos_unittest("LNNCtrlLaneMockTest") {
3623  module_out_path = module_output_path
3624  defines += [ "DISABLE_LNNGETLOCALSTRINFO" ]
3625  sources = [
3626    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c",
3627    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
3628    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3629    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/bus_center_mock.cpp",
3630    "lane/ctrl_lane/lnn_ctrl_lane_deps_mock.cpp",
3631    "lane/ctrl_lane/lnn_ctrl_lane_test.cpp",
3632    "lane/src/lnn_lane_deps_mock.cpp",
3633  ]
3634
3635  include_dirs = [
3636    "$dsoftbus_dfx_path/interface/include",
3637    "$dsoftbus_dfx_path/interface/include/form",
3638    "$dsoftbus_dfx_path/interface/include/legacy",
3639    "$dsoftbus_root_path/adapter/common/bus_center/include/",
3640    "$dsoftbus_root_path/adapter/common/include",
3641    "$dsoftbus_root_path/adapter/common/net/hdi/include",
3642    "$dsoftbus_root_path/adapter/common/net/wifi/include",
3643    "$dsoftbus_root_path/core/adapter/bus_center/include",
3644    "$dsoftbus_root_path/core/authentication/include",
3645    "$dsoftbus_root_path/core/authentication/interface",
3646    "$dsoftbus_root_path/core/bus_center/interface",
3647    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
3648    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3649    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
3650    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3651    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3652    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
3653    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
3654    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3655    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3656    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3657    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3658    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3659    "$dsoftbus_root_path/core/bus_center/monitor/include",
3660    "$dsoftbus_root_path/core/bus_center/service/include",
3661    "$dsoftbus_root_path/core/bus_center/utils/include",
3662    "$dsoftbus_root_path/core/common/include",
3663    "$dsoftbus_root_path/core/connection/ble/include",
3664    "$dsoftbus_root_path/core/connection/interface",
3665    "$dsoftbus_root_path/core/connection/p2p/common/include",
3666    "$dsoftbus_root_path/core/connection/p2p/interface",
3667    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
3668    "$dsoftbus_root_path/core/discovery/interface",
3669    "$dsoftbus_root_path/core/discovery/manager/include",
3670    "$dsoftbus_root_path/core/frame/init/include",
3671    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3672    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3673    "$dsoftbus_root_path/interfaces/kits/bus_center",
3674    "$dsoftbus_root_path/interfaces/kits/common",
3675    "$dsoftbus_root_path/interfaces/kits/discovery",
3676    "$dsoftbus_root_path/tests/interfaces/enhance",
3677    "lane/include",
3678    "lane/trans_lane",
3679    "unittest/common/",
3680  ]
3681
3682  deps = [
3683    "$dsoftbus_dfx_path:softbus_dfx",
3684    "$dsoftbus_root_path/adapter:softbus_adapter",
3685    "$dsoftbus_root_path/core/common:softbus_utils",
3686  ]
3687
3688  if (is_standard_system) {
3689    external_deps = [
3690      "cJSON:cjson",
3691      "c_utils:utils",
3692      "device_auth:deviceauth_sdk",
3693      "googletest:gmock",
3694      "googletest:gtest_main",
3695      "hilog:libhilog",
3696      "huks:libhukssdk",
3697    ]
3698    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
3699      external_deps += [ "wifi:wifi_sdk" ]
3700    }
3701  } else {
3702    external_deps = [
3703      "cJSON:cjson",
3704      "c_utils:utils",
3705      "googletest:gmock",
3706      "googletest:gtest_main",
3707      "hilog:libhilog",
3708      "wifi:wifi_sdk",
3709    ]
3710  }
3711}
3712
3713ohos_unittest("LNNConnIdCbManagerTest") {
3714  module_out_path = module_output_path
3715  sources = [ "net_builder/src/lnn_connId_cb_manager_test.cpp" ]
3716
3717  include_dirs = [
3718    "$dsoftbus_root_path/core/adapter/bus_center/include",
3719    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3720    "$dsoftbus_root_path/core/common/include",
3721    "$dsoftbus_root_path/interfaces/kits/bus_center",
3722    "$dsoftbus_root_path/interfaces/kits/common",
3723    "$dsoftbus_root_path/interfaces/kits/discovery",
3724    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
3725    "unittest/common/",
3726  ]
3727
3728  deps = [
3729    "$dsoftbus_dfx_path:softbus_dfx",
3730    "$dsoftbus_root_path/adapter:softbus_adapter",
3731    "$dsoftbus_root_path/core/common:softbus_utils",
3732    "$dsoftbus_root_path/core/frame:softbus_server",
3733  ]
3734
3735  if (is_standard_system) {
3736    external_deps = [
3737      "cJSON:cjson",
3738      "c_utils:utils",
3739      "device_auth:deviceauth_sdk",
3740      "dsoftbus:softbus_client",
3741      "googletest:gmock",
3742      "googletest:gtest_main",
3743      "hilog:libhilog",
3744    ]
3745  } else {
3746    external_deps = [
3747      "cJSON:cjson",
3748      "c_utils:utils",
3749      "dsoftbus:softbus_client",
3750      "googletest:gmock",
3751      "googletest:gtest_main",
3752      "hilog:libhilog",
3753    ]
3754  }
3755}
3756
3757ohos_unittest("LNNNetLedgerMockTest") {
3758  module_out_path = module_output_path
3759  sources = [
3760    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
3761    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/src/lnn_data_cloud_sync_deps_mock.cpp",
3762    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger/lnn_net_ledger_mock_test.cpp",
3763    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/bus_center_mock.cpp",
3764    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func_pack.c",
3765    "$dsoftbus_root_path/core/frame/init/src/g_enhance_lnn_func.c",
3766  ]
3767
3768  include_dirs = lnn_mock_test_include_dirs
3769  include_dirs += [
3770    "$dsoftbus_dfx_path/interface/include",
3771    "$dsoftbus_dfx_path/interface/include/legacy",
3772    "$dsoftbus_root_path/adapter/common/bus_center/include/",
3773    "$dsoftbus_root_path/adapter/common/include",
3774    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
3775    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
3776    "$dsoftbus_root_path/core/adapter/bus_center/include",
3777    "$dsoftbus_root_path/core/authentication/include",
3778    "$dsoftbus_root_path/core/authentication/interface",
3779    "$dsoftbus_root_path/core/bus_center/interface",
3780    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
3781    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3782    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
3783    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3784    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
3785    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
3786    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3787    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
3788    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
3789    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3790    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src",
3791    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3792    "$dsoftbus_root_path/core/bus_center/monitor/include",
3793    "$dsoftbus_root_path/core/bus_center/service/include",
3794    "$dsoftbus_root_path/core/bus_center/utils/include",
3795    "$dsoftbus_root_path/core/common/include",
3796    "$dsoftbus_root_path/core/connection/manager",
3797    "$dsoftbus_root_path/core/discovery/interface",
3798    "$dsoftbus_root_path/core/discovery/manager/include",
3799    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3800    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3801    "$dsoftbus_root_path/interfaces/kits/bus_center",
3802    "$dsoftbus_root_path/interfaces/kits/common",
3803    "$dsoftbus_root_path/interfaces/kits/discovery",
3804    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include/",
3805    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock",
3806    "$dsoftbus_root_path/tests/interface/enhance",
3807    "unittest/common/",
3808  ]
3809
3810  deps = [
3811    "$dsoftbus_dfx_path:softbus_dfx",
3812    "$dsoftbus_root_path/adapter:softbus_adapter",
3813    "$dsoftbus_root_path/core/common:softbus_utils",
3814  ]
3815
3816  if (is_standard_system) {
3817    external_deps = [
3818      "cJSON:cjson",
3819      "c_utils:utils",
3820      "device_auth:deviceauth_sdk",
3821      "googletest:gmock",
3822      "googletest:gtest_main",
3823      "hilog:libhilog",
3824    ]
3825  } else {
3826    external_deps = [
3827      "cJSON:cjson",
3828      "c_utils:utils",
3829      "googletest:gmock",
3830      "googletest:gtest_main",
3831      "hilog:libhilog",
3832    ]
3833  }
3834  external_deps += [ "huks:libhukssdk" ]
3835}
3836
3837ohos_unittest("LNNLaneCommCapaTest") {
3838  module_out_path = module_output_path
3839  sources = [
3840    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_communication_capability.c",
3841    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_communication_capability/lnn_lane_comm_capa_deps_mock.cpp",
3842    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_communication_capability/lnn_lane_comm_capa_test.cpp",
3843  ]
3844
3845  include_dirs = [
3846    "$dsoftbus_dfx_path/interface/include/form",
3847    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
3848    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
3849    "$dsoftbus_root_path/adapter/common/net/wifi/include",
3850    "$dsoftbus_root_path/core/adapter/bus_center/include",
3851    "$dsoftbus_root_path/core/authentication/include",
3852    "$dsoftbus_root_path/core/authentication/interface",
3853    "$dsoftbus_root_path/core/bus_center/interface",
3854    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
3855    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
3856    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
3857    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3858    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
3859    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
3860    "$dsoftbus_root_path/core/bus_center/service/include",
3861    "$dsoftbus_root_path/core/bus_center/utils/include",
3862    "$dsoftbus_root_path/core/discovery/interface",
3863    "$dsoftbus_root_path/core/discovery/manager/include",
3864    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
3865    "$dsoftbus_root_path/interfaces/inner_kits/transport",
3866    "$dsoftbus_root_path/interfaces/kits/bus_center",
3867    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/ctrl_lane",
3868    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/lane_communication_capability",
3869  ]
3870
3871  deps = [
3872    "$dsoftbus_dfx_path:softbus_dfx",
3873    "$dsoftbus_root_path/adapter:softbus_adapter",
3874    "$dsoftbus_root_path/core/common:softbus_utils",
3875    "$dsoftbus_root_path/core/frame:softbus_server",
3876  ]
3877
3878  external_deps = [
3879    "cJSON:cjson",
3880    "c_utils:utils",
3881    "googletest:gmock",
3882    "hilog:libhilog",
3883  ]
3884}
3885
3886ohos_unittest("LNNFeatureCapabilityTest") {
3887  module_out_path = module_output_path
3888  sources = [ "unittest/lnn_feature_capability_test.cpp" ]
3889  include_dirs = bus_center_unittest_dirs
3890  deps = bus_center_unittest_deps
3891  external_deps = [
3892    "cJSON:cjson",
3893    "c_utils:utils",
3894    "hilog:libhilog",
3895    "ipc:ipc_single",
3896  ]
3897  if (dsoftbus_feature_deps_device_auth) {
3898    external_deps += [ "device_auth:deviceauth_sdk" ]
3899  }
3900}
3901
3902ohos_unittest("LNNFeatureCapabilityMockTest") {
3903  module_out_path = module_output_path
3904  sources = [
3905    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_feature_capability.c",
3906    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger/lnn_feature_capability_mock.cpp",
3907    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger/lnn_feature_capability_mock_test.cpp",
3908  ]
3909
3910  include_dirs = [
3911    "$dsoftbus_root_path/adapter/default_config/spec_config",
3912    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3913  ]
3914
3915  deps = [
3916    "$dsoftbus_dfx_path:softbus_dfx",
3917    "$dsoftbus_root_path/adapter:softbus_adapter",
3918    "$dsoftbus_root_path/core/common:softbus_utils",
3919    "$dsoftbus_root_path/core/frame:softbus_server",
3920  ]
3921
3922  external_deps = [
3923    "cJSON:cjson",
3924    "c_utils:utils",
3925    "googletest:gmock",
3926    "hilog:libhilog",
3927  ]
3928}
3929
3930ohos_unittest("LNNNetLedgerTest") {
3931  module_out_path = module_output_path
3932  sources = [
3933    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger/lnn_net_ledger_test.cpp",
3934    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger/lnn_net_ledger_test_mock.cpp",
3935  ]
3936
3937  include_dirs = lnn_mock_test_include_dirs
3938  include_dirs += [
3939    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
3940    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
3941    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_ledger",
3942  ]
3943
3944  deps = [
3945    "$dsoftbus_dfx_path:softbus_dfx",
3946    "$dsoftbus_root_path/adapter:softbus_adapter",
3947    "$dsoftbus_root_path/core/common:softbus_utils",
3948  ]
3949
3950  external_deps = [
3951    "cJSON:cjson",
3952    "c_utils:utils",
3953    "googletest:gmock",
3954    "hilog:libhilog",
3955  ]
3956
3957  external_deps += [ "huks:libhukssdk" ]
3958}
3959
3960group("unittest") {
3961  testonly = true
3962  deps = [
3963    ":LNNBatteryInfoTest",
3964    ":LNNBtNetworkImplMockTest",
3965    ":LNNConnIdCbManagerTest",
3966    ":LNNConnectionFsmMockTest",
3967    ":LNNConnectionFsmTest",
3968    ":LNNCtrlLaneMockTest",
3969    ":LNNDataCloudSyncMockTest",
3970    ":LNNDataCloudSyncTest",
3971    ":LNNDeviceNameInfoTest",
3972    ":LNNDiscoveryInterfaceTest",
3973    ":LNNDisctributedLedgerTest",
3974    ":LNNDistributedNetLedgerManagerTest",
3975    ":LNNFeatureCapabilityMockTest",
3976    ":LNNFeatureCapabilityTest",
3977    ":LNNHuksUtilsTest",
3978    ":LNNIpNetworkImplMockTest",
3979    ":LNNUsbNetworkImplMockTest",
3980    ":LNNLaneCommCapaTest",
3981    ":LNNLaneDfxTest",
3982    ":LNNLaneExtMockTest",
3983    ":LNNLaneLinkExtTest",
3984    ":LNNLaneLinkLedgerTest",
3985    ":LNNLaneQueryTest",
3986    ":LNNLaneSelectTest",
3987    ":LNNLedgerMockTest",
3988    ":LNNNetBuilderMockTest",
3989    ":LNNNetBuilderTest",
3990    ":LNNNetLedgerCommonTest",
3991    ":LNNNetLedgerMockTest",
3992    ":LNNNetLedgerTest",
3993    ":LNNNetworkInfoTest",
3994    ":LNNNetworkManagerMockTest",
3995    ":LNNNodeWeightTest",
3996    ":LNNP2pInfoTest",
3997    ":LNNPhysicalSubnetManagerTest",
3998    ":LNNSelectRuleTest",
3999    ":LNNSyncInfoItemTest",
4000    ":LNNSyncInfoManagerTest",
4001    ":LNNTopoManagerTest",
4002    ":LedgerLaneHubTest",
4003    ":NetBuilderTest",
4004    ":NetLedgerTest",
4005    ":LNNTimeSyncTest",
4006    ":LNNTimeSyncOtherTest",
4007    ":LNNHeartBeatTest",
4008  ]
4009  if (dsoftbus_feature_lnn_lane_mgr) {
4010    deps += [
4011      ":LNNLaneLinkConflictTest",
4012      ":LNNLaneLinkTest",
4013      ":LNNLaneLinkWifiDirectTest",
4014      ":LNNLaneListenerTest",
4015      ":LNNLaneMockTest",
4016      ":LNNTransLaneMockTest",
4017      ":LaneTest",
4018    ]
4019  }
4020}
4021
4022group("fuzztest") {
4023  testonly = true
4024  deps = [ "fuzztest:fuzztest" ]
4025}
4026