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