1# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/test.gni")
15import("../../../../core/bus_center/lnn/decision_center/decision_center.gni")
16import("../../../../core/common/dfx/dsoftbus_dfx.gni")
17import("../../../../dsoftbus.gni")
18
19module_output_path = "dsoftbus/LNN"
20dsoftbus_root_path = "../../../.."
21
22native_source_path = rebase_path("$dsoftbus_root_path")
23dep_dir = "dsoftbus_enhance/core/bus_center/lnn/lane_hub"
24enhanced_test = exec_script("$dsoftbus_root_path/check_sub_module.py",
25                            [
26                              "$native_source_path",
27                              "$dep_dir",
28                            ],
29                            "value")
30
31bus_center_unittest_dirs = [
32  "$dsoftbus_root_path/core/bus_center/service/include",
33  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
34  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
35  "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
36  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
37  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
38  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
39  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
40  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src",
41  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
42  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
43  "$dsoftbus_root_path/core/bus_center/monitor/include",
44  "$dsoftbus_root_path/core/common/include",
45  "$dsoftbus_root_path/core/common/dfx/interface/include",
46  "$dsoftbus_root_path/adapter/common/include",
47  "$dsoftbus_root_path/core/connection/interface",
48  "$dsoftbus_root_path/core/authentication/interface",
49  "$dsoftbus_root_path/core/bus_center/interface",
50  "$dsoftbus_root_path/core/bus_center/utils/include",
51  "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
52  "$dsoftbus_root_path/core/bus_center/ipc/standard/src",
53  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include",
54  "$dsoftbus_root_path/core/bus_center/ipc/include",
55  "$dsoftbus_root_path/interfaces/inner_kits/lnn",
56  "$dsoftbus_root_path/interfaces/kits/bus_center",
57  "$dsoftbus_root_path/interfaces/kits/common",
58  "$dsoftbus_root_path/core/adapter/bus_center/include",
59  "$dsoftbus_root_path/sdk/frame/standard/include",
60  "unittest/common/",
61  "$dsoftbus_root_path/core/connection/manager",
62  "$dsoftbus_root_path/core/frame/standard/client_manager/include",
63  "$dsoftbus_root_path/adapter/common/bus_center/include/",
64  "$dsoftbus_root_path/core/discovery/manager/include",
65  "$dsoftbus_root_path/core/discovery/interface",
66  "$dsoftbus_root_path/interfaces/kits/discovery",
67  "$dsoftbus_root_path/sdk/bus_center/manager/include",
68  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
69  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
70  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
71  "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
72  "$dsoftbus_root_path/core/authentication/include",
73  "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
74  "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
75]
76
77bus_center_unittest_deps = [
78  "$dsoftbus_root_path/adapter:softbus_adapter",
79  "$dsoftbus_root_path/core/common:softbus_utils",
80  "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
81  "$dsoftbus_root_path/core/frame:softbus_server",
82]
83
84lnn_mock_test_include_dirs = [
85  "$dsoftbus_root_path/core/authentication/include",
86  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
87  "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
88  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
89  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src",
90  "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
91  "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
92  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
93  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
94  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
95  "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
96  "$dsoftbus_root_path/core/bus_center/monitor/include",
97  "$dsoftbus_root_path/core/common/include",
98  "$dsoftbus_root_path/core/common/dfx/interface/include",
99  "$dsoftbus_root_path/adapter/common/include",
100  "$dsoftbus_root_path/core/connection/interface",
101  "$dsoftbus_root_path/core/connection/p2p/interface",
102  "$dsoftbus_root_path/core/connection/p2p/common/include",
103  "$dsoftbus_root_path/core/authentication/interface",
104  "$dsoftbus_root_path/core/bus_center/interface",
105  "$dsoftbus_root_path/core/bus_center/utils/include",
106  "$dsoftbus_root_path/interfaces/inner_kits/lnn",
107  "$dsoftbus_root_path/interfaces/kits/bus_center",
108  "$dsoftbus_root_path/interfaces/kits/common",
109  "$dsoftbus_root_path/core/adapter/bus_center/include",
110  "unittest/common/",
111  "$dsoftbus_root_path/core/connection/manager",
112  "$dsoftbus_root_path/adapter/common/bus_center/include/",
113  "$dsoftbus_root_path/core/discovery/manager/include",
114  "$dsoftbus_root_path/core/discovery/interface",
115  "$dsoftbus_root_path/interfaces/kits/discovery",
116  "$dsoftbus_root_path/core/bus_center/service/include",
117  "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
118  "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
119  "$dsoftbus_root_path/core/transmission/interface",
120  "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
121  "$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include",
122  "$dsoftbus_root_path/adapter/common/net/wifi/include",
123  "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
124  "$dsoftbus_root_path/core/bus_center/utils/include",
125  "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
126  "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
127  "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
128  "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
129]
130
131lnn_mock_test_deps = [
132  "$dsoftbus_dfx_path/log:softbus_dfx_log",
133  "$dsoftbus_root_path/adapter:softbus_adapter",
134  "$dsoftbus_root_path/core/common:softbus_utils",
135  "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
136  "$dsoftbus_root_path/core/frame:softbus_server",
137]
138
139lnn_mock_test_deps_exclude_softbus_server = [
140  "$dsoftbus_dfx_path/log:softbus_dfx_log",
141  "$dsoftbus_root_path/adapter:softbus_adapter",
142  "$dsoftbus_root_path/core/common:softbus_utils",
143  "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
144]
145
146ohos_unittest("LaneTest") {
147  module_out_path = module_output_path
148  sources = [ "unittest/lane_test.cpp" ]
149  include_dirs = bus_center_unittest_dirs
150  deps = bus_center_unittest_deps
151
152  if (is_standard_system) {
153    external_deps = [
154      "cJSON:cjson",
155      "c_utils:utils",
156      "device_auth:deviceauth_sdk",
157      "googletest:gmock",
158      "googletest:gtest_main",
159      "hilog:libhilog",
160    ]
161  } else {
162    external_deps = [
163      "cJSON:cjson",
164      "c_utils:utils",
165      "googletest:gmock",
166      "googletest:gtest_main",
167      "hilog:libhilog",
168    ]
169  }
170  external_deps += [
171    "huks:libhukssdk",
172    "ipc:ipc_core",
173  ]
174}
175
176ohos_unittest("NetLedgerTest") {
177  module_out_path = module_output_path
178  sources = [ "unittest/net_ledger_test.cpp" ]
179  include_dirs = bus_center_unittest_dirs
180  deps = bus_center_unittest_deps
181
182  if (is_standard_system) {
183    external_deps = [
184      "cJSON:cjson",
185      "c_utils:utils",
186      "device_auth:deviceauth_sdk",
187      "googletest:gmock",
188      "googletest:gtest_main",
189      "hilog:libhilog",
190    ]
191  } else {
192    external_deps = [
193      "cJSON:cjson",
194      "c_utils:utils",
195      "googletest:gmock",
196      "googletest:gtest_main",
197      "hilog:libhilog",
198    ]
199  }
200  external_deps += [
201    "huks:libhukssdk",
202    "ipc:ipc_core",
203  ]
204}
205
206ohos_unittest("NetBuilderTest") {
207  module_out_path = module_output_path
208  sources = [ "unittest/net_builder_test.cpp" ]
209  include_dirs = bus_center_unittest_dirs
210  deps = bus_center_unittest_deps
211
212  if (is_standard_system) {
213    external_deps = [
214      "cJSON:cjson",
215      "c_utils:utils",
216      "device_auth:deviceauth_sdk",
217      "googletest:gmock",
218      "googletest:gtest_main",
219      "hilog:libhilog",
220    ]
221  } else {
222    external_deps = [
223      "cJSON:cjson",
224      "c_utils:utils",
225      "googletest:gmock",
226      "googletest:gtest_main",
227      "hilog:libhilog",
228    ]
229  }
230  external_deps += [
231    "huks:libhukssdk",
232    "ipc:ipc_core",
233  ]
234}
235
236ohos_unittest("LNNHuksUtilsTest") {
237  module_out_path = module_output_path
238  sources = [ "unittest/lnn_huks_test.cpp" ]
239  include_dirs = bus_center_unittest_dirs
240  deps = bus_center_unittest_deps
241
242  if (is_standard_system) {
243    external_deps = [
244      "cJSON:cjson",
245      "c_utils:utils",
246      "device_auth:deviceauth_sdk",
247      "googletest:gmock",
248      "googletest:gtest_main",
249      "hilog:libhilog",
250    ]
251  } else {
252    external_deps = [
253      "cJSON:cjson",
254      "c_utils:utils",
255      "googletest:gmock",
256      "googletest:gtest_main",
257      "hilog:libhilog",
258    ]
259  }
260  external_deps += [
261    "huks:libhukssdk",
262    "ipc:ipc_core",
263  ]
264}
265
266ohos_unittest("LedgerLaneHubTest") {
267  module_out_path = module_output_path
268  sources = [ "unittest/ledger_lane_hub_test.cpp" ]
269  include_dirs = bus_center_unittest_dirs
270  deps = bus_center_unittest_deps
271
272  include_dirs += [
273    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
274    "$dsoftbus_root_path/interfaces/kits/common",
275  ]
276  if (is_standard_system) {
277    external_deps = [
278      "cJSON:cjson",
279      "c_utils:utils",
280      "device_auth:deviceauth_sdk",
281      "googletest:gmock",
282      "googletest:gtest_main",
283      "hilog:libhilog",
284    ]
285  } else {
286    external_deps = [
287      "cJSON:cjson",
288      "c_utils:utils",
289      "googletest:gmock",
290      "googletest:gtest_main",
291      "hilog:libhilog",
292    ]
293  }
294  external_deps += [
295    "huks:libhukssdk",
296    "ipc:ipc_core",
297  ]
298}
299
300ohos_unittest("LNNNetBuilderTest") {
301  module_out_path = module_output_path
302  sources = [ "net_builder/src/lnn_net_builder_test.cpp" ]
303
304  include_dirs = [
305    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
306    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
307    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
308    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
309    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
310    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
311    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
312    "$dsoftbus_root_path/core/bus_center/monitor/include",
313    "$dsoftbus_root_path/core/common/include",
314    "$dsoftbus_root_path/core/common/dfx/interface/include",
315    "$dsoftbus_root_path/adapter/common/include",
316    "$dsoftbus_root_path/core/connection/interface",
317    "$dsoftbus_root_path/core/authentication/interface",
318    "$dsoftbus_root_path/core/bus_center/interface",
319    "$dsoftbus_root_path/core/bus_center/utils/include",
320    "$dsoftbus_root_path/interfaces/kits/bus_center",
321    "$dsoftbus_root_path/interfaces/kits/common",
322    "$dsoftbus_root_path/interfaces/kits/discovery",
323    "$dsoftbus_root_path/core/adapter/bus_center/include",
324    "unittest/common/",
325    "$dsoftbus_root_path/core/connection/manager",
326    "$dsoftbus_root_path/adapter/common/bus_center/include/",
327    "$dsoftbus_root_path/core/discovery/manager/include",
328    "$dsoftbus_root_path/core/discovery/interface",
329    "$dsoftbus_root_path/interfaces/kits/discovery",
330    "$dsoftbus_root_path/core/bus_center/service/include",
331    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
332    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
333    "$dsoftbus_root_path/interfaces/kits/common",
334  ]
335
336  deps = [
337    "$dsoftbus_root_path/adapter:softbus_adapter",
338    "$dsoftbus_root_path/core/common:softbus_utils",
339    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
340    "$dsoftbus_root_path/core/frame:softbus_server",
341  ]
342
343  if (is_standard_system) {
344    external_deps = [
345      "cJSON:cjson",
346      "c_utils:utils",
347      "device_auth:deviceauth_sdk",
348      "googletest:gmock",
349      "googletest:gtest_main",
350      "hilog:libhilog",
351    ]
352  } else {
353    external_deps = [
354      "cJSON:cjson",
355      "c_utils:utils",
356      "googletest:gmock",
357      "googletest:gtest_main",
358      "hilog:libhilog",
359    ]
360  }
361}
362
363ohos_unittest("LNNNetBuilderMockTest") {
364  module_out_path = module_output_path
365  sources = [
366    "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c",
367    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper_virtual.cpp",
368    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_link_finder_virtul.c",
369    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
370    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c",
371    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
372    "net_builder/src/lnn_net_builder_deps_mock.cpp",
373    "net_builder/src/lnn_net_builder_mock_test.cpp",
374  ]
375
376  include_dirs = [
377    "$dsoftbus_root_path/adapter/common/net/wifi/include",
378    "$dsoftbus_root_path/core/bus_center/ipc/include",
379    "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
380    "$dsoftbus_root_path/core/bus_center/ipc/standard/src",
381    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
382    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src",
383    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
384    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
385    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
386    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
387    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
388    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
389    "$dsoftbus_root_path/core/bus_center/monitor/include",
390    "$dsoftbus_root_path/core/common/include",
391    "$dsoftbus_root_path/core/common/dfx/interface/include",
392    "$dsoftbus_root_path/adapter/common/include",
393    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
394    "$dsoftbus_root_path/adapter/common/net/wifi/include",
395    "$dsoftbus_root_path/core/connection/interface",
396    "$dsoftbus_root_path/core/authentication/interface",
397    "$dsoftbus_root_path/core/bus_center/interface",
398    "$dsoftbus_root_path/core/bus_center/utils/include",
399    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
400    "$dsoftbus_root_path/interfaces/kits/bus_center",
401    "$dsoftbus_root_path/interfaces/kits/common",
402    "$dsoftbus_root_path/interfaces/kits/discovery",
403    "$dsoftbus_root_path/core/adapter/bus_center/include",
404    "unittest/common/",
405    "$dsoftbus_root_path/core/connection/manager",
406    "$dsoftbus_root_path/adapter/common/bus_center/include/",
407    "$dsoftbus_root_path/core/discovery/manager/include",
408    "$dsoftbus_root_path/core/discovery/interface",
409    "$dsoftbus_root_path/interfaces/kits/discovery",
410    "$dsoftbus_root_path/core/bus_center/service/include",
411    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
412    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
413    "$dsoftbus_root_path/core/transmission/interface",
414    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
415    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
416    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
417    "$dsoftbus_root_path/core/connection/p2p/interface",
418    "$dsoftbus_root_path/core/connection/p2p/common/include",
419    "$dsoftbus_root_path/core/connection/p2p/manager/include",
420    "$dsoftbus_root_path/core/authentication/include",
421    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
422    "$dsoftbus_root_path/interfaces/kits/common",
423  ]
424
425  deps = [
426    "$dsoftbus_root_path/adapter:softbus_adapter",
427    "$dsoftbus_root_path/core/common:softbus_utils",
428    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
429  ]
430
431  if (is_standard_system) {
432    external_deps = [
433      "cJSON:cjson",
434      "c_utils:utils",
435      "device_auth:deviceauth_sdk",
436      "googletest:gmock",
437      "googletest:gtest_main",
438      "hilog:libhilog",
439    ]
440  } else {
441    external_deps = [
442      "cJSON:cjson",
443      "c_utils:utils",
444      "googletest:gmock",
445      "googletest:gtest_main",
446      "hilog:libhilog",
447    ]
448  }
449}
450
451ohos_unittest("LNNConnectionFsmTest") {
452  module_out_path = module_output_path
453  sources = [
454    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c",
455    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c",
456    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c",
457    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c",
458    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c",
459    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
460    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c",
461    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
462    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
463    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/src/lnn_sync_info_mock.cpp",
464    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp",
465    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
466    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
467    "net_builder/src/lnn_auth_mock.cpp",
468    "net_builder/src/lnn_connection_fsm_mock.cpp",
469    "net_builder/src/lnn_connection_fsm_test.cpp",
470    "net_builder/src/lnn_net_ledger_mock.cpp",
471    "net_builder/src/lnn_service_mock.cpp",
472  ]
473
474  include_dirs = lnn_mock_test_include_dirs
475  include_dirs += [ "$dsoftbus_root_path/core/bus_center/ipc/include" ]
476  deps = [
477    "$dsoftbus_root_path/adapter:softbus_adapter",
478    "$dsoftbus_root_path/core/common:softbus_utils",
479    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
480  ]
481
482  if (is_standard_system) {
483    external_deps = [
484      "cJSON:cjson",
485      "c_utils:utils",
486      "device_auth:deviceauth_sdk",
487      "googletest:gmock",
488      "googletest:gtest_main",
489      "hilog:libhilog",
490    ]
491  } else {
492    external_deps = [
493      "cJSON:cjson",
494      "c_utils:utils",
495      "googletest:gmock",
496      "googletest:gtest_main",
497      "hilog:libhilog",
498    ]
499  }
500}
501
502ohos_unittest("LNNConnectionFsmMockTest") {
503  module_out_path = module_output_path
504  sources = [
505    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c",
506    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c",
507    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c",
508    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c",
509    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c",
510    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
511    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c",
512    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_sync_info_manager.c",
513    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
514    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/distribute_net_ledger_mock.cpp",
515    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
516    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
517    "net_builder/src/lnn_auth_mock.cpp",
518    "net_builder/src/lnn_connection_fsm_mock_test.cpp",
519    "net_builder/src/lnn_net_ledger_mock.cpp",
520    "net_builder/src/lnn_service_mock.cpp",
521  ]
522
523  include_dirs = lnn_mock_test_include_dirs
524  deps = lnn_mock_test_deps
525
526  if (is_standard_system) {
527    external_deps = [
528      "cJSON:cjson",
529      "c_utils:utils",
530      "device_auth:deviceauth_sdk",
531      "googletest:gmock",
532      "googletest:gtest_main",
533      "hilog:libhilog",
534    ]
535  } else {
536    external_deps = [
537      "cJSON:cjson",
538      "c_utils:utils",
539      "googletest:gmock",
540      "googletest:gtest_main",
541      "hilog:libhilog",
542    ]
543  }
544}
545
546ohos_unittest("LNNBatteryInfoTest") {
547  module_out_path = module_output_path
548  sources = [
549    "net_builder/src/lnn_battery_info_test.cpp",
550    "net_builder/src/lnn_net_ledger_mock.cpp",
551    "net_builder/src/lnn_sync_info_mock.cpp",
552  ]
553
554  include_dirs = lnn_mock_test_include_dirs
555  deps = lnn_mock_test_deps_exclude_softbus_server
556
557  if (is_standard_system) {
558    external_deps = [
559      "cJSON:cjson",
560      "c_utils:utils",
561      "device_auth:deviceauth_sdk",
562      "googletest:gmock",
563      "googletest:gtest_main",
564      "hilog:libhilog",
565    ]
566  } else {
567    external_deps = [
568      "cJSON:cjson",
569      "c_utils:utils",
570      "googletest:gmock",
571      "googletest:gtest_main",
572      "hilog:libhilog",
573    ]
574  }
575}
576
577ohos_unittest("LNNSyncInfoItemTest") {
578  module_out_path = module_output_path
579  sources = [
580    "net_builder/src/lnn_net_builder_mock.cpp",
581    "net_builder/src/lnn_net_ledger_mock.cpp",
582    "net_builder/src/lnn_service_mock.cpp",
583    "net_builder/src/lnn_sync_info_mock.cpp",
584    "net_builder/src/lnn_sync_item_info_test.cpp",
585  ]
586
587  include_dirs = lnn_mock_test_include_dirs
588  deps = lnn_mock_test_deps_exclude_softbus_server
589
590  if (is_standard_system) {
591    external_deps = [
592      "cJSON:cjson",
593      "c_utils:utils",
594      "device_auth:deviceauth_sdk",
595      "googletest:gmock",
596      "googletest:gtest_main",
597      "hilog:libhilog",
598    ]
599  } else {
600    external_deps = [
601      "cJSON:cjson",
602      "c_utils:utils",
603      "googletest:gmock",
604      "googletest:gtest_main",
605      "hilog:libhilog",
606    ]
607  }
608}
609
610ohos_unittest("LNNDeviceNameInfoTest") {
611  module_out_path = module_output_path
612  sources = [
613    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
614    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
615    "net_builder/src/lnn_devicename_info_test.cpp",
616    "net_builder/src/lnn_net_ledger_mock.cpp",
617    "net_builder/src/lnn_service_mock.cpp",
618    "net_builder/src/lnn_sync_info_mock.cpp",
619  ]
620
621  include_dirs = lnn_mock_test_include_dirs
622  deps = lnn_mock_test_deps_exclude_softbus_server
623
624  if (is_standard_system) {
625    external_deps = [
626      "cJSON:cjson",
627      "c_utils:utils",
628      "device_auth:deviceauth_sdk",
629      "googletest:gmock",
630      "googletest:gtest_main",
631      "hilog:libhilog",
632    ]
633  } else {
634    external_deps = [
635      "cJSON:cjson",
636      "c_utils:utils",
637      "googletest:gmock",
638      "googletest:gtest_main",
639      "hilog:libhilog",
640    ]
641  }
642}
643
644ohos_unittest("LNNNetworkInfoTest") {
645  module_out_path = module_output_path
646  sources = [
647    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
648    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
649    "net_builder/src/lnn_net_builder_mock.cpp",
650    "net_builder/src/lnn_net_ledger_mock.cpp",
651    "net_builder/src/lnn_network_info_test.cpp",
652    "net_builder/src/lnn_service_mock.cpp",
653    "net_builder/src/lnn_sync_info_mock.cpp",
654  ]
655
656  include_dirs = lnn_mock_test_include_dirs
657  deps = lnn_mock_test_deps_exclude_softbus_server
658
659  if (is_standard_system) {
660    external_deps = [
661      "cJSON:cjson",
662      "c_utils:utils",
663      "device_auth:deviceauth_sdk",
664      "googletest:gmock",
665      "googletest:gtest_main",
666      "hilog:libhilog",
667    ]
668  } else {
669    external_deps = [
670      "cJSON:cjson",
671      "c_utils:utils",
672      "googletest:gmock",
673      "googletest:gtest_main",
674      "hilog:libhilog",
675    ]
676  }
677}
678
679ohos_unittest("LNNNodeWeightTest") {
680  module_out_path = module_output_path
681  sources = [
682    "net_builder/src/lnn_net_ledger_mock.cpp",
683    "net_builder/src/lnn_node_weight_test.cpp",
684    "net_builder/src/lnn_service_mock.cpp",
685    "net_builder/src/lnn_sync_info_mock.cpp",
686  ]
687
688  include_dirs = lnn_mock_test_include_dirs
689  deps = lnn_mock_test_deps_exclude_softbus_server
690
691  if (is_standard_system) {
692    external_deps = [
693      "cJSON:cjson",
694      "c_utils:utils",
695      "device_auth:deviceauth_sdk",
696      "googletest:gmock",
697      "googletest:gtest_main",
698      "hilog:libhilog",
699    ]
700  } else {
701    external_deps = [
702      "cJSON:cjson",
703      "c_utils:utils",
704      "googletest:gmock",
705      "googletest:gtest_main",
706      "hilog:libhilog",
707    ]
708  }
709}
710
711ohos_unittest("LNNP2pInfoTest") {
712  module_out_path = module_output_path
713  sources = [
714    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
715    "net_builder/src/lnn_net_ledger_mock.cpp",
716    "net_builder/src/lnn_p2p_info_test.cpp",
717    "net_builder/src/lnn_service_mock.cpp",
718    "net_builder/src/lnn_sync_info_mock.cpp",
719  ]
720
721  include_dirs = lnn_mock_test_include_dirs
722  deps = lnn_mock_test_deps_exclude_softbus_server
723
724  if (is_standard_system) {
725    external_deps = [
726      "cJSON:cjson",
727      "c_utils:utils",
728      "device_auth:deviceauth_sdk",
729      "googletest:gmock",
730      "googletest:gtest_main",
731      "hilog:libhilog",
732    ]
733  } else {
734    external_deps = [
735      "cJSON:cjson",
736      "c_utils:utils",
737      "googletest:gmock",
738      "googletest:gtest_main",
739      "hilog:libhilog",
740    ]
741  }
742}
743
744ohos_unittest("LNNSyncInfoManagerTest") {
745  module_out_path = module_output_path
746  sources = [
747    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm.c",
748    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c",
749    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c",
750    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_init.c",
751    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder_process.c",
752    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c",
753    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c",
754    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c",
755    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_sync_info_manager.c",
756    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
757    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp",
758    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
759    "net_builder/src/lnn_auth_mock.cpp",
760    "net_builder/src/lnn_net_ledger_mock.cpp",
761    "net_builder/src/lnn_service_mock.cpp",
762    "net_builder/src/lnn_sync_info_manager_test.cpp",
763  ]
764
765  include_dirs = lnn_mock_test_include_dirs
766  deps = lnn_mock_test_deps
767
768  if (is_standard_system) {
769    external_deps = [
770      "cJSON:cjson",
771      "c_utils:utils",
772      "device_auth:deviceauth_sdk",
773      "googletest:gmock",
774      "googletest:gtest_main",
775      "hilog:libhilog",
776    ]
777  } else {
778    external_deps = [
779      "cJSON:cjson",
780      "c_utils:utils",
781      "googletest:gmock",
782      "googletest:gtest_main",
783      "hilog:libhilog",
784    ]
785  }
786}
787
788ohos_unittest("LNNTopoManagerTest") {
789  module_out_path = module_output_path
790  sources = [
791    "$dsoftbus_root_path/core/common/message_handler/message_handler.c",
792    "net_builder/src/lnn_net_ledger_mock.cpp",
793    "net_builder/src/lnn_service_mock.cpp",
794    "net_builder/src/lnn_sync_info_mock.cpp",
795    "net_builder/src/lnn_topo_manager_test.cpp",
796  ]
797
798  include_dirs = lnn_mock_test_include_dirs
799  include_dirs += [ "$dsoftbus_root_path/core/authentication/include" ]
800  deps = lnn_mock_test_deps_exclude_softbus_server
801
802  if (is_standard_system) {
803    external_deps = [
804      "cJSON:cjson",
805      "c_utils:utils",
806      "device_auth:deviceauth_sdk",
807      "googletest:gmock",
808      "googletest:gtest_main",
809      "hilog:libhilog",
810    ]
811  } else {
812    external_deps = [
813      "cJSON:cjson",
814      "c_utils:utils",
815      "googletest:gmock",
816      "googletest:gtest_main",
817      "hilog:libhilog",
818    ]
819  }
820}
821
822ohos_unittest("LNNBtNetworkImplMockTest") {
823  module_out_path = module_output_path
824  sources = [
825    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
826    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_connection_addr_utils.c",
827    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp",
828    "net_builder/src/lnn_auth_mock.cpp",
829    "net_builder/src/lnn_net_ledger_mock.cpp",
830    "net_buscenter/lnn_bt_network_impl_mock.cpp",
831    "net_buscenter/lnn_bt_network_impl_test.cpp",
832  ]
833
834  include_dirs = [
835    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
836    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
837    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
838    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
839    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
840    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
841    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
842    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
843    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
844    "$dsoftbus_root_path/core/common/include",
845    "$dsoftbus_root_path/core/common/dfx/interface/include",
846    "$dsoftbus_root_path/adapter/common/include",
847    "$dsoftbus_root_path/core/authentication/interface",
848    "$dsoftbus_root_path/core/bus_center/interface",
849    "$dsoftbus_root_path/core/bus_center/utils/include",
850    "$dsoftbus_root_path/interfaces/kits/bus_center",
851    "$dsoftbus_root_path/interfaces/kits/common",
852    "$dsoftbus_root_path/core/adapter/bus_center/include",
853    "$dsoftbus_root_path/core/connection/manager",
854    "$dsoftbus_root_path/adapter/common/bus_center/include/",
855    "$dsoftbus_root_path/core/discovery/manager/include",
856    "$dsoftbus_root_path/core/discovery/interface",
857    "$dsoftbus_root_path/interfaces/kits/discovery",
858    "$dsoftbus_root_path/core/bus_center/service/include",
859    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
860    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
861    "$dsoftbus_root_path/core/bus_center/utils/include",
862    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
863    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
864    "$dsoftbus_root_path/core/transmission/interface",
865    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
866    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
867    "$dsoftbus_root_path/core/authentication/include",
868  ]
869
870  deps = [
871    "$dsoftbus_root_path/adapter:softbus_adapter",
872    "$dsoftbus_root_path/core/common:softbus_utils",
873    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
874    "$dsoftbus_root_path/core/frame:softbus_server",
875  ]
876
877  if (is_standard_system) {
878    external_deps = [
879      "c_utils:utils",
880      "device_auth:deviceauth_sdk",
881      "googletest:gmock",
882      "googletest:gtest_main",
883      "hilog:libhilog",
884    ]
885  } else {
886    external_deps = [
887      "c_utils:utils",
888      "googletest:gmock",
889      "googletest:gtest_main",
890      "hilog:libhilog",
891    ]
892  }
893}
894
895ohos_unittest("LNNNetworkManagerMockTest") {
896  module_out_path = module_output_path
897  sources = [
898    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_oobe_manager_virtual.cpp",
899    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl_virtual.c",
900    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_fast_offline_virtual.c",
901    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_common_utils.c",
902    "net_builder/src/lnn_auth_mock.cpp",
903    "net_builder/src/lnn_net_ledger_mock.cpp",
904    "net_buscenter/lnn_network_manager_mock.cpp",
905    "net_buscenter/lnn_network_manager_test.cpp",
906  ]
907
908  include_dirs = [
909    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
910    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
911    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
912    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
913    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
914    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
915    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
916    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
917    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
918    "$dsoftbus_root_path/core/common/include",
919    "$dsoftbus_root_path/core/common/dfx/interface/include",
920    "$dsoftbus_root_path/adapter/common/include",
921    "$dsoftbus_root_path/core/authentication/interface",
922    "$dsoftbus_root_path/core/authentication/include",
923    "$dsoftbus_root_path/core/bus_center/interface",
924    "$dsoftbus_root_path/core/bus_center/utils/include",
925    "$dsoftbus_root_path/interfaces/kits/bus_center",
926    "$dsoftbus_root_path/interfaces/kits/common",
927    "$dsoftbus_root_path/core/adapter/bus_center/include",
928    "$dsoftbus_root_path/core/connection/manager",
929    "$dsoftbus_root_path/adapter/common/bus_center/include/",
930    "$dsoftbus_root_path/core/discovery/manager/include",
931    "$dsoftbus_root_path/core/discovery/interface",
932    "$dsoftbus_root_path/interfaces/kits/discovery",
933    "$dsoftbus_root_path/core/bus_center/service/include",
934    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
935    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
936    "$dsoftbus_root_path/core/bus_center/utils/include",
937    "$dsoftbus_root_path/core/bus_center/ipc/include",
938    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
939    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
940    "$dsoftbus_root_path/core/transmission/interface",
941    "$dsoftbus_root_path/core/transmission/trans_channel/qos/interface",
942    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
943    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
944    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
945  ]
946
947  deps = [
948    "$dsoftbus_root_path/adapter:softbus_adapter",
949    "$dsoftbus_root_path/core/common:softbus_utils",
950    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
951  ]
952
953  if (is_standard_system) {
954    external_deps = [
955      "c_utils:utils",
956      "device_auth:deviceauth_sdk",
957      "googletest:gmock",
958      "googletest:gtest_main",
959      "hilog:libhilog",
960    ]
961  } else {
962    external_deps = [
963      "c_utils:utils",
964      "googletest:gmock",
965      "googletest:gtest_main",
966      "hilog:libhilog",
967    ]
968  }
969}
970
971ohos_unittest("LNNIpNetworkImplMockTest") {
972  module_out_path = module_output_path
973  sources = [
974    "net_builder/src/lnn_net_ledger_mock.cpp",
975    "net_buscenter/lnn_ip_network_impl_mock.cpp",
976    "net_buscenter/lnn_ip_network_impl_test.cpp",
977  ]
978
979  include_dirs = [
980    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
981    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
982    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
983    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/src",
984    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
985    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
986    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
987    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
988    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
989    "$dsoftbus_root_path/core/common/include",
990    "$dsoftbus_root_path/core/common/dfx/interface/include",
991    "$dsoftbus_root_path/adapter/common/include",
992    "$dsoftbus_root_path/core/authentication/interface",
993    "$dsoftbus_root_path/core/bus_center/interface",
994    "$dsoftbus_root_path/core/bus_center/utils/include",
995    "$dsoftbus_root_path/interfaces/kits/bus_center",
996    "$dsoftbus_root_path/interfaces/kits/common",
997    "$dsoftbus_root_path/core/adapter/bus_center/include",
998    "$dsoftbus_root_path/core/connection/manager",
999    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1000    "$dsoftbus_root_path/core/discovery/manager/include",
1001    "$dsoftbus_root_path/core/discovery/interface",
1002    "$dsoftbus_root_path/interfaces/kits/discovery",
1003    "$dsoftbus_root_path/core/bus_center/service/include",
1004    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1005    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1006    "$dsoftbus_root_path/core/bus_center/utils/include",
1007    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_buscenter",
1008    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1009    "$dsoftbus_root_path/core/transmission/interface",
1010    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1011    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1012    "$dsoftbus_root_path/core/transmission/trans_channel/tcp_direct/include",
1013    "$dsoftbus_root_path/core/authentication/include",
1014    "$dsoftbus_root_path/core/connection/coap/include",
1015  ]
1016
1017  deps = [
1018    "$dsoftbus_root_path/adapter:softbus_adapter",
1019    "$dsoftbus_root_path/core/common:softbus_utils",
1020    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1021    "$dsoftbus_root_path/core/frame:softbus_server",
1022  ]
1023
1024  if (is_standard_system) {
1025    external_deps = [
1026      "c_utils:utils",
1027      "device_auth:deviceauth_sdk",
1028      "googletest:gmock",
1029      "googletest:gtest_main",
1030      "hilog:libhilog",
1031    ]
1032  } else {
1033    external_deps = [
1034      "c_utils:utils",
1035      "googletest:gmock",
1036      "googletest:gtest_main",
1037      "hilog:libhilog",
1038    ]
1039  }
1040}
1041
1042ohos_unittest("LNNLedgerMockTest") {
1043  module_out_path = module_output_path
1044  sources = [
1045    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp",
1046    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c",
1047    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_device_info_recovery_virtual.c",
1048    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c",
1049    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_ledger.c",
1050    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c",
1051    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c",
1052    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c",
1053    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1054    "net_ledger/lnn_local_ledger_deps_mock.cpp",
1055    "net_ledger/lnn_local_ledger_test.cpp",
1056  ]
1057
1058  include_dirs = [
1059    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src",
1060    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1061    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1062    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1063    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1064    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1065    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1066    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1067    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1068    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1069    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1070    "$dsoftbus_root_path/core/bus_center/monitor/include",
1071    "$dsoftbus_root_path/core/common/include",
1072    "$dsoftbus_root_path/core/common/dfx/interface/include",
1073    "$dsoftbus_root_path/adapter/common/include",
1074    "$dsoftbus_root_path/core/connection/interface",
1075    "$dsoftbus_root_path/core/connection/p2p/interface",
1076    "$dsoftbus_root_path/core/connection/p2p/common/include",
1077    "$dsoftbus_root_path/core/authentication/interface",
1078    "$dsoftbus_root_path/core/authentication/include",
1079    "$dsoftbus_root_path/core/bus_center/interface",
1080    "$dsoftbus_root_path/core/bus_center/utils/include",
1081    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1082    "$dsoftbus_root_path/interfaces/kits/bus_center",
1083    "$dsoftbus_root_path/interfaces/kits/common",
1084    "$dsoftbus_root_path/core/adapter/bus_center/include",
1085    "unittest/common/",
1086    "$dsoftbus_root_path/core/connection/manager",
1087    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1088    "$dsoftbus_root_path/core/discovery/manager/include",
1089    "$dsoftbus_root_path/core/discovery/interface",
1090    "$dsoftbus_root_path/interfaces/kits/discovery",
1091    "$dsoftbus_root_path/core/bus_center/service/include",
1092    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1093    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1094    "lane/include",
1095    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
1096    "$dsoftbus_root_path/interfaces/kits/common",
1097  ]
1098
1099  deps = [
1100    "$dsoftbus_root_path/adapter:softbus_adapter",
1101    "$dsoftbus_root_path/core/common:softbus_utils",
1102    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1103    "$dsoftbus_root_path/core/frame:softbus_server",
1104  ]
1105
1106  if (is_standard_system) {
1107    external_deps = [
1108      "cJSON:cjson",
1109      "c_utils:utils",
1110      "device_auth:deviceauth_sdk",
1111      "googletest:gmock",
1112      "googletest:gtest_main",
1113      "hilog:libhilog",
1114    ]
1115  } else {
1116    external_deps = [
1117      "cJSON:cjson",
1118      "c_utils:utils",
1119      "googletest:gmock",
1120      "googletest:gtest_main",
1121      "hilog:libhilog",
1122    ]
1123  }
1124  external_deps += [ "huks:libhukssdk" ]
1125}
1126
1127ohos_unittest("LNNNetLedgerCommonTest") {
1128  module_out_path = module_output_path
1129  sources = [
1130    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_oobe_manager_virtual.cpp",
1131    "net_ledger/lnn_ledger_common_test.cpp",
1132  ]
1133
1134  include_dirs = [
1135    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1136    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1137    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1138    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1139    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1140    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1141    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1142    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1143    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1144    "$dsoftbus_root_path/core/bus_center/monitor/include",
1145    "$dsoftbus_root_path/core/authentication/include",
1146    "$dsoftbus_root_path/core/common/include",
1147    "$dsoftbus_root_path/core/common/dfx/interface/include",
1148    "$dsoftbus_root_path/adapter/common/include",
1149    "$dsoftbus_root_path/core/connection/interface",
1150    "$dsoftbus_root_path/core/connection/p2p/interface",
1151    "$dsoftbus_root_path/core/connection/p2p/common/include",
1152    "$dsoftbus_root_path/core/authentication/interface",
1153    "$dsoftbus_root_path/core/bus_center/interface",
1154    "$dsoftbus_root_path/core/bus_center/utils/include",
1155    "$dsoftbus_root_path/interfaces/kits/bus_center",
1156    "$dsoftbus_root_path/interfaces/kits/common",
1157    "$dsoftbus_root_path/core/adapter/bus_center/include",
1158    "unittest/common/",
1159    "$dsoftbus_root_path/core/connection/manager",
1160    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1161    "$dsoftbus_root_path/core/discovery/manager/include",
1162    "$dsoftbus_root_path/core/discovery/interface",
1163    "$dsoftbus_root_path/interfaces/kits/discovery",
1164    "$dsoftbus_root_path/core/bus_center/service/include",
1165    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1166  ]
1167
1168  deps = [
1169    "$dsoftbus_root_path/adapter:softbus_adapter",
1170    "$dsoftbus_root_path/core/common:softbus_utils",
1171    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1172    "$dsoftbus_root_path/core/frame:softbus_server",
1173  ]
1174  if (dsoftbus_feature_lnn_net) {
1175    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ]
1176    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c" ]
1177  } else {
1178    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ]
1179  }
1180  if (is_standard_system) {
1181    external_deps = [
1182      "cJSON:cjson",
1183      "c_utils:utils",
1184      "device_auth:deviceauth_sdk",
1185      "googletest:gmock",
1186      "googletest:gtest_main",
1187      "hilog:libhilog",
1188    ]
1189  } else {
1190    external_deps = [
1191      "cJSON:cjson",
1192      "c_utils:utils",
1193      "googletest:gmock",
1194      "googletest:gtest_main",
1195      "hilog:libhilog",
1196    ]
1197  }
1198  external_deps += [ "huks:libhukssdk" ]
1199}
1200
1201ohos_unittest("LNNDisctributedLedgerTest") {
1202  module_out_path = module_output_path
1203  sources = [ "net_ledger/lnn_disctributed_net_ledger_test.cpp" ]
1204
1205  include_dirs = [
1206    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1207    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1208    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1209    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1210    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1211    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1212    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src",
1213    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1214    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1215    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src",
1216    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1217    "$dsoftbus_root_path/core/bus_center/monitor/include",
1218    "$dsoftbus_root_path/core/authentication/include",
1219    "$dsoftbus_root_path/core/common/include",
1220    "$dsoftbus_root_path/core/common/dfx/interface/include",
1221    "$dsoftbus_root_path/adapter/common/include",
1222    "$dsoftbus_root_path/core/connection/interface",
1223    "$dsoftbus_root_path/core/connection/p2p/interface",
1224    "$dsoftbus_root_path/core/connection/p2p/common/include",
1225    "$dsoftbus_root_path/core/authentication/interface",
1226    "$dsoftbus_root_path/core/bus_center/interface",
1227    "$dsoftbus_root_path/core/bus_center/utils/include",
1228    "$dsoftbus_root_path/core/bus_center/utils/src",
1229    "$dsoftbus_root_path/interfaces/kits/bus_center",
1230    "$dsoftbus_root_path/interfaces/kits/common",
1231    "$dsoftbus_root_path/core/adapter/bus_center/include",
1232    "unittest/common/",
1233    "$dsoftbus_root_path/core/connection/manager",
1234    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1235    "$dsoftbus_root_path/core/discovery/manager/include",
1236    "$dsoftbus_root_path/core/discovery/interface",
1237    "$dsoftbus_root_path/interfaces/kits/discovery",
1238    "$dsoftbus_root_path/core/bus_center/service/include",
1239    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1240  ]
1241
1242  deps = [
1243    "$dsoftbus_root_path/adapter:softbus_adapter",
1244    "$dsoftbus_root_path/core/common:softbus_utils",
1245    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1246    "$dsoftbus_root_path/core/frame:softbus_server",
1247  ]
1248  if (is_standard_system) {
1249    external_deps = [
1250      "cJSON:cjson",
1251      "c_utils:utils",
1252      "device_auth:deviceauth_sdk",
1253      "googletest:gmock",
1254      "googletest:gtest_main",
1255      "hilog:libhilog",
1256    ]
1257  } else {
1258    external_deps = [
1259      "cJSON:cjson",
1260      "c_utils:utils",
1261      "googletest:gmock",
1262      "googletest:gtest_main",
1263      "hilog:libhilog",
1264    ]
1265  }
1266  external_deps += [ "huks:libhukssdk" ]
1267}
1268
1269ohos_unittest("LNNMetaNodeLedgerTest") {
1270  module_out_path = module_output_path
1271  sources = [
1272    "net_ledger/lnn_ledger_common_test.cpp",
1273    "net_ledger/lnn_meta_node_ledger_test.cpp",
1274  ]
1275
1276  include_dirs = [
1277    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1278    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1279    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1280    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1281    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1282    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1283    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1284    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1285    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1286    "$dsoftbus_root_path/core/bus_center/monitor/include",
1287    "$dsoftbus_root_path/core/authentication/include",
1288    "$dsoftbus_root_path/core/common/include",
1289    "$dsoftbus_root_path/core/common/dfx/interface/include",
1290    "$dsoftbus_root_path/adapter/common/include",
1291    "$dsoftbus_root_path/core/connection/interface",
1292    "$dsoftbus_root_path/core/connection/p2p/interface",
1293    "$dsoftbus_root_path/core/connection/p2p/common/include",
1294    "$dsoftbus_root_path/core/authentication/interface",
1295    "$dsoftbus_root_path/core/bus_center/interface",
1296    "$dsoftbus_root_path/core/bus_center/utils/include",
1297    "$dsoftbus_root_path/interfaces/kits/bus_center",
1298    "$dsoftbus_root_path/interfaces/kits/common",
1299    "$dsoftbus_root_path/core/adapter/bus_center/include",
1300    "unittest/common/",
1301    "$dsoftbus_root_path/core/connection/manager",
1302    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1303    "$dsoftbus_root_path/core/discovery/manager/include",
1304    "$dsoftbus_root_path/core/discovery/interface",
1305    "$dsoftbus_root_path/interfaces/kits/discovery",
1306    "$dsoftbus_root_path/core/bus_center/service/include",
1307    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1308  ]
1309
1310  deps = [
1311    "$dsoftbus_root_path/adapter:softbus_adapter",
1312    "$dsoftbus_root_path/core/common:softbus_utils",
1313    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1314    "$dsoftbus_root_path/core/frame:softbus_server",
1315  ]
1316  if (dsoftbus_feature_lnn_net) {
1317    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ]
1318    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_manager.c" ]
1319  } else {
1320    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ]
1321  }
1322  if (is_standard_system) {
1323    external_deps = [
1324      "cJSON:cjson",
1325      "c_utils:utils",
1326      "device_auth:deviceauth_sdk",
1327      "googletest:gmock",
1328      "googletest:gtest_main",
1329      "hilog:libhilog",
1330    ]
1331  } else {
1332    external_deps = [
1333      "cJSON:cjson",
1334      "c_utils:utils",
1335      "googletest:gmock",
1336      "googletest:gtest_main",
1337      "hilog:libhilog",
1338    ]
1339  }
1340  external_deps += [ "huks:libhukssdk" ]
1341}
1342
1343ohos_unittest("LNNLaneMockTest") {
1344  module_out_path = module_output_path
1345  sources = [
1346    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_ctrl_lane.c",
1347    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
1348    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
1349    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c",
1350    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_conflict.c",
1351    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
1352    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_listener.c",
1353    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_model.c",
1354    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_power_control_virtual.c",
1355    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c",
1356    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c",
1357    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_parameter_utils_virtual.c",
1358    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
1359    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c",
1360    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1361    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c",
1362    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
1363    "lane/src/lnn_lane_deps_mock.cpp",
1364    "lane/src/lnn_lane_test.cpp",
1365    "lane/src/lnn_wifi_adpter_mock.cpp",
1366  ]
1367
1368  include_dirs = [
1369    "lane/include",
1370    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1371    "$dsoftbus_root_path/adapter/common/include",
1372    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1373    "$dsoftbus_root_path/adapter/common/net/hdi/include",
1374    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1375    "$dsoftbus_root_path/core/adapter/bus_center/include",
1376    "$dsoftbus_root_path/core/authentication/include",
1377    "$dsoftbus_root_path/core/authentication/interface",
1378    "$dsoftbus_root_path/core/bus_center/interface",
1379    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
1380    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1381    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1382    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1383    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1384    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
1385    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1386    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1387    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1388    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1389    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1390    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1391    "$dsoftbus_root_path/core/bus_center/monitor/include",
1392    "$dsoftbus_root_path/core/bus_center/service/include",
1393    "$dsoftbus_root_path/core/bus_center/utils/include",
1394    "$dsoftbus_root_path/core/common/dfx/interface/include",
1395    "$dsoftbus_root_path/core/common/include",
1396    "$dsoftbus_root_path/core/connection/ble/include",
1397    "$dsoftbus_root_path/core/connection/interface",
1398    "$dsoftbus_root_path/core/connection/p2p/common/include",
1399    "$dsoftbus_root_path/core/connection/p2p/interface",
1400    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1401    "$dsoftbus_root_path/core/discovery/interface",
1402    "$dsoftbus_root_path/core/discovery/manager/include",
1403    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1404    "$dsoftbus_root_path/interfaces/kits/bus_center",
1405    "$dsoftbus_root_path/interfaces/kits/common",
1406    "$dsoftbus_root_path/interfaces/kits/discovery",
1407    "unittest/common/",
1408  ]
1409
1410  if (enhanced_test) {
1411    sources += [
1412      "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane/lnn_lane_score.c",
1413      "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/channel_rating_v2.c",
1414      "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/lnn_rating_manager.c",
1415      "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_collector.c",
1416      "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/src/wlan_channel_sync.c",
1417    ]
1418    include_dirs += [ "$dsoftbus_root_path/dsoftbus_enhance/core/bus_center/lnn/lane_hub/lane_channel_rating/include" ]
1419  } else {
1420    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c" ]
1421  }
1422
1423  deps = [
1424    "$dsoftbus_root_path/adapter:softbus_adapter",
1425    "$dsoftbus_root_path/core/common:softbus_utils",
1426    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1427  ]
1428
1429  if (is_standard_system) {
1430    external_deps = [
1431      "cJSON:cjson",
1432      "c_utils:utils",
1433      "device_auth:deviceauth_sdk",
1434      "googletest:gmock",
1435      "googletest:gtest_main",
1436      "hilog:libhilog",
1437    ]
1438    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
1439      external_deps += [ "wifi:wifi_sdk" ]
1440    }
1441  } else {
1442    external_deps = [
1443      "cJSON:cjson",
1444      "c_utils:utils",
1445      "googletest:gmock",
1446      "googletest:gtest_main",
1447      "hilog:libhilog",
1448    ]
1449  }
1450}
1451
1452ohos_unittest("LNNLaneQueryTest") {
1453  module_out_path = module_output_path
1454  sources = [ "lane/src/lnn_lane_query_test.cpp" ]
1455
1456  include_dirs = [
1457    "$dsoftbus_root_path/core/adapter/bus_center/include",
1458    "$dsoftbus_root_path/core/authentication/interface",
1459    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1460    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1461    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1462    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1463    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1464    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1465    "$dsoftbus_root_path/core/bus_center/interface",
1466    "$dsoftbus_root_path/core/bus_center/utils/include",
1467    "$dsoftbus_root_path/core/bus_center/service/include",
1468    "$dsoftbus_root_path/core/common/include",
1469    "$dsoftbus_root_path/core/common/dfx/interface/include",
1470    "$dsoftbus_root_path/adapter/common/include",
1471    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1472    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1473    "$dsoftbus_root_path/core/connection/interface",
1474    "$dsoftbus_root_path/core/connection/p2p/interface",
1475    "$dsoftbus_root_path/core/connection/p2p/common/include",
1476    "$dsoftbus_root_path/core/discovery/manager/include",
1477    "$dsoftbus_root_path/core/discovery/interface",
1478    "$dsoftbus_root_path/interfaces/kits/bus_center",
1479    "unittest/common/",
1480  ]
1481
1482  deps = [
1483    "$dsoftbus_root_path/adapter:softbus_adapter",
1484    "$dsoftbus_root_path/core/common:softbus_utils",
1485    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1486    "$dsoftbus_root_path/core/frame:softbus_server",
1487  ]
1488
1489  if (is_standard_system) {
1490    external_deps = [
1491      "cJSON:cjson",
1492      "c_utils:utils",
1493      "device_auth:deviceauth_sdk",
1494      "googletest:gtest_main",
1495      "hilog:libhilog",
1496    ]
1497  } else {
1498    external_deps = [
1499      "cJSON:cjson",
1500      "c_utils:utils",
1501      "googletest:gtest_main",
1502      "hilog:libhilog",
1503    ]
1504  }
1505}
1506
1507ohos_unittest("LNNLaneLinkTest") {
1508  module_out_path = module_output_path
1509  sources = [
1510    "$dsoftbus_root_path/adapter/common/net/wifi/common/softbus_wifi_api_adapter_virtual.c",
1511    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
1512    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
1513    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
1514    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c",
1515    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c",
1516    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c",
1517    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c",
1518    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_ptk_info_virtual.c",
1519    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1520    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
1521    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
1522    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_test.cpp",
1523    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_async_callback_mock.cpp",
1524  ]
1525
1526  if (dsoftbus_feature_conn_p2p && softbus_communication_wifi_feature) {
1527    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ]
1528  } else {
1529    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ]
1530  }
1531
1532  include_dirs = [
1533    "$dsoftbus_root_path/adapter/common/include",
1534    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1535    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1536    "$dsoftbus_root_path/core/authentication/include",
1537    "$dsoftbus_root_path/core/authentication/interface",
1538    "$dsoftbus_root_path/core/adapter/bus_center/include",
1539    "$dsoftbus_root_path/core/bus_center/interface",
1540    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
1541    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1542    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1543    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1544    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1545    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1546    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1547    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1548    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1549    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1550    "$dsoftbus_root_path/core/bus_center/monitor/include",
1551    "$dsoftbus_root_path/core/bus_center/service/include",
1552    "$dsoftbus_root_path/core/bus_center/utils/include",
1553    "$dsoftbus_root_path/core/common/dfx/interface/include",
1554    "$dsoftbus_root_path/core/common/include",
1555    "$dsoftbus_root_path/core/connection/ble/include",
1556    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1557    "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils",
1558    "$dsoftbus_root_path/core/discovery/interface",
1559    "$dsoftbus_root_path/core/discovery/manager/include",
1560    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1561    "$dsoftbus_root_path/interfaces/kits/bus_center",
1562    "$dsoftbus_root_path/interfaces/kits/common",
1563    "$dsoftbus_root_path/interfaces/kits/discovery",
1564    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
1565    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1566    "$dsoftbus_root_path/core/adapter/bus_center/include",
1567    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1568  ]
1569
1570  deps = [
1571    "$dsoftbus_root_path/adapter:softbus_adapter",
1572    "$dsoftbus_root_path/core/common:softbus_utils",
1573    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1574  ]
1575
1576  if (is_standard_system) {
1577    external_deps = [
1578      "c_utils:utils",
1579      "device_auth:deviceauth_sdk",
1580      "googletest:gmock",
1581      "googletest:gtest_main",
1582      "hilog:libhilog",
1583    ]
1584  } else {
1585    external_deps = [
1586      "c_utils:utils",
1587      "googletest:gmock",
1588      "googletest:gtest_main",
1589      "hilog:libhilog",
1590    ]
1591  }
1592}
1593
1594ohos_unittest("LNNTransLaneMockTest") {
1595  module_out_path = module_output_path
1596  sources = [
1597    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c",
1598    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_reliability.c",
1599    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c",
1600    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1601    "lane/src/lnn_lane_deps_mock.cpp",
1602    "lane/src/lnn_wifi_adpter_mock.cpp",
1603    "lane/trans_lane/lnn_trans_lane_deps_mock.cpp",
1604    "lane/trans_lane/lnn_trans_lane_test.cpp",
1605  ]
1606
1607  include_dirs = [
1608    "lane/include",
1609    "lane/trans_lane",
1610    "$dsoftbus_root_path/adapter/common/include",
1611    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1612    "$dsoftbus_root_path/adapter/common/net/hdi/include",
1613    "$dsoftbus_root_path/adapter/common/net/wifi/include",
1614    "$dsoftbus_root_path/core/adapter/bus_center/include",
1615    "$dsoftbus_root_path/core/authentication/include",
1616    "$dsoftbus_root_path/core/authentication/interface",
1617    "$dsoftbus_root_path/core/bus_center/interface",
1618    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
1619    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1620    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1621    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1622    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1623    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
1624    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1625    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1626    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1627    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1628    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1629    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1630    "$dsoftbus_root_path/core/bus_center/monitor/include",
1631    "$dsoftbus_root_path/core/bus_center/service/include",
1632    "$dsoftbus_root_path/core/bus_center/utils/include",
1633    "$dsoftbus_root_path/core/common/include",
1634    "$dsoftbus_root_path/core/common/dfx/interface/include",
1635    "$dsoftbus_root_path/core/connection/ble/include",
1636    "$dsoftbus_root_path/core/connection/interface",
1637    "$dsoftbus_root_path/core/connection/p2p/interface",
1638    "$dsoftbus_root_path/core/connection/p2p/common/include",
1639    "$dsoftbus_root_path/core/discovery/manager/include",
1640    "$dsoftbus_root_path/core/discovery/interface",
1641    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1642    "$dsoftbus_root_path/interfaces/kits/bus_center",
1643    "$dsoftbus_root_path/interfaces/kits/common",
1644    "$dsoftbus_root_path/interfaces/kits/discovery",
1645    "unittest/common/",
1646    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1647  ]
1648
1649  deps = [
1650    "$dsoftbus_root_path/adapter:softbus_adapter",
1651    "$dsoftbus_root_path/core/common:softbus_utils",
1652    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1653  ]
1654
1655  if (is_standard_system) {
1656    external_deps = [
1657      "cJSON:cjson",
1658      "c_utils:utils",
1659      "device_auth:deviceauth_sdk",
1660      "googletest:gmock",
1661      "googletest:gtest_main",
1662      "hilog:libhilog",
1663    ]
1664    if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
1665      external_deps += [ "wifi:wifi_sdk" ]
1666    }
1667  } else {
1668    external_deps = [
1669      "cJSON:cjson",
1670      "c_utils:utils",
1671      "googletest:gmock",
1672      "googletest:gtest_main",
1673      "hilog:libhilog",
1674    ]
1675  }
1676}
1677
1678ohos_unittest("LNNDiscoveryInterfaceTest") {
1679  module_out_path = module_output_path
1680  sources = [
1681    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
1682    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
1683    "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c",
1684    "$dsoftbus_root_path/core/authentication/src/auth_interface.c",
1685    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src/lnn_coap_adapter_virtual.c",
1686    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src/lnn_discovery_interface.c",
1687    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_file_utils.c",
1688    "$dsoftbus_root_path/tests/core/authentication/unittest/auth_common_mock.cpp",
1689    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp",
1690    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/bus_center_mock.cpp",
1691    "disc_mgr/disc_manager_mock.cpp",
1692    "disc_mgr/lnn_discovery_interface_test.cpp",
1693  ]
1694
1695  include_dirs = [
1696    "disc_mgr",
1697    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1698    "$dsoftbus_root_path/adapter/common/include",
1699    "$dsoftbus_root_path/core/adapter/bus_center/include",
1700    "$dsoftbus_root_path/core/authentication/include",
1701    "$dsoftbus_root_path/core/authentication/interface",
1702    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1703    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/src",
1704    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1705    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1706    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1707    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1708    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1709    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1710    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1711    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1712    "$dsoftbus_root_path/core/bus_center/utils/include",
1713    "$dsoftbus_root_path/core/bus_center/interface",
1714    "$dsoftbus_root_path/core/bus_center/service/include",
1715    "$dsoftbus_root_path/core/common/include",
1716    "$dsoftbus_root_path/core/common/dfx/interface/include",
1717    "$dsoftbus_root_path/core/connection/interface",
1718    "$dsoftbus_root_path/core/discovery/manager/include",
1719    "$dsoftbus_root_path/core/discovery/interface",
1720    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1721    "$dsoftbus_root_path/interfaces/kits/discovery",
1722    "$dsoftbus_root_path/interfaces/kits/common",
1723    "$dsoftbus_root_path/interfaces/kits/bus_center",
1724    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock",
1725    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1726    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1727  ]
1728
1729  deps = [
1730    "$dsoftbus_root_path/adapter:softbus_adapter",
1731    "$dsoftbus_root_path/core/common:softbus_utils",
1732    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1733  ]
1734
1735  if (is_standard_system) {
1736    external_deps = [
1737      "bounds_checking_function:libsec_shared",
1738      "c_utils:utils",
1739      "device_auth:deviceauth_sdk",
1740      "googletest:gmock",
1741      "googletest:gtest_main",
1742      "hilog:libhilog",
1743      "huks:libhukssdk",
1744    ]
1745  } else {
1746    external_deps = [
1747      "bounds_checking_function:libsec_shared",
1748      "c_utils:utils",
1749      "device_auth:deviceauth_sdk",
1750      "googletest:gmock",
1751      "googletest:gtest_main",
1752      "hilog:libhilog",
1753      "huks:libhukssdk",
1754    ]
1755  }
1756}
1757
1758ohos_unittest("LNNLaneListenerTest") {
1759  module_out_path = module_output_path
1760  sources = [
1761    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c",
1762    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
1763    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
1764    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_listener/lnn_lane_listener_deps_mock.cpp",
1765    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_listener/lnn_lane_listener_test.cpp",
1766  ]
1767
1768  include_dirs = [
1769    "lane/include",
1770    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1771    "$dsoftbus_root_path/core/authentication/include",
1772    "$dsoftbus_root_path/core/authentication/interface",
1773    "$dsoftbus_root_path/core/adapter/bus_center/include",
1774    "$dsoftbus_root_path/core/bus_center/interface",
1775    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
1776    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1777    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
1778    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1779    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
1780    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1781    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1782    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1783    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1784    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1785    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1786    "$dsoftbus_root_path/core/bus_center/monitor/include",
1787    "$dsoftbus_root_path/core/bus_center/service/include",
1788    "$dsoftbus_root_path/core/bus_center/utils/include",
1789    "$dsoftbus_root_path/core/connection/ble/include",
1790    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1791    "$dsoftbus_root_path/core/discovery/interface",
1792    "$dsoftbus_root_path/core/discovery/manager/include",
1793    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1794    "$dsoftbus_root_path/interfaces/kits/discovery",
1795  ]
1796
1797  deps = [
1798    "$dsoftbus_root_path/adapter:softbus_adapter",
1799    "$dsoftbus_root_path/core/common:softbus_utils",
1800    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1801  ]
1802
1803  if (is_standard_system) {
1804    external_deps = [
1805      "c_utils:utils",
1806      "device_auth:deviceauth_sdk",
1807      "googletest:gmock",
1808      "googletest:gtest_main",
1809      "hilog:libhilog",
1810    ]
1811  } else {
1812    external_deps = [
1813      "c_utils:utils",
1814      "googletest:gmock",
1815      "googletest:gtest_main",
1816      "hilog:libhilog",
1817    ]
1818  }
1819}
1820
1821if (!defined(ohos_lite) && enhanced_test) {
1822  ohos_unittest("LNNDbMockTest") {
1823    module_out_path = module_output_path
1824    sources = [
1825      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
1826      "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp",
1827      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl.c",
1828      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_fsm.c",
1829      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_strategy.c",
1830      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src/lnn_decision_db.c",
1831      "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
1832      "$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_virtual.c",
1833      "net_ledger/lnn_decision_db_deps_mock.cpp",
1834      "net_ledger/lnn_decision_db_test.cpp",
1835    ]
1836    sources += bus_center_decision_center_src
1837
1838    include_dirs = [
1839      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1840      "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1841      "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1842      "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1843      "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include",
1844      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1845      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1846      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1847      "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
1848      "$dsoftbus_root_path/core/bus_center/monitor/include",
1849      "$dsoftbus_root_path/core/common/include",
1850      "$dsoftbus_root_path/adapter/common/include",
1851      "$dsoftbus_root_path/core/connection/interface",
1852      "$dsoftbus_root_path/core/connection/p2p/interface",
1853      "$dsoftbus_root_path/core/connection/p2p/common/include",
1854      "$dsoftbus_root_path/core/authentication/interface",
1855      "$dsoftbus_root_path/core/authentication/include",
1856      "$dsoftbus_root_path/core/bus_center/interface",
1857      "$dsoftbus_root_path/core/bus_center/utils/include",
1858      "$dsoftbus_root_path/interfaces/kits/bus_center",
1859      "$dsoftbus_root_path/interfaces/kits/common",
1860      "$dsoftbus_root_path/core/adapter/bus_center/include",
1861      "unittest/common/",
1862      "$dsoftbus_root_path/core/connection/manager",
1863      "$dsoftbus_root_path/adapter/common/bus_center/include/",
1864      "$dsoftbus_root_path/core/discovery/manager/include",
1865      "$dsoftbus_root_path/core/discovery/interface",
1866      "$dsoftbus_root_path/interfaces/kits/discovery",
1867      "$dsoftbus_root_path/core/bus_center/service/include",
1868      "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1869      "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1870      "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
1871      "$dsoftbus_root_path/dsoftbus_enhance/adapter/common/mlps/interface",
1872      "$dsoftbus_root_path/interfaces/kits/lnn",
1873      "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1874      "$dsoftbus_root_path/core/connection/ble/include",
1875    ]
1876    include_dirs += bus_center_decision_center_inc
1877
1878    deps = [
1879      "$dsoftbus_root_path/adapter:softbus_adapter",
1880      "$dsoftbus_root_path/core/common:softbus_utils",
1881    ]
1882
1883    if (is_standard_system) {
1884      external_deps = [
1885        "cJSON:cjson",
1886        "c_utils:utils",
1887        "device_auth:deviceauth_sdk",
1888        "googletest:gmock",
1889        "googletest:gtest_main",
1890        "hilog:libhilog",
1891      ]
1892    } else {
1893      external_deps = [
1894        "cJSON:cjson",
1895        "c_utils:utils",
1896        "googletest:gmock",
1897        "googletest:gtest_main",
1898        "hilog:libhilog",
1899      ]
1900    }
1901    external_deps += [ "huks:libhukssdk" ]
1902  }
1903}
1904
1905ohos_unittest("LNNDataCloudSyncTest") {
1906  module_out_path = module_output_path
1907  sources = [ "net_builder/src/lnn_data_cloud_sync_test.cpp" ]
1908
1909  include_dirs = [
1910    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1911    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1912    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1913    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1914    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1915    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1916    "$dsoftbus_root_path/core/bus_center/monitor/include",
1917    "$dsoftbus_root_path/core/common/include",
1918    "$dsoftbus_root_path/core/common/dfx/interface/include",
1919    "$dsoftbus_root_path/adapter/common/include",
1920    "$dsoftbus_root_path/core/connection/interface",
1921    "$dsoftbus_root_path/core/authentication/interface",
1922    "$dsoftbus_root_path/core/bus_center/interface",
1923    "$dsoftbus_root_path/core/bus_center/utils/include",
1924    "$dsoftbus_root_path/interfaces/kits/bus_center",
1925    "$dsoftbus_root_path/interfaces/kits/common",
1926    "$dsoftbus_root_path/interfaces/kits/discovery",
1927    "$dsoftbus_root_path/core/adapter/bus_center/include",
1928    "unittest/common/",
1929    "$dsoftbus_root_path/core/connection/manager",
1930    "$dsoftbus_root_path/adapter/common/bus_center/include/",
1931    "$dsoftbus_root_path/core/discovery/manager/include",
1932    "$dsoftbus_root_path/core/discovery/interface",
1933    "$dsoftbus_root_path/interfaces/kits/discovery",
1934    "$dsoftbus_root_path/core/bus_center/service/include",
1935    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1936  ]
1937
1938  deps = [
1939    "$dsoftbus_root_path/adapter:softbus_adapter",
1940    "$dsoftbus_root_path/core/common:softbus_utils",
1941    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1942    "$dsoftbus_root_path/core/frame:softbus_server",
1943  ]
1944
1945  if (is_standard_system) {
1946    external_deps = [
1947      "cJSON:cjson",
1948      "c_utils:utils",
1949      "device_auth:deviceauth_sdk",
1950      "googletest:gmock",
1951      "googletest:gtest_main",
1952      "hilog:libhilog",
1953    ]
1954  } else {
1955    external_deps = [
1956      "cJSON:cjson",
1957      "c_utils:utils",
1958      "googletest:gmock",
1959      "googletest:gtest_main",
1960      "hilog:libhilog",
1961    ]
1962  }
1963}
1964
1965ohos_unittest("LNNDataCloudSyncMockTest") {
1966  module_out_path = module_output_path
1967  sources = [
1968    "net_builder/src/lnn_data_cloud_sync_deps_mock.cpp",
1969    "net_builder/src/lnn_data_cloud_sync_mock_test.cpp",
1970    "net_builder/src/lnn_kv_adapter_wrapper_mock.cpp",
1971    "net_builder/src/lnn_net_ledger_mock.cpp",
1972  ]
1973
1974  include_dirs = [
1975    "$dsoftbus_root_path/core/authentication/interface",
1976    "unittest/common/",
1977    "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include",
1978    "$dsoftbus_root_path/core/adapter/bus_center/include",
1979    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1980    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1981    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src",
1982    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1983    "$dsoftbus_root_path/core/bus_center/interface",
1984    "$dsoftbus_root_path/core/bus_center/utils/include",
1985    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1986    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1987    "$dsoftbus_root_path/core/authentication/include",
1988    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1989    "$dsoftbus_root_path/core/discovery/manager/include",
1990    "$dsoftbus_root_path/core/discovery/interface",
1991    "$dsoftbus_root_path/interfaces/kits/discovery",
1992    "$dsoftbus_root_path/core/bus_center/service/include",
1993  ]
1994
1995  deps = [
1996    "$dsoftbus_root_path/adapter:softbus_adapter",
1997    "$dsoftbus_root_path/core/common:softbus_utils",
1998    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
1999  ]
2000
2001  if (is_standard_system) {
2002    external_deps = [
2003      "cJSON:cjson",
2004      "c_utils:utils",
2005      "device_auth:deviceauth_sdk",
2006      "googletest:gmock",
2007      "googletest:gtest_main",
2008      "hilog:libhilog",
2009    ]
2010    cflags = [ "-Wno-error" ]
2011    cflags_cc = cflags
2012  } else {
2013    external_deps = [
2014      "cJSON:cjson",
2015      "c_utils:utils",
2016      "googletest:gmock",
2017      "googletest:gtest_main",
2018      "hilog:libhilog",
2019    ]
2020  }
2021}
2022
2023ohos_unittest("LNNLaneLinkWifiDirectTest") {
2024  module_out_path = module_output_path
2025  sources = [
2026    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_wifi_direct.c",
2027    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_vap_info_virtual.c",
2028    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_ptk_info_virtual.c",
2029    "$dsoftbus_root_path/core/bus_center/service/src/bus_center_manager.c",
2030    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/src/lnn_lane_deps_mock.cpp",
2031    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_deps_mock.cpp",
2032    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane_link/lnn_lane_link_wifi_direct_test.cpp",
2033    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_async_callback_mock.cpp",
2034  ]
2035
2036  if (dsoftbus_feature_conn_p2p && softbus_communication_wifi_feature) {
2037    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p.c" ]
2038  } else {
2039    sources += [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_p2p_virtual.c" ]
2040  }
2041
2042  include_dirs = [
2043    "$dsoftbus_root_path/adapter/common/include",
2044    "$dsoftbus_root_path/adapter/common/net/wifi/include",
2045    "$dsoftbus_root_path/core/authentication/include",
2046    "$dsoftbus_root_path/core/authentication/interface",
2047    "$dsoftbus_root_path/core/adapter/bus_center/include",
2048    "$dsoftbus_root_path/core/bus_center/interface",
2049    "$dsoftbus_root_path/core/bus_center/lnn/decision_center/include",
2050    "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include",
2051    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/common/include",
2052    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
2053    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
2054    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
2055    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
2056    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
2057    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
2058    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
2059    "$dsoftbus_root_path/core/bus_center/monitor/include",
2060    "$dsoftbus_root_path/core/bus_center/service/include",
2061    "$dsoftbus_root_path/core/bus_center/utils/include",
2062    "$dsoftbus_root_path/core/common/dfx/interface/include",
2063    "$dsoftbus_root_path/core/common/include",
2064    "$dsoftbus_root_path/core/connection/ble/include",
2065    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
2066    "$dsoftbus_root_path/core/discovery/interface",
2067    "$dsoftbus_root_path/core/discovery/manager/include",
2068    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
2069    "$dsoftbus_root_path/interfaces/kits/bus_center",
2070    "$dsoftbus_root_path/interfaces/kits/common",
2071    "$dsoftbus_root_path/interfaces/kits/discovery",
2072    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
2073    "$dsoftbus_root_path/core/adapter/bus_center/include",
2074    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
2075  ]
2076
2077  deps = [
2078    "$dsoftbus_root_path/adapter:softbus_adapter",
2079    "$dsoftbus_root_path/core/common:softbus_utils",
2080    "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log",
2081  ]
2082
2083  if (is_standard_system) {
2084    external_deps = [
2085      "c_utils:utils",
2086      "device_auth:deviceauth_sdk",
2087      "googletest:gmock",
2088      "googletest:gtest_main",
2089      "hilog:libhilog",
2090    ]
2091  } else {
2092    external_deps = [
2093      "c_utils:utils",
2094      "googletest:gmock",
2095      "googletest:gtest_main",
2096      "hilog:libhilog",
2097    ]
2098  }
2099}
2100
2101group("unittest") {
2102  testonly = true
2103  deps = [
2104    ":LNNBatteryInfoTest",
2105    ":LNNBtNetworkImplMockTest",
2106    ":LNNConnectionFsmMockTest",
2107    ":LNNConnectionFsmTest",
2108    ":LNNDataCloudSyncMockTest",
2109    ":LNNDataCloudSyncTest",
2110    ":LNNDeviceNameInfoTest",
2111    ":LNNDiscoveryInterfaceTest",
2112    ":LNNDisctributedLedgerTest",
2113    ":LNNHuksUtilsTest",
2114    ":LNNIpNetworkImplMockTest",
2115    ":LNNLaneLinkTest",
2116    ":LNNLaneLinkWifiDirectTest",
2117    ":LNNLaneListenerTest",
2118    ":LNNLaneMockTest",
2119    ":LNNLaneQueryTest",
2120    ":LNNLedgerMockTest",
2121    ":LNNMetaNodeLedgerTest",
2122    ":LNNNetBuilderMockTest",
2123    ":LNNNetBuilderTest",
2124    ":LNNNetLedgerCommonTest",
2125    ":LNNNetworkInfoTest",
2126    ":LNNNetworkManagerMockTest",
2127    ":LNNNodeWeightTest",
2128    ":LNNP2pInfoTest",
2129    ":LNNSyncInfoItemTest",
2130    ":LNNSyncInfoManagerTest",
2131    ":LNNTopoManagerTest",
2132    ":LNNTransLaneMockTest",
2133    ":LaneTest",
2134    ":LedgerLaneHubTest",
2135    ":NetBuilderTest",
2136    ":NetLedgerTest",
2137  ]
2138  if (!defined(ohos_lite) && enhanced_test) {
2139    deps += [ ":LNNDbMockTest" ]
2140  }
2141  if (enhanced_test) {
2142    deps += [
2143      "$dsoftbus_root_path/dsoftbus_enhance/test/core/authentication:unittest",
2144      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/decision_center:unittest",
2145      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/heartbeat:unittest",
2146      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_channel_rating:unittest",
2147      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_qos:unittest",
2148      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_stastic:unittest",
2149      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_vap:unittest",
2150      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/time_sync:unittest",
2151      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/meta_node:unittest",
2152      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/net_builder/cipherkey:unittest",
2153      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/net_builder/fast_offline:unittest",
2154      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/unittest:unittest",
2155      "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/test:unittest",
2156      "$dsoftbus_root_path/dsoftbus_enhance/test/sdk/bus_center:unittest",
2157    ]
2158  }
2159}
2160
2161group("fuzztest") {
2162  testonly = true
2163  deps = [ "fuzztest:fuzztest" ]
2164  if (enhanced_test) {
2165    deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/fuzztest/lnnfastoffline_fuzzer:fuzztest" ]
2166  }
2167}
2168