• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/test.gni")
15import("../../../core/authentication/authentication.gni")
16import("../../../dsoftbus.gni")
17import("unittest/authmanager.gni")
18
19module_output_path = "dsoftbus/auth"
20
21ohos_unittest("AuthTest") {
22  module_out_path = module_output_path
23  sources = [
24    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
25    "unittest/auth_test.cpp",
26  ]
27
28  include_dirs = [
29    "$dsoftbus_root_path/core/authentication/include",
30    "$dsoftbus_root_path/core/authentication/interface",
31    "$dsoftbus_root_path/core/bus_center/interface",
32    "$dsoftbus_root_path/core/bus_center/service/include",
33    "$dsoftbus_root_path/core/bus_center/utils/include",
34    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
35    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
36    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
37    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
38    "$dsoftbus_root_path/core/common/include",
39    "$dsoftbus_root_path/core/common/message_handler/include",
40    "$dsoftbus_root_path/core/connection/interface",
41    "$dsoftbus_root_path/core/frame/$os_type/init/include",
42    "$dsoftbus_root_path/core/frame/common/include",
43    "$dsoftbus_root_path/interfaces/kits/bus_center",
44    "$dsoftbus_root_path/interfaces/kits/common",
45    "$dsoftbus_root_path/core/connection/manager",
46    "$dsoftbus_root_path/adapter/common/include/",
47    "$dsoftbus_root_path/tests/sdk/common/include",
48    "unittest/common/",
49    "$dsoftbus_root_path/core/authentication/src",
50    "$dsoftbus_root_path/core/discovery/manager/include",
51    "$dsoftbus_root_path/core/discovery/interface",
52    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
53    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
54    "$dsoftbus_root_path/core/adapter/bus_center/include",
55    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
56    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
57    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
58    "$dsoftbus_root_path/core/bus_center/monitor/include",
59  ]
60
61  deps = [
62    "$dsoftbus_root_path/core/common:softbus_utils",
63    "$dsoftbus_root_path/core/frame:softbus_server",
64    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
65  ]
66
67  if (is_standard_system) {
68    external_deps = [
69      "bounds_checking_function:libsec_shared",
70      "cJSON:cjson",
71      "c_utils:utils",
72      "device_auth:deviceauth_sdk",
73      "dsoftbus:softbus_client",
74      "googletest:gtest_main",
75      "hilog:libhilog",
76    ]
77  } else {
78    external_deps = [
79      "bounds_checking_function:libsec_shared",
80      "cJSON:cjson",
81      "c_utils:utils",
82      "dsoftbus:softbus_client",
83      "googletest:gtest_main",
84      "hilog:libhilog",
85    ]
86  }
87}
88
89ohos_unittest("AuthEnhanceMockTest") {
90  module_out_path = module_output_path
91  sanitize = {
92    cfi = true
93    cfi_cross_dso = true
94    debug = false
95  }
96  sources = [
97    "$dsoftbus_root_path/core/adapter/authentication/src/lnn_extdata_config_virtual.c",
98    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp",
99    "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp",
100    "$dsoftbus_root_path/core/authentication/bind/auth_device_profile_listener_virtual.cpp",
101    "$dsoftbus_root_path/core/authentication/src/auth_common.c",
102    "$dsoftbus_root_path/core/authentication/src/auth_connection.c",
103    "$dsoftbus_root_path/core/authentication/src/auth_device.c",
104    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
105    "$dsoftbus_root_path/core/authentication/src/auth_hichain.c",
106    "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c",
107    "$dsoftbus_root_path/core/authentication/src/auth_interface.c",
108    "$dsoftbus_root_path/core/authentication/src/auth_lane.c",
109    "$dsoftbus_root_path/core/authentication/src/auth_manager.c",
110    "$dsoftbus_root_path/core/authentication/src/auth_normalize_request.c",
111    "$dsoftbus_root_path/core/authentication/src/auth_pre_link.c",
112    "$dsoftbus_root_path/core/authentication/src/auth_request.c",
113    "$dsoftbus_root_path/core/authentication/src/auth_session_fsm.c",
114    "$dsoftbus_root_path/core/authentication/src/auth_session_json.c",
115    "$dsoftbus_root_path/core/authentication/src/auth_session_key.c",
116    "$dsoftbus_root_path/core/authentication/src/auth_session_message.c",
117    "$dsoftbus_root_path/core/authentication/src/auth_tcp_connection.c",
118    "$dsoftbus_root_path/core/authentication/src/virtual/auth_attest_virtual.c",
119    "$dsoftbus_root_path/core/authentication/src/virtual/auth_device_common_key_virtual.c",
120    "$dsoftbus_root_path/core/authentication/src/virtual/auth_hichain_system_ability_monitor_virtual.c",
121    "$dsoftbus_root_path/core/authentication/src/virtual/auth_meta_manager_virtual.c",
122    "$dsoftbus_root_path/core/authentication/src/virtual/customized_security_protocol_virtual.c",
123    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c",
124    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c",
125    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_device_info_recovery_virtual.c",
126    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_ptk_info_virtual.c",
127    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_feature_capability.c",
128    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
129    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_compress_virtual.c",
130    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c",
131    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
132    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp",
133    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_socket_mock.cpp",
134    "unittest/auth_common_mock.cpp",
135    "unittest/auth_net_ledger_mock.cpp",
136    "unittest/auth_test_enhance.cpp",
137  ]
138
139  if (!enhanced) {
140    sources += [ "$dsoftbus_root_path/core/connection/wifi_direct_cpp/wifi_direct_manager_virtual.c" ]
141  }
142
143  include_dirs = [
144    "$dsoftbus_dfx_path/interface/include",
145    "$dsoftbus_root_path/adapter/common/include",
146    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
147    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
148    "$dsoftbus_root_path/core/authentication/include",
149    "$dsoftbus_root_path/core/authentication/interface",
150    "$dsoftbus_root_path/core/bus_center/interface",
151    "$dsoftbus_root_path/core/bus_center/utils/include",
152    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
153    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
154    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
155    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
156    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
157    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
158    "$dsoftbus_root_path/core/bus_center/monitor/include",
159    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
160    "$dsoftbus_root_path/core/common/include",
161    "$dsoftbus_root_path/core/common/message_handler/include",
162    "$dsoftbus_root_path/core/connection/interface",
163    "$dsoftbus_root_path/core/connection/p2p/interface",
164    "$dsoftbus_root_path/core/connection/p2p/common/include",
165    "$dsoftbus_root_path/core/frame/$os_type/init/include",
166    "$dsoftbus_root_path/core/frame/common/include",
167    "$dsoftbus_root_path/core/discovery/manager/include",
168    "$dsoftbus_root_path/core/discovery/interface",
169    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
170    "$dsoftbus_root_path/interfaces/kits/bus_center",
171    "$dsoftbus_root_path/interfaces/kits/discovery",
172    "$dsoftbus_root_path/interfaces/kits/common",
173    "$dsoftbus_root_path/core/connection/manager",
174    "$dsoftbus_root_path/adapter/common/include/",
175    "$dsoftbus_root_path/tests/sdk/common/include",
176    "unittest/common/",
177    "$dsoftbus_root_path/core/authentication/src",
178    "$dsoftbus_root_path/core/discovery/manager/include",
179    "$dsoftbus_root_path/core/discovery/interface",
180    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
181    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
182    "$dsoftbus_root_path/core/adapter/bus_center/include",
183    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
184    "$dsoftbus_root_path/core/adapter/authentication/include",
185    "$dsoftbus_root_path/core/bus_center/service/include",
186    "$dsoftbus_root_path/core/connection/ble/include",
187    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
188    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
189    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
190    "$dsoftbus_root_path/tests/core/bus_center/lnn/lane/include",
191    "$dsoftbus_root_path/core/bus_center/monitor/include",
192  ]
193
194  deps = [
195    "$dsoftbus_dfx_path:softbus_dfx",
196    "$dsoftbus_root_path/adapter:softbus_adapter",
197    "$dsoftbus_root_path/core/common:softbus_utils",
198    "$dsoftbus_root_path/core/frame:softbus_server",
199    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
200  ]
201
202  if (is_standard_system) {
203    external_deps = [
204      "bounds_checking_function:libsec_shared",
205      "cJSON:cjson",
206      "c_utils:utils",
207      "device_auth:deviceauth_sdk",
208      "googletest:gmock",
209      "googletest:gtest_main",
210      "hilog:libhilog",
211    ]
212  } else {
213    external_deps = [
214      "bounds_checking_function:libsec_shared",
215      "cJSON:cjson",
216      "c_utils:utils",
217      "googletest:gmock",
218      "googletest:gtest_main",
219      "hilog:libhilog",
220    ]
221  }
222}
223
224ohos_unittest("AuthTestCallBackTest") {
225  module_out_path = module_output_path
226  sources = [
227    "$dsoftbus_root_path/core/adapter/authentication/src/lnn_extdata_config_virtual.c",
228    "$dsoftbus_root_path/core/authentication/src/auth_common.c",
229    "$dsoftbus_root_path/core/authentication/src/auth_connection.c",
230    "$dsoftbus_root_path/core/authentication/src/auth_device.c",
231    "$dsoftbus_root_path/core/authentication/src/auth_deviceprofile_virtual.cpp",
232    "$dsoftbus_root_path/core/authentication/src/auth_hichain.c",
233    "$dsoftbus_root_path/core/authentication/src/auth_hichain_adapter.c",
234    "$dsoftbus_root_path/core/authentication/src/auth_interface.c",
235    "$dsoftbus_root_path/core/authentication/src/auth_lane.c",
236    "$dsoftbus_root_path/core/authentication/src/auth_manager.c",
237    "$dsoftbus_root_path/core/authentication/src/auth_request.c",
238    "$dsoftbus_root_path/core/authentication/src/auth_session_fsm.c",
239    "$dsoftbus_root_path/core/authentication/src/auth_session_json.c",
240    "$dsoftbus_root_path/core/authentication/src/auth_session_key.c",
241    "$dsoftbus_root_path/core/authentication/src/auth_session_message.c",
242    "$dsoftbus_root_path/core/authentication/src/auth_tcp_connection.c",
243    "$dsoftbus_root_path/core/authentication/src/virtual/auth_device_common_key_virtual.c",
244    "$dsoftbus_root_path/core/authentication/src/virtual/auth_meta_manager_virtual.c",
245    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_cipherkey_manager_virtual.c",
246    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_device_info_recovery_virtual.c",
247    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_feature_capability.c",
248    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
249    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_compress_virtual.c",
250    "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c",
251    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp",
252    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_socket_mock.cpp",
253    "unittest/auth_common_mock.cpp",
254    "unittest/auth_net_ledger_mock.cpp",
255    "unittest/auth_test_mock.cpp",
256  ]
257
258  include_dirs = [
259    "$dsoftbus_root_path/adapter/common/include",
260    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
261    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
262    "$dsoftbus_root_path/core/authentication/include",
263    "$dsoftbus_root_path/core/authentication/interface",
264    "$dsoftbus_root_path/core/bus_center/interface",
265    "$dsoftbus_root_path/core/bus_center/utils/include",
266    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
267    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
268    "$dsoftbus_root_path/core/bus_center/monitor/include",
269    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
270    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
271    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
272    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
273    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
274    "$dsoftbus_root_path/core/common/include",
275    "$dsoftbus_root_path/core/common/message_handler/include",
276    "$dsoftbus_root_path/core/connection/interface",
277    "$dsoftbus_root_path/core/connection/p2p/interface",
278    "$dsoftbus_root_path/core/connection/p2p/common/include",
279    "$dsoftbus_root_path/core/frame/$os_type/init/include",
280    "$dsoftbus_root_path/core/frame/common/include",
281    "$dsoftbus_root_path/core/discovery/manager/include",
282    "$dsoftbus_root_path/core/discovery/interface",
283    "$dsoftbus_root_path/interfaces/inner_kits/transport",
284    "$dsoftbus_root_path/interfaces/kits/bus_center",
285    "$dsoftbus_root_path/interfaces/kits/discovery",
286    "$dsoftbus_root_path/interfaces/kits/common",
287    "$dsoftbus_root_path/core/connection/manager",
288    "$dsoftbus_root_path/adapter/common/include/",
289    "$dsoftbus_root_path/tests/sdk/common/include",
290    "unittest/common/",
291    "$dsoftbus_root_path/core/authentication/src",
292    "$dsoftbus_root_path/core/discovery/manager/include",
293    "$dsoftbus_root_path/core/discovery/interface",
294    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
295    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
296    "$dsoftbus_root_path/core/adapter/bus_center/include",
297    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
298    "$dsoftbus_root_path/core/bus_center/service/include",
299    "$dsoftbus_root_path/core/adapter/authentication/include",
300    "$dsoftbus_root_path/core/connection/ble/include",
301    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
302    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
303    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
304    "$dsoftbus_root_path/core/bus_center/monitor/include",
305  ]
306
307  deps = [
308    "$dsoftbus_root_path/adapter:softbus_adapter",
309    "$dsoftbus_root_path/core/common:softbus_utils",
310    "$dsoftbus_root_path/core/frame:softbus_server",
311    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
312  ]
313  if (is_standard_system) {
314    external_deps = [
315      "bounds_checking_function:libsec_shared",
316      "cJSON:cjson",
317      "c_utils:utils",
318      "device_auth:deviceauth_sdk",
319      "dsoftbus:softbus_client",
320      "googletest:gmock",
321      "googletest:gtest_main",
322      "hilog:libhilog",
323    ]
324  } else {
325    external_deps = [
326      "bounds_checking_function:libsec_shared",
327      "cJSON:cjson",
328      "c_utils:utils",
329      "dsoftbus:softbus_client",
330      "googletest:gmock",
331      "googletest:gtest_main",
332      "hilog:libhilog",
333    ]
334  }
335}
336
337ohos_unittest("AuthOtherMockTest") {
338  module_out_path = module_output_path
339  sources = [
340    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
341    "unittest/auth_interface_mock.cpp",
342    "unittest/auth_interface_test.cpp",
343  ]
344
345  include_dirs = [
346    "$dsoftbus_root_path/core/authentication/include",
347    "$dsoftbus_root_path/core/authentication/interface",
348    "$dsoftbus_root_path/core/bus_center/interface",
349    "$dsoftbus_root_path/core/bus_center/utils/include",
350    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
351    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
352    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
353    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
354    "$dsoftbus_root_path/core/common/include",
355    "$dsoftbus_root_path/core/common/message_handler/include",
356    "$dsoftbus_root_path/core/connection/interface",
357    "$dsoftbus_root_path/core/bus_center/monitor/include",
358    "$dsoftbus_root_path/core/frame/$os_type/init/include",
359    "$dsoftbus_root_path/core/bus_center/monitor/include",
360    "$dsoftbus_root_path/core/frame/common/include",
361    "$dsoftbus_root_path/interfaces/kits/bus_center",
362    "$dsoftbus_root_path/interfaces/kits/common",
363    "$dsoftbus_root_path/core/connection/manager",
364    "$dsoftbus_root_path/adapter/common/include/",
365    "$dsoftbus_root_path/tests/sdk/common/include",
366    "unittest/common/",
367    "$dsoftbus_root_path/core/authentication/src",
368    "$dsoftbus_root_path/core/authentication/include",
369    "$dsoftbus_root_path/core/discovery/manager/include",
370    "$dsoftbus_root_path/core/discovery/interface",
371    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
372    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
373    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
374    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
375    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
376    "$dsoftbus_root_path/core/adapter/bus_center/include",
377    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
378    "$dsoftbus_root_path/core/bus_center/service/include",
379    "$dsoftbus_root_path/core/adapter/authentication/include",
380    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
381    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
382    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
383  ]
384
385  deps = [
386    "$dsoftbus_root_path/core/common:softbus_utils",
387    "$dsoftbus_root_path/core/frame:softbus_server",
388    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
389  ]
390
391  if (is_standard_system) {
392    external_deps = [
393      "bounds_checking_function:libsec_shared",
394      "cJSON:cjson",
395      "c_utils:utils",
396      "device_auth:deviceauth_sdk",
397      "dsoftbus:softbus_client",
398      "googletest:gmock",
399      "googletest:gtest_main",
400      "hilog:libhilog",
401    ]
402  } else {
403    external_deps = [
404      "bounds_checking_function:libsec_shared",
405      "cJSON:cjson",
406      "c_utils:utils",
407      "dsoftbus:softbus_client",
408      "googletest:gmock",
409      "googletest:gtest_main",
410      "hilog:libhilog",
411    ]
412  }
413}
414
415ohos_unittest("AuthOtherTest") {
416  module_out_path = module_output_path
417  sources = [
418    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
419    "unittest/auth_common_mock.cpp",
420    "unittest/auth_other_test.cpp",
421    "unittest/auth_tcp_connection_mock.cpp",
422  ]
423
424  include_dirs = [
425    "$dsoftbus_root_path/core/authentication/include",
426    "$dsoftbus_root_path/core/authentication/interface",
427    "$dsoftbus_root_path/core/bus_center/interface",
428    "$dsoftbus_root_path/core/bus_center/utils/include",
429    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
430    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
431    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
432    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
433    "$dsoftbus_root_path/core/common/include",
434    "$dsoftbus_root_path/core/common/message_handler/include",
435    "$dsoftbus_root_path/core/connection/interface",
436    "$dsoftbus_root_path/core/frame/$os_type/init/include",
437    "$dsoftbus_root_path/core/frame/common/include",
438    "$dsoftbus_root_path/interfaces/kits/bus_center",
439    "$dsoftbus_root_path/core/bus_center/monitor/include",
440    "$dsoftbus_root_path/interfaces/kits/common",
441    "$dsoftbus_root_path/core/connection/manager",
442    "$dsoftbus_root_path/adapter/common/include/",
443    "$dsoftbus_root_path/tests/sdk/common/include",
444    "unittest/common/",
445    "$dsoftbus_root_path/core/authentication/src",
446    "$dsoftbus_root_path/core/discovery/manager/include",
447    "$dsoftbus_root_path/core/discovery/interface",
448    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
449    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
450    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
451    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
452    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
453    "$dsoftbus_root_path/core/adapter/bus_center/include",
454    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
455    "$dsoftbus_root_path/core/bus_center/service/include",
456    "$dsoftbus_root_path/core/adapter/authentication/include",
457    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
458    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
459    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
460  ]
461
462  deps = [
463    "$dsoftbus_root_path/core/common:softbus_utils",
464    "$dsoftbus_root_path/core/frame:softbus_server",
465    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
466  ]
467
468  if (is_standard_system) {
469    external_deps = [
470      "bounds_checking_function:libsec_shared",
471      "cJSON:cjson",
472      "c_utils:utils",
473      "device_auth:deviceauth_sdk",
474      "dsoftbus:softbus_client",
475      "googletest:gmock",
476      "googletest:gtest_main",
477      "hilog:libhilog",
478    ]
479  } else {
480    external_deps = [
481      "bounds_checking_function:libsec_shared",
482      "cJSON:cjson",
483      "c_utils:utils",
484      "dsoftbus:softbus_client",
485      "googletest:gmock",
486      "googletest:gtest_main",
487      "hilog:libhilog",
488    ]
489  }
490}
491
492ohos_unittest("AuthTcpConnectionTest") {
493  module_out_path = module_output_path
494  sources = [ "unittest/auth_tcp_connection_test.cpp" ]
495
496  include_dirs = [
497    "$dsoftbus_root_path/core/authentication/include",
498    "$dsoftbus_root_path/core/authentication/interface",
499    "$dsoftbus_root_path/core/bus_center/interface",
500    "$dsoftbus_root_path/core/bus_center/utils/include",
501    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
502    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
503    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
504    "$dsoftbus_root_path/core/common/include",
505    "$dsoftbus_root_path/core/common/message_handler/include",
506    "$dsoftbus_root_path/core/connection/interface",
507    "$dsoftbus_root_path/core/frame/$os_type/init/include",
508    "$dsoftbus_root_path/core/frame/common/include",
509    "$dsoftbus_root_path/interfaces/kits/bus_center",
510    "$dsoftbus_root_path/interfaces/kits/common",
511    "$dsoftbus_root_path/core/connection/manager",
512    "$dsoftbus_root_path/adapter/common/include/",
513    "$dsoftbus_root_path/tests/sdk/common/include",
514    "unittest/common/",
515    "$dsoftbus_root_path/core/authentication/src",
516    "$dsoftbus_root_path/core/discovery/manager/include",
517    "$dsoftbus_root_path/core/discovery/interface",
518    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
519    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
520    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
521    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
522    "$dsoftbus_root_path/core/transmission/trans_channel/manager/include",
523  ]
524
525  deps = [
526    "$dsoftbus_root_path/core/common:softbus_utils",
527    "$dsoftbus_root_path/core/frame:softbus_server",
528    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
529  ]
530
531  if (is_standard_system) {
532    external_deps = [
533      "bounds_checking_function:libsec_shared",
534      "cJSON:cjson",
535      "c_utils:utils",
536      "device_auth:deviceauth_sdk",
537      "dsoftbus:softbus_client",
538      "googletest:gtest_main",
539      "hilog:libhilog",
540    ]
541  } else {
542    external_deps = [
543      "bounds_checking_function:libsec_shared",
544      "cJSON:cjson",
545      "c_utils:utils",
546      "dsoftbus:softbus_client",
547      "googletest:gtest_main",
548      "hilog:libhilog",
549    ]
550  }
551}
552
553ohos_unittest("AuthHichainMockTest") {
554  module_out_path = module_output_path
555  sources = [
556    "unittest/auth_hichain_deps_mock.cpp",
557    "unittest/auth_hichain_mock_test.cpp",
558  ]
559
560  include_dirs = [
561    "$dsoftbus_root_path/adapter/common/include/",
562    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
563    "$dsoftbus_root_path/core/adapter/bus_center/include",
564    "$dsoftbus_root_path/core/authentication/include",
565    "$dsoftbus_root_path/core/authentication/interface",
566    "$dsoftbus_root_path/core/authentication/src",
567    "$dsoftbus_root_path/core/bus_center/interface",
568    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
569    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
570    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
571    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
572    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
573    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
574    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
575    "$dsoftbus_root_path/core/bus_center/utils/include",
576    "$dsoftbus_root_path/core/common/include",
577    "$dsoftbus_root_path/core/common/message_handler/include",
578    "$dsoftbus_root_path/core/connection/interface",
579    "$dsoftbus_root_path/core/connection/manager",
580    "$dsoftbus_root_path/core/discovery/interface",
581    "$dsoftbus_root_path/core/discovery/manager/include",
582    "$dsoftbus_root_path/core/frame/$os_type/init/include",
583    "$dsoftbus_root_path/core/frame/common/include",
584    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
585    "$dsoftbus_root_path/interfaces/inner_kits/transport",
586    "$dsoftbus_root_path/interfaces/kits/bus_center",
587    "$dsoftbus_root_path/interfaces/kits/common",
588    "$dsoftbus_root_path/interfaces/kits/discovery",
589    "$dsoftbus_root_path/tests/core/authentication/unittest",
590    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
591    "$dsoftbus_root_path/tests/sdk/common/include",
592    "unittest/common/",
593  ]
594
595  deps = [
596    "$dsoftbus_root_path/core/common:softbus_utils",
597    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
598  ]
599
600  if (is_standard_system) {
601    external_deps = [
602      "bounds_checking_function:libsec_shared",
603      "cJSON:cjson",
604      "c_utils:utils",
605      "device_auth:deviceauth_sdk",
606      "googletest:gmock",
607      "googletest:gtest_main",
608      "hilog:libhilog",
609    ]
610  } else {
611    external_deps = [
612      "bounds_checking_function:libsec_shared",
613      "cJSON:cjson",
614      "c_utils:utils",
615      "googletest:gmock",
616      "googletest:gtest_main",
617      "hilog:libhilog",
618    ]
619  }
620}
621
622ohos_unittest("AuthHichainTest") {
623  module_out_path = module_output_path
624  sources = [
625    "$dsoftbus_root_path/tests/core/authentication/unittest/auth_common_mock.cpp",
626    "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_hichain_mock.cpp",
627    "unittest/auth_hichain_test.cpp",
628    "unittest/auth_net_ledger_mock.cpp",
629  ]
630
631  include_dirs = [
632    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
633    "$dsoftbus_root_path/core/authentication/include",
634    "$dsoftbus_root_path/core/authentication/interface",
635    "$dsoftbus_root_path/tests/core/authentication/unittest",
636    "$dsoftbus_root_path/core/bus_center/interface",
637    "$dsoftbus_root_path/core/bus_center/utils/include",
638    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
639    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
640    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
641    "$dsoftbus_root_path/core/common/include",
642    "$dsoftbus_root_path/core/common/message_handler/include",
643    "$dsoftbus_root_path/core/connection/interface",
644    "$dsoftbus_root_path/core/frame/$os_type/init/include",
645    "$dsoftbus_root_path/core/frame/common/include",
646    "$dsoftbus_root_path/interfaces/inner_kits/transport",
647    "$dsoftbus_root_path/interfaces/kits/bus_center",
648    "$dsoftbus_root_path/interfaces/kits/common",
649    "$dsoftbus_root_path/interfaces/kits/discovery",
650    "$dsoftbus_root_path/core/connection/manager",
651    "$dsoftbus_root_path/adapter/common/include/",
652    "$dsoftbus_root_path/tests/sdk/common/include",
653    "unittest/common/",
654    "$dsoftbus_root_path/core/authentication/src",
655    "$dsoftbus_root_path/core/discovery/manager/include",
656    "$dsoftbus_root_path/core/discovery/interface",
657    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
658    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
659    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
660    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
661    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
662    "$dsoftbus_root_path/core/adapter/bus_center/include",
663  ]
664
665  deps = [
666    "$dsoftbus_root_path/core/common:softbus_utils",
667    "$dsoftbus_root_path/core/frame:softbus_server",
668    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
669  ]
670
671  if (is_standard_system) {
672    external_deps = [
673      "bounds_checking_function:libsec_shared",
674      "cJSON:cjson",
675      "c_utils:utils",
676      "device_auth:deviceauth_sdk",
677      "dsoftbus:softbus_client",
678      "googletest:gmock",
679      "googletest:gtest_main",
680      "hilog:libhilog",
681    ]
682  } else {
683    external_deps = [
684      "bounds_checking_function:libsec_shared",
685      "cJSON:cjson",
686      "c_utils:utils",
687      "dsoftbus:softbus_client",
688      "googletest:gmock",
689      "googletest:gtest_main",
690      "hilog:libhilog",
691    ]
692  }
693}
694
695ohos_unittest("AuthDeviceProfileTest") {
696  module_out_path = module_output_path
697  sources = [ "unittest/auth_device_profile_test.cpp" ]
698
699  include_dirs = [
700    "$dsoftbus_root_path/interfaces/kits",
701    "$dsoftbus_root_path/core/authentication/interface",
702    "$dsoftbus_root_path/core/authentication/include",
703    "unittest/common/",
704  ]
705
706  deps = [
707    "$dsoftbus_root_path/core/common:softbus_utils",
708    "$dsoftbus_root_path/core/frame:softbus_server",
709  ]
710
711  if (!defined(global_parts_info) ||
712      defined(global_parts_info.deviceprofile_device_info_manager)) {
713    external_deps = [
714      "bounds_checking_function:libsec_shared",
715      "cJSON:cjson",
716      "c_utils:utils",
717      "device_auth:deviceauth_sdk",
718      "device_info_manager:distributed_device_profile_common",
719      "device_info_manager:distributed_device_profile_sdk",
720      "googletest:gmock",
721      "googletest:gtest_main",
722      "hilog:libhilog",
723      "ipc:ipc_core",
724      "samgr:samgr_proxy",
725    ]
726  } else {
727    external_deps = [
728      "bounds_checking_function:libsec_shared",
729      "cJSON:cjson",
730      "c_utils:utils",
731      "googletest:gmock",
732      "googletest:gtest_main",
733      "hilog:libhilog",
734      "ipc:ipc_core",
735    ]
736  }
737}
738
739ohos_unittest("AuthSessionMessageTest") {
740  module_out_path = module_output_path
741  sources = [ "unittest/auth_session_message_test.cpp" ]
742
743  include_dirs = [
744    "$dsoftbus_root_path/core/authentication/include",
745    "$dsoftbus_root_path/core/authentication/interface",
746    "$dsoftbus_root_path/core/bus_center/interface",
747    "$dsoftbus_root_path/core/bus_center/utils/include",
748    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
749    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
750    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
751    "$dsoftbus_root_path/core/common/include",
752    "$dsoftbus_root_path/core/common/message_handler/include",
753    "$dsoftbus_root_path/core/connection/interface",
754    "$dsoftbus_root_path/core/frame/$os_type/init/include",
755    "$dsoftbus_root_path/core/frame/common/include",
756    "$dsoftbus_root_path/interfaces/kits/bus_center",
757    "$dsoftbus_root_path/interfaces/kits/common",
758    "$dsoftbus_root_path/core/connection/manager",
759    "$dsoftbus_root_path/adapter/common/include/",
760    "$dsoftbus_root_path/tests/sdk/common/include",
761    "unittest/common/",
762    "$dsoftbus_root_path/core/authentication/src",
763    "$dsoftbus_root_path/core/discovery/manager/include",
764    "$dsoftbus_root_path/core/discovery/interface",
765    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
766    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
767    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
768    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
769    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
770    "$dsoftbus_root_path/core/adapter/bus_center/include",
771    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
772    "$dsoftbus_root_path/core/bus_center/service/include",
773    "$dsoftbus_root_path/core/adapter/authentication/include",
774    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
775  ]
776
777  deps = [
778    "$dsoftbus_root_path/core/common:softbus_utils",
779    "$dsoftbus_root_path/core/frame:softbus_server",
780    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
781  ]
782
783  if (is_standard_system) {
784    external_deps = [
785      "bounds_checking_function:libsec_shared",
786      "cJSON:cjson",
787      "c_utils:utils",
788      "device_auth:deviceauth_sdk",
789      "dsoftbus:softbus_client",
790      "googletest:gtest_main",
791      "hilog:libhilog",
792    ]
793  } else {
794    external_deps = [
795      "bounds_checking_function:libsec_shared",
796      "cJSON:cjson",
797      "c_utils:utils",
798      "dsoftbus:softbus_client",
799      "googletest:gtest_main",
800      "hilog:libhilog",
801    ]
802  }
803}
804
805ohos_unittest("AuthManagerTest") {
806  module_out_path = module_output_path
807  sources = auth_manager_source
808
809  include_dirs = auth_manager_include
810
811  deps = [
812    "$dsoftbus_root_path/core/common:softbus_utils",
813    "$dsoftbus_root_path/core/frame:softbus_server",
814    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
815  ]
816
817  if (is_standard_system) {
818    external_deps = [
819      "bounds_checking_function:libsec_shared",
820      "cJSON:cjson",
821      "c_utils:utils",
822      "device_auth:deviceauth_sdk",
823      "dsoftbus:softbus_client",
824      "googletest:gmock",
825      "googletest:gtest_main",
826      "hilog:libhilog",
827    ]
828  } else {
829    external_deps = [
830      "bounds_checking_function:libsec_shared",
831      "cJSON:cjson",
832      "c_utils:utils",
833      "device_auth:deviceauth_sdk",
834      "dsoftbus:softbus_client",
835      "googletest:gmock",
836      "googletest:gtest_main",
837      "hilog:libhilog",
838    ]
839  }
840}
841
842ohos_unittest("AuthSessionFsmTest") {
843  module_out_path = module_output_path
844  sources = [
845    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock/ble_mock.cpp",
846    "unittest/auth_session_fsm_test.cpp",
847  ]
848
849  include_dirs = [
850    "$dsoftbus_root_path/core/authentication/include",
851    "$dsoftbus_root_path/core/authentication/interface",
852    "$dsoftbus_root_path/core/bus_center/interface",
853    "$dsoftbus_root_path/core/bus_center/utils/include",
854    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
855    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
856    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
857    "$dsoftbus_root_path/core/common/include",
858    "$dsoftbus_root_path/core/common/message_handler/include",
859    "$dsoftbus_root_path/core/connection/interface",
860    "$dsoftbus_root_path/core/frame/$os_type/init/include",
861    "$dsoftbus_root_path/core/frame/common/include",
862    "$dsoftbus_root_path/interfaces/kits/bus_center",
863    "$dsoftbus_root_path/interfaces/kits/common",
864    "$dsoftbus_root_path/core/connection/manager",
865    "$dsoftbus_root_path/adapter/common/include/",
866    "$dsoftbus_root_path/tests/sdk/common/include",
867    "unittest/common/",
868    "$dsoftbus_root_path/core/authentication/src",
869    "$dsoftbus_root_path/core/discovery/manager/include",
870    "$dsoftbus_root_path/core/discovery/interface",
871    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
872    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
873    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
874    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
875    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
876    "$dsoftbus_root_path/core/adapter/bus_center/include",
877    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
878    "$dsoftbus_root_path/core/bus_center/service/include",
879    "$dsoftbus_root_path/core/adapter/authentication/include",
880    "$dsoftbus_root_path/tests/core/discovery/ble/softbus_ble_mock",
881    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include",
882    "$dsoftbus_root_path/adapter/common/net/bluetooth/broadcast/interface",
883    "$dsoftbus_root_path/core/broadcast/common/include",
884    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
885  ]
886
887  deps = [
888    "$dsoftbus_root_path/core/common:softbus_utils",
889    "$dsoftbus_root_path/core/frame:softbus_server",
890    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
891  ]
892
893  if (is_standard_system) {
894    external_deps = [
895      "bounds_checking_function:libsec_shared",
896      "cJSON:cjson",
897      "c_utils:utils",
898      "device_auth:deviceauth_sdk",
899      "dsoftbus:softbus_client",
900      "googletest:gmock",
901      "googletest:gtest_main",
902      "hilog:libhilog",
903    ]
904  } else {
905    external_deps = [
906      "bounds_checking_function:libsec_shared",
907      "cJSON:cjson",
908      "c_utils:utils",
909      "dsoftbus:softbus_client",
910      "googletest:gmock",
911      "googletest:gtest_main",
912      "hilog:libhilog",
913    ]
914  }
915}
916
917ohos_unittest("AuthSessionKeyTest") {
918  module_out_path = module_output_path
919  sources = [ "unittest/auth_session_key_test.cpp" ]
920
921  include_dirs = [
922    "$dsoftbus_root_path/core/authentication/include",
923    "$dsoftbus_root_path/core/authentication/interface",
924    "$dsoftbus_root_path/core/bus_center/interface",
925    "$dsoftbus_root_path/core/bus_center/utils/include",
926    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
927    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
928    "$dsoftbus_root_path/interfaces/kits/bus_center",
929    "$dsoftbus_root_path/interfaces/kits/common",
930    "unittest/common/",
931    "$dsoftbus_root_path/core/authentication/src",
932    "$dsoftbus_root_path/core/adapter/bus_center/include",
933  ]
934
935  deps = [
936    "$dsoftbus_root_path/core/common:softbus_utils",
937    "$dsoftbus_root_path/core/frame:softbus_server",
938    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
939  ]
940
941  if (is_standard_system) {
942    external_deps = [
943      "bounds_checking_function:libsec_shared",
944      "c_utils:utils",
945      "device_auth:deviceauth_sdk",
946      "googletest:gtest_main",
947      "hilog:libhilog",
948    ]
949  } else {
950    external_deps = [
951      "bounds_checking_function:libsec_shared",
952      "c_utils:utils",
953      "googletest:gtest_main",
954      "hilog:libhilog",
955    ]
956  }
957}
958
959ohos_unittest("AuthNormalizeRequestTest") {
960  module_out_path = module_output_path
961  sources = [ "unittest/auth_normalize_request_test.cpp" ]
962
963  include_dirs = [
964    "$dsoftbus_root_path/core/authentication/include",
965    "$dsoftbus_root_path/core/authentication/interface",
966    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
967    "$dsoftbus_root_path/core/bus_center/interface",
968    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
969    "$dsoftbus_root_path/core/bus_center/utils/include",
970  ]
971
972  deps = [
973    "$dsoftbus_root_path/core/common:softbus_utils",
974    "$dsoftbus_root_path/core/frame:softbus_server",
975    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
976  ]
977
978  if (is_standard_system) {
979    external_deps = [
980      "bounds_checking_function:libsec_shared",
981      "cJSON:cjson",
982      "c_utils:utils",
983      "device_auth:deviceauth_sdk",
984      "dsoftbus:softbus_client",
985      "googletest:gtest_main",
986      "hilog:libhilog",
987    ]
988  } else {
989    external_deps = [
990      "bounds_checking_function:libsec_shared",
991      "cJSON:cjson",
992      "c_utils:utils",
993      "dsoftbus:softbus_client",
994      "googletest:gtest_main",
995      "hilog:libhilog",
996    ]
997  }
998}
999
1000ohos_unittest("AuthLaneTest") {
1001  module_out_path = module_output_path
1002  sources = [
1003    "$dsoftbus_root_path/core/bus_center/monitor/src/lnn_init_monitor.c",
1004    "unittest/auth_lane_mock.cpp",
1005    "unittest/auth_lane_test.cpp",
1006  ]
1007
1008  include_dirs = [
1009    "$dsoftbus_root_path/adapter/common/include/",
1010    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1011    "$dsoftbus_root_path/core/adapter/authentication/include",
1012    "$dsoftbus_root_path/core/adapter/bus_center/include",
1013    "$dsoftbus_root_path/core/authentication/include",
1014    "$dsoftbus_root_path/core/authentication/interface",
1015    "$dsoftbus_root_path/core/authentication/src",
1016    "$dsoftbus_root_path/core/bus_center/interface",
1017    "$dsoftbus_root_path/core/bus_center/ipc/include",
1018    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1019    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src",
1020    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1021    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1022    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1023    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1024    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1025    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1026    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1027    "$dsoftbus_root_path/core/bus_center/lnn/meta_node/include",
1028    "$dsoftbus_root_path/core/bus_center/monitor/include",
1029    "$dsoftbus_root_path/core/bus_center/service/include",
1030    "$dsoftbus_root_path/core/bus_center/utils/include",
1031    "$dsoftbus_root_path/core/common/include",
1032    "$dsoftbus_root_path/core/common/message_handler/include",
1033    "$dsoftbus_root_path/core/connection/interface",
1034    "$dsoftbus_root_path/core/connection/manager",
1035    "$dsoftbus_root_path/core/connection/wifi_direct_cpp/utils",
1036    "$dsoftbus_root_path/core/connection/wifi_direct_cpp",
1037    "$dsoftbus_root_path/core/discovery/interface",
1038    "$dsoftbus_root_path/core/discovery/manager/include",
1039    "$dsoftbus_root_path/core/frame/common/include",
1040    "$dsoftbus_root_path/core/bus_center/monitor/include",
1041    "$dsoftbus_root_path/interfaces/kits/bus_center",
1042    "$dsoftbus_root_path/interfaces/kits/common",
1043    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
1044    "$dsoftbus_root_path/tests/sdk/common/include",
1045    "unittest/common/",
1046  ]
1047
1048  deps = [
1049    "$dsoftbus_root_path/core/common:softbus_utils",
1050    "$dsoftbus_root_path/core/frame:softbus_server",
1051  ]
1052
1053  if (is_standard_system) {
1054    external_deps = [
1055      "bounds_checking_function:libsec_shared",
1056      "cJSON:cjson",
1057      "c_utils:utils",
1058      "device_auth:deviceauth_sdk",
1059      "dsoftbus:softbus_client",
1060      "googletest:gmock",
1061      "googletest:gtest_main",
1062      "hilog:libhilog",
1063    ]
1064  } else {
1065    external_deps = [
1066      "bounds_checking_function:libsec_shared",
1067      "cJSON:cjson",
1068      "c_utils:utils",
1069      "dsoftbus:softbus_client",
1070      "googletest:gmock",
1071      "googletest:gtest_main",
1072      "hilog:libhilog",
1073    ]
1074  }
1075}
1076
1077ohos_unittest("AuthDeviceProfileListenerTest") {
1078  module_out_path = module_output_path
1079  sources = [
1080    "$dsoftbus_root_path/core/authentication/bind/auth_device_profile_listener.cpp",
1081    "unittest/auth_device_profile_listener_mock.cpp",
1082    "unittest/auth_device_profile_listener_test.cpp",
1083  ]
1084
1085  include_dirs = [
1086    "$dsoftbus_root_path/core/authentication/interface",
1087    "$dsoftbus_root_path/core/authentication/include",
1088    "$dsoftbus_root_path/core/adapter/bus_center/include",
1089    "$dsoftbus_root_path/core/bus_center/interface",
1090    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1091    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1092    "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include",
1093    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1094    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1095    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include",
1096    "$dsoftbus_root_path/core/bus_center/service/include",
1097    "$dsoftbus_root_path/core/bus_center/utils/include",
1098    "$dsoftbus_root_path/core/discovery/interface",
1099    "$dsoftbus_root_path/core/discovery/manager/include",
1100    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1101    "$dsoftbus_root_path/interfaces/kits",
1102    "$dsoftbus_root_path/interfaces/kits/bus_center",
1103  ]
1104
1105  deps = [ "$dsoftbus_root_path/core/common:softbus_utils" ]
1106
1107  if (!defined(global_parts_info) ||
1108      defined(global_parts_info.deviceprofile_device_info_manager)) {
1109    external_deps = [
1110      "device_info_manager:distributed_device_profile_common",
1111      "device_info_manager:distributed_device_profile_sdk",
1112      "hilog:libhilog",
1113      "ipc:ipc_core",
1114    ]
1115  } else {
1116    external_deps = [
1117      "hilog:libhilog",
1118      "ipc:ipc_core",
1119    ]
1120  }
1121  external_deps += [
1122    "bounds_checking_function:libsec_shared",
1123    "c_utils:utils",
1124    "device_auth:deviceauth_sdk",
1125    "googletest:gmock_main",
1126    "googletest:gtest_main",
1127    "samgr:samgr_proxy",
1128  ]
1129}
1130
1131ohos_unittest("AuthSessionJsonMockTest") {
1132  module_out_path = module_output_path
1133  sources = [
1134    "$dsoftbus_root_path/core/authentication/src/auth_pre_link.c",
1135    "unittest/auth_session_json_deps_mock.cpp",
1136    "unittest/auth_session_json_mock_test.cpp",
1137  ]
1138
1139  include_dirs = [
1140    "$dsoftbus_root_path/adapter/common/include",
1141    "$dsoftbus_root_path/core/bus_center/utils/include",
1142    "$dsoftbus_root_path/core/common/include",
1143    "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include",
1144    "$dsoftbus_root_path/core/authentication/interface",
1145    "$dsoftbus_root_path/core/bus_center/interface",
1146    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
1147    "$dsoftbus_root_path/core/adapter/bus_center/include",
1148    "$dsoftbus_root_path/core/adapter/authentication/include",
1149    "$dsoftbus_root_path/core/authentication/include",
1150    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
1151    "$dsoftbus_root_path/adapter/common/net/bluetooth/include",
1152    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
1153    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include",
1154    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include",
1155    "$dsoftbus_root_path/core/bus_center/service/include",
1156    "$dsoftbus_root_path/core/authentication/src",
1157    "$dsoftbus_root_path/interfaces/kits/bus_center",
1158    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
1159    "$dsoftbus_root_path/core/discovery/manager/include",
1160    "$dsoftbus_root_path/core/discovery/interface",
1161  ]
1162
1163  deps = [
1164    "$dsoftbus_root_path/core/common:softbus_utils",
1165    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
1166  ]
1167
1168  external_deps = [
1169    "c_utils:utils",
1170    "device_auth:deviceauth_sdk",
1171    "googletest:gmock_main",
1172    "googletest:gtest_main",
1173    "hilog:libhilog",
1174  ]
1175}
1176
1177group("unittest") {
1178  testonly = true
1179  deps = [
1180    ":AuthDeviceProfileListenerTest",
1181    ":AuthDeviceProfileTest",
1182    ":AuthEnhanceMockTest",
1183    ":AuthHichainMockTest",
1184    ":AuthHichainTest",
1185    ":AuthManagerTest",
1186    ":AuthNormalizeRequestTest",
1187    ":AuthOtherMockTest",
1188    ":AuthOtherTest",
1189    ":AuthSessionFsmTest",
1190    ":AuthSessionJsonMockTest",
1191    ":AuthSessionKeyTest",
1192    ":AuthSessionMessageTest",
1193    ":AuthTcpConnectionTest",
1194    ":AuthTest",
1195    ":AuthTestCallBackTest",
1196  ]
1197  if (dsoftbus_feature_lnn_lane_mgr) {
1198    deps += [ ":AuthLaneTest" ]
1199  }
1200}
1201
1202group("fuzztest") {
1203  testonly = true
1204  deps = [ "fuzztest:fuzztest" ]
1205  if (enhanced) {
1206    deps += [
1207      "$dsoftbus_root_path/dsoftbus_enhance/test/core/authentication:fuzztest",
1208    ]
1209  }
1210}
1211