# Copyright (c) 2021-2024 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("../../../../dsoftbus.gni") module_output_path = "dsoftbus/connection" dsoftbus_root_path = "../../../.." softbus_adapter_common = "${dsoftbus_root_path}/adapter/common" config("softbus_connection_br_test_config") { include_dirs = [ "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/adapter/br/include", "$softbus_adapter_common/include", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/core/connection/interface", "$dsoftbus_root_path/core/connection/manager", "$dsoftbus_root_path/core/connection/tcp/include", "$dsoftbus_root_path/core/connection/br/include", "$dsoftbus_root_path/core/connection/br/src", "$dsoftbus_root_path/interfaces/kits/common", "$dsoftbus_root_path/interfaces/kits/discovery", "$dsoftbus_root_path/interfaces/kits/bus_center", "$softbus_adapter_common/net/bluetooth/include", "$dsoftbus_root_path/core/common/include", "$dsoftbus_root_path/core/common/softbus_property", "$dsoftbus_root_path/core/connection/ble/include", "$dsoftbus_root_path/core/discovery/interface", "$dsoftbus_root_path/core/discovery/manager/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "//foundation/communication/bluetooth/interfaces/inner_api/include", "$dsoftbus_root_path/core/bus_center/service/include", "//third_party/googletest/googletest/include", "//third_party/googletest/googletest/src", "//third_party/bounds_checking_function/include", ] } ohos_unittest("BrConnTest") { module_out_path = module_output_path public_configs = [ ":softbus_connection_br_test_config" ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "//third_party/bounds_checking_function:libsec_shared", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] sources = [ "connection_br_connection_test.cpp", "connection_br_mock.cpp", ] } ohos_unittest("ConnectionBrTest") { module_out_path = module_output_path public_configs = [ ":softbus_connection_br_test_config" ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "$dsoftbus_root_path/core/frame:softbus_server", "//third_party/bounds_checking_function:libsec_shared", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] sources = [ "connection_br_mock.cpp", "connection_br_test.cpp", ] } ohos_unittest("BrConnectionTest") { module_out_path = module_output_path include_dirs = [ #"$dsoftbus_root_path/adapter/common/include", "$dsoftbus_root_path/adapter/common/net/bluetooth/include", "$dsoftbus_root_path/core/adapter/br/include", "$dsoftbus_root_path/core/authentication/interface", "$dsoftbus_root_path/core/bus_center/service/include", "$dsoftbus_root_path/core/bus_center/interface", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", "$dsoftbus_root_path/core/connection/br/include", "$dsoftbus_root_path/core/connection/ble/include", "$dsoftbus_root_path/core/connection/common/include", "$dsoftbus_root_path/tests/core/connection/br", "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header", "//foundation/communication/bluetooth/interfaces/inner_api/include", ] deps = [ "$dsoftbus_root_path/adapter:softbus_adapter", "$dsoftbus_root_path/core/common:softbus_utils", "//third_party/bounds_checking_function:libsec_shared", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] sources = [ "$dsoftbus_root_path/core/connection/br/src/softbus_conn_br_connection.c", "$dsoftbus_root_path/core/connection/br/src/softbus_conn_br_manager.c", "$dsoftbus_root_path/core/connection/br/src/softbus_conn_br_trans.c", "$dsoftbus_root_path/core/connection/manager/softbus_conn_flow_control.c", "br_connection_test.cpp", "br_mock.cpp", ] } group("unittest") { testonly = true deps = [ ":BrConnectionTest" ] }