• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/soft_bus/discovery"
20
21ohos_unittest("DiscNstackxAdapterTest") {
22  module_out_path = module_output_path
23  sources = [ "disc_nstackx_adapter_test.cpp" ]
24  sources += [ "../nstackx_coap_mock/disc_nstackx_adapter_mock.cpp" ]
25
26  include_dirs = [
27    "$dsoftbus_root_path/adapter/common/include",
28    "$dsoftbus_root_path/core/adapter/bus_center/include",
29    "$dsoftbus_root_path/adapter/default_config/spec_config",
30    "$dsoftbus_root_path/components/nstackx/nstackx_util/interface",
31    "$dsoftbus_root_path/components/nstackx/nstackx_ctrl/include",
32    "$dsoftbus_root_path/core/bus_center/interface",
33    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
34    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
35    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
36    "$dsoftbus_root_path/core/broadcast/common/include",
37    "$dsoftbus_dfx_path/interface/include",
38    "$dsoftbus_root_path/core/common/include",
39    "$dsoftbus_root_path/core/discovery/ble/dispatcher/include",
40    "$dsoftbus_root_path/core/discovery/coap/interface",
41    "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/include",
42    "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/src",
43    "$dsoftbus_root_path/core/discovery/coap/common/include",
44    "$dsoftbus_root_path/core/discovery/common/include",
45    "$dsoftbus_root_path/core/discovery/interface",
46    "$dsoftbus_root_path/core/discovery/manager/include",
47    "$dsoftbus_root_path/interfaces/kits/common",
48    "$dsoftbus_root_path/tests/core/discovery/coap/nstackx_coap_mock",
49  ]
50
51  deps = [
52    "$dsoftbus_dfx_path:softbus_dfx",
53    "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl",
54    "$dsoftbus_root_path/components/nstackx/nstackx_util:nstackx_util.open",
55    "$dsoftbus_root_path/core/common:softbus_utils",
56    "$dsoftbus_root_path/core/frame:softbus_server",
57  ]
58
59  external_deps = [
60    "bounds_checking_function:libsec_shared",
61    "cJSON:cjson",
62    "c_utils:utils",
63    "dsoftbus:softbus_client",
64    "googletest:gmock_main",
65    "googletest:gtest_main",
66    "hilog:libhilog",
67  ]
68}
69
70ohos_unittest("DiscCoapTest") {
71  module_out_path = module_output_path
72  sources = [ "disc_coap_test.cpp" ]
73  sources += [ "../nstackx_coap_mock/disc_coap_mock.cpp" ]
74
75  include_dirs = [
76    "$dsoftbus_root_path/adapter/common/include",
77    "$dsoftbus_root_path/adapter/default_config/spec_config",
78    "$dsoftbus_root_path/components/nstackx/nstackx_util/interface",
79    "$dsoftbus_root_path/core/bus_center/interface",
80    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
81    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include",
82    "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/local_ledger/include",
83    "$dsoftbus_dfx_path/interface/include",
84    "$dsoftbus_root_path/core/common/include",
85    "$dsoftbus_root_path/core/discovery/ble/dispatcher/include",
86    "$dsoftbus_root_path/core/discovery/coap/interface",
87    "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/include",
88    "$dsoftbus_root_path/core/discovery/coap/nstackx_coap/src",
89    "$dsoftbus_root_path/core/discovery/interface",
90    "$dsoftbus_root_path/core/discovery/manager/include",
91    "$dsoftbus_root_path/interfaces/kits/bus_center",
92    "$dsoftbus_root_path/interfaces/kits/common",
93    "$dsoftbus_root_path/tests/core/discovery/coap/nstackx_coap_mock",
94  ]
95
96  deps = [
97    "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl",
98    "$dsoftbus_root_path/core/common:softbus_utils",
99    "$dsoftbus_root_path/core/frame:softbus_server",
100  ]
101
102  external_deps = [
103    "cJSON:cjson",
104    "c_utils:utils",
105    "googletest:gmock_main",
106    "googletest:gtest_main",
107    "hilog:libhilog",
108  ]
109}
110
111group("unittest") {
112  testonly = true
113  deps = [ ":DiscCoapTest" ]
114  if (dsoftbus_feature_ex_kits) {
115    deps += [ ":DiscNstackxAdapterTest" ]
116  }
117}
118