1# Copyright (c) 2021 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("//foundation/communication/dsoftbus/dsoftbus.gni") 16 17module_output_path = "dsoftbus/connection" 18 19ohos_unittest("softbus_connection_p2p_test") { 20 module_out_path = module_output_path 21 22 if (dsoftbus_feature_conn_br == true) { 23 defines = [ "connection_enable_br_test" ] 24 } else { 25 defines = [] 26 } 27 28 if (dsoftbus_feature_conn_ble == true) { 29 defines += [ "connection_enable_ble_test" ] 30 } 31 32 include_dirs = [ 33 "$dsoftbus_root_path/core/common/include", 34 "$softbus_adapter_common/include", 35 "$dsoftbus_root_path/interfaces/kits/common", 36 "$dsoftbus_root_path/core/frame/common/include", 37 "$dsoftbus_root_path/core/connection/interface", 38 "$dsoftbus_root_path/core/connection/manager", 39 "$dsoftbus_root_path/core/connection/p2p/manager/include", 40 "$dsoftbus_root_path/core/connection/p2p/interface", 41 "$dsoftbus_root_path/core/connection/p2p/common/include", 42 "$dsoftbus_root_path/core/connection/p2p/negotiation/include", 43 "$dsoftbus_root_path/core/connection/tcp/include", 44 "$dsoftbus_root_path/core/connection/p2p/adapter/", 45 "$dsoftbus_root_path/interfaces/kits/discovery", 46 "$dsoftbus_root_path/interfaces/kits/bus_center", 47 "$softbus_adapter_common/net/bluetooth/include", 48 "$dsoftbus_root_path/core/connection/ble/include", 49 "$dsoftbus_root_path/core/bus_center/interface", 50 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 51 "$dsoftbus_root_path/core/discovery/interface", 52 "$dsoftbus_root_path/core/discovery/manager/include", 53 "$dsoftbus_root_path/core/connection/p2p/message/src", 54 "$dsoftbus_root_path/core/connection/p2p/message/include", 55 "$dsoftbus_root_path/core/authentication/interface", 56 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 57 "$dsoftbus_root_path/core/connection/p2p/adapter", 58 "//third_party/googletest/googletest/include", 59 "//third_party/googletest/googletest/src", 60 "//third_party/bounds_checking_function/include", 61 ] 62 63 deps = [ 64 "$dsoftbus_root_path/adapter:softbus_adapter", 65 "$dsoftbus_root_path/core/common:softbus_utils", 66 "$dsoftbus_root_path/core/frame:softbus_server", 67 "//third_party/bounds_checking_function:libsec_shared", 68 "//third_party/googletest:gmock_main", 69 "//third_party/googletest:gtest_main", 70 ] 71 72 external_deps = [ 73 "c_utils:utils", 74 "hiviewdfx_hilog_native:libhilog", 75 ] 76 sources = [ "connection_p2p_test.cpp" ] 77} 78