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