# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/communication/dsoftbus/dsoftbus.gni") module_output_path = "dsoftbus/LNN" ohos_unittest("LNNTest") { module_out_path = module_output_path sources = [ "ipc/bus_center_client_proxy_standard_test.cpp", "ipc/lnn_bus_center_ipc_test.cpp", "unittest/lane_test.cpp", "unittest/ledger_lane_hub_test.cpp", "unittest/lnn_huks_test.cpp", "unittest/net_builder_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/bus_center/ipc/standard/include", "$dsoftbus_root_path/core/bus_center/ipc/standard/src", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/time_sync/include", "$dsoftbus_root_path/core/bus_center/ipc/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/sdk/frame/standard/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/core/frame/standard/client_manager/include", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "//base/security/huks/interfaces/innerkits/huks_standard/main/include", "$dsoftbus_root_path/sdk/bus_center/manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "//base/security/device_auth/services:deviceauth_sdk", "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", "huks:libhukssdk", ] } } ohos_unittest("LNNNetBuilderTest") { module_out_path = module_output_path sources = [ "net_builder/src/lnn_net_builder_test.cpp" ] include_dirs = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } ohos_unittest("LNNNetBuilderMockTest") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", "net_builder/src/lnn_net_builder_deps_mock.cpp", "net_builder/src/lnn_net_builder_mock_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", "$dsoftbus_root_path/core/transmission/interface", "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/connection/p2p/manager/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } ohos_unittest("LNNTestMock") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_connection_fsm.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_devicename_info.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_net_builder.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_network_info.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_node_weight.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_p2p_info.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_sync_info_manager.c", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src/lnn_topo_manager.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_connection_addr_utils.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_connection_mock.cpp", "$dsoftbus_root_path/tests/core/bus_center/mock_common/src/lnn_trans_mock.cpp", "net_builder/src/lnn_auth_mock.cpp", "net_builder/src/lnn_connection_fsm_test.cpp", "net_builder/src/lnn_devicename_info_test.cpp", "net_builder/src/lnn_net_builder_deps_mock.cpp", "net_builder/src/lnn_net_ledger_mock.cpp", "net_builder/src/lnn_network_info_test.cpp", "net_builder/src/lnn_node_weight_test.cpp", "net_builder/src/lnn_p2p_info_test.cpp", "net_builder/src/lnn_service_mock.cpp", "net_builder/src/lnn_sync_info_manager_test.cpp", "net_builder/src/lnn_topo_manager_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/src", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/tests/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/tests/core/bus_center/mock_common/include", "$dsoftbus_root_path/core/transmission/interface", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include", "$dsoftbus_root_path/adapter/common/net/wifi/include", "$dsoftbus_root_path/core/transmission/trans_channel/manager/include", "$dsoftbus_root_path/core/bus_center/utils/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } ohos_unittest("LNNLedgerTestMock") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_device_info.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_net_ledger.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/src/lnn_node_info.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/src/lnn_local_net_ledger.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", "net_ledger/lnn_local_ledger_deps_mock.cpp", "net_ledger/lnn_local_ledger_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "//base/security/huks/interfaces/innerkits/huks_standard/main/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } ohos_unittest("LNNLedgerTest") { module_out_path = module_output_path sources = [ "net_ledger/lnn_disctributed_net_ledger_test.cpp", "net_ledger/lnn_ledger_common_test.cpp", "net_ledger/lnn_meta_node_ledger_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "//base/security/huks/interfaces/innerkits/huks_standard/main/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (dsoftbus_feature_lnn_net) { sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger.c" ] } else { sources += [ "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/src/lnn_distributed_net_ledger_virtual.c" ] } if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } ohos_unittest("LNNLaneTestMock") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_common.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_link_proc.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_model.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_score_virtual.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_lane_select.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_select_rule.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/src/lnn_trans_lane.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_async_callback_utils.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_map.c", "lane/src/lnn_lane_deps_mock.cpp", "lane/src/lnn_lane_test.cpp", "lane/src/lnn_wifi_adpter_mock.cpp", ] include_dirs = [ "lane/include", "$dsoftbus_root_path/core/adapter/bus_center/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/adapter/common/net/wifi/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/common", "//commonlibrary/c_utils/base/include", "//foundation/communication/wifi/wifi/interfaces/kits/c", "//foundation/communication/wifi/wifi/frameworks/native/include", "//third_party/cJSON", "unittest/common/", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } native_source_path = rebase_path("$dsoftbus_root_path") dep_dir = "dsoftbus_enhance/core/bus_center/lnn/lane_hub" enhanced_test = exec_script("$dsoftbus_root_path/check_sub_module.py", [ "$native_source_path", "$dep_dir", ], "value") if (!defined(ohos_lite) && enhanced_test) { ohos_unittest("LNNDbTestMock") { module_out_path = module_output_path sources = [ "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_ctrl.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_fsm.c", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/src/lnn_heartbeat_strategy.c", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/src/lnn_decision_db.c", "$dsoftbus_root_path/core/bus_center/utils/src/lnn_state_machine.c", "net_ledger/lnn_decision_db_deps_mock.cpp", "net_ledger/lnn_decision_db_test.cpp", ] include_dirs = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/heartbeat/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/include", "$dsoftbus_root_path/core/bus_center/lnn/net_buscenter/include", "$dsoftbus_root_path/core/bus_center/lnn/net_builder/sync_info/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/disc_mgr/include", "$dsoftbus_root_path/core/bus_center/monitor/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/p2p/interface", "$dsoftbus_root_path/core/connection/p2p/common/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/utils/include", "$dsoftbus_root_path/interfaces/kits/bus_center", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/adapter/bus_center/include", "//commonlibrary/c_utils/base/include", "//third_party/cJSON", "unittest/common/", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/adapter/common/bus_center/include/", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/decision_db/include", "//base/security/huks/interfaces/innerkits/huks_standard/main/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/security/device_auth/services:deviceauth_sdk", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] } else { external_deps = [ "c_utils:utils", "hilog:libhilog", ] } } } group("unittest") { testonly = true deps = [ ":LNNLaneTestMock", ":LNNLedgerTest", ":LNNLedgerTestMock", ":LNNNetBuilderMockTest", ":LNNNetBuilderTest", ":LNNTest", ":LNNTestMock", ] if (!defined(ohos_lite) && enhanced_test) { deps += [ ":LNNDbTestMock" ] } if (enhanced_test) { deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/heartbeat:unittest", "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/lane_hub/lane_channel_rating:unittest", "$dsoftbus_root_path/dsoftbus_enhance/test/core/bus_center/lnn/unittest:unittest", ] } }