1# Copyright (c) 2022 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/lite/config/component/lite_component.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17import("../../../../../dsoftbus.gni") 18 19module_output_path = "dsoftbus/discovery" 20 21ohos_unittest("DiscNstackxAdapterTest") { 22 module_out_path = module_output_path 23 sources = [ "disc_nstackx_adapter_test.cpp" ] 24 25 include_dirs = [ 26 "$dsoftbus_root_path/adapter/common/include", 27 "$dsoftbus_root_path/core/adapter/bus_center/include", 28 "$dsoftbus_root_path/adapter/default_config/spec_config", 29 "$dsoftbus_root_path/components/nstackx/nstackx_util/interface", 30 "$dsoftbus_root_path/components/nstackx/nstackx_ctrl/include", 31 "$dsoftbus_root_path/core/bus_center/interface", 32 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 33 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 34 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 35 "$dsoftbus_root_path/core/broadcast/common/include", 36 "$dsoftbus_dfx_path/interface/include", 37 "$dsoftbus_root_path/core/common/include", 38 "$dsoftbus_root_path/core/discovery/ble/dispatcher/include", 39 "$dsoftbus_root_path/core/discovery/coap/interface", 40 "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/include", 41 "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/src", 42 "$dsoftbus_root_path/core/discovery/coap/common/include", 43 "$dsoftbus_root_path/core/discovery/common/include", 44 "$dsoftbus_root_path/core/discovery/interface", 45 "$dsoftbus_root_path/core/discovery/manager/include", 46 "$dsoftbus_root_path/interfaces/kits/common", 47 ] 48 49 deps = [ 50 "$dsoftbus_dfx_path:softbus_dfx", 51 "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl", 52 "$dsoftbus_root_path/core/common:softbus_utils", 53 "$dsoftbus_root_path/tests/core/frame:softbus_server_static", 54 ] 55 56 external_deps = [ 57 "cJSON:cjson", 58 "c_utils:utils", 59 "dsoftbus:softbus_client", 60 "googletest:gtest_main", 61 "hilog:libhilog", 62 ] 63} 64 65ohos_unittest("DiscCoapTest") { 66 module_out_path = module_output_path 67 sources = [ "disc_coap_test.cpp" ] 68 69 include_dirs = [ 70 "$dsoftbus_root_path/adapter/common/include", 71 "$dsoftbus_root_path/adapter/default_config/spec_config", 72 "$dsoftbus_root_path/components/nstackx/nstackx_util/interface", 73 "$dsoftbus_root_path/core/bus_center/interface", 74 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 75 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 76 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include", 77 "$dsoftbus_dfx_path/interface/include", 78 "$dsoftbus_root_path/core/common/include", 79 "$dsoftbus_root_path/core/discovery/ble/dispatcher/include", 80 "$dsoftbus_root_path/core/discovery/coap/interface", 81 "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/include", 82 "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/src", 83 "$dsoftbus_root_path/core/discovery/interface", 84 "$dsoftbus_root_path/core/discovery/manager/include", 85 "$dsoftbus_root_path/interfaces/kits/common", 86 ] 87 88 deps = [ 89 "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl", 90 "$dsoftbus_root_path/core/common:softbus_utils", 91 "$dsoftbus_root_path/tests/core/frame:softbus_server_static", 92 ] 93 94 external_deps = [ 95 "cJSON:cjson", 96 "c_utils:utils", 97 "googletest:gtest_main", 98 "hilog:libhilog", 99 ] 100} 101 102group("unittest") { 103 testonly = true 104 deps = [ 105 ":DiscCoapTest", 106 ":DiscNstackxAdapterTest", 107 ] 108} 109