• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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
19dsoftbus_root_path = "../../.."
20module_output_path = "dsoftbus/soft_bus/adapter"
21
22test_deps = [
23  "$dsoftbus_dfx_path:softbus_dfx",
24  "$dsoftbus_root_path/core/common:softbus_utils",
25]
26
27test_external_deps = [
28  "c_utils:utils",
29  "googletest:gmock_main",
30  "googletest:gtest_main",
31  "hilog:libhilog",
32  "json:nlohmann_json_static",
33]
34
35ohos_unittest("LnnWifiServiceMonitorTest") {
36  module_out_path = module_output_path
37  sources = [ "$dsoftbus_root_path/tests/adapter/common/src/lnn_wifiservice_monitor_test.cpp" ]
38
39  include_dirs = [
40    "$dsoftbus_root_path/adapter/common/include",
41    "$dsoftbus_root_path/core/common/include",
42    "$dsoftbus_root_path/interfaces/kits/transport",
43    "$dsoftbus_root_path/adapter/common/net/wifi/include",
44    "$dsoftbus_root_path/interfaces/kits/lnn",
45    "$dsoftbus_root_path/adapter/common/bus_center/include",
46    "$dsoftbus_root_path/interfaces/kits/common",
47    "$dsoftbus_root_path/interfaces/kits/bus_center",
48    "$dsoftbus_root_path/core/bus_center/service/include",
49    "$dsoftbus_root_path/interfaces/kits/bus_center",
50    "$dsoftbus_root_path/interfaces/inner_kits/lnn",
51    "$dsoftbus_root_path/core/bus_center/interface",
52    "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
53    "$dsoftbus_root_path/sdk/frame/standard/include",
54    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
55    "$dsoftbus_root_path/core/transmission/interface",
56    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
57    "$dsoftbus_root_path/core/common/include",
58    "$dsoftbus_root_path/adapter/common/bus_center/wlan",
59    "$dsoftbus_root_path/tests/adapter/common/src",
60    "$dsoftbus_root_path/tests/adapter/common/include",
61    "$dsoftbus_root_path/core/bus_center/utils/include",
62  ]
63
64  deps = test_deps
65  external_deps = test_external_deps
66  if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
67    external_deps += [
68      "ability_base:base",
69      "ability_base:want",
70      "common_event_service:cesfwk_innerkits",
71      "ipc:ipc_core",
72      "wifi:wifi_sdk",
73    ]
74  }
75}
76
77ohos_unittest("LnnLinkWatchTest") {
78  module_out_path = module_output_path
79  sources = [
80    "$dsoftbus_root_path/adapter/common/bus_center/network/lnn_linkwatch.c",
81    "$dsoftbus_root_path/tests/adapter/common/src/lnn_linkwatch_test.cpp",
82  ]
83
84  include_dirs = [
85    "$dsoftbus_root_path/adapter/common/include",
86    "$dsoftbus_root_path/core/common/include",
87    "$dsoftbus_root_path/adapter/common/net/wifi/include",
88    "$dsoftbus_root_path/adapter/common/bus_center/include",
89    "$dsoftbus_root_path/interfaces/kits/common",
90    "$dsoftbus_root_path/core/bus_center/service/include",
91    "$dsoftbus_root_path/interfaces/kits/bus_center",
92    "$dsoftbus_root_path/core/bus_center/interface",
93    "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
94    "$dsoftbus_root_path/sdk/frame/standard/include",
95    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
96    "$dsoftbus_root_path/core/transmission/interface",
97    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
98    "$dsoftbus_root_path/core/common/include",
99    "$dsoftbus_root_path/adapter/common/bus_center/wlan",
100    "$dsoftbus_root_path/tests/adapter/common/src",
101    "$dsoftbus_root_path/tests/adapter/common/include",
102    "$dsoftbus_root_path/core/bus_center/utils/include",
103    "$dsoftbus_root_path/components/nstackx_enhanced/nstackx_core/dnet/code/interface",
104    "$dsoftbus_root_path/components/nstackx_enhanced/nstackx_core/dnet/code/include",
105  ]
106
107  deps = [
108    "$dsoftbus_dfx_path:softbus_dfx",
109    "$dsoftbus_root_path/adapter:softbus_adapter",
110    "$dsoftbus_root_path/core/common:softbus_utils",
111  ]
112  external_deps = [
113    "c_utils:utils",
114    "googletest:gmock",
115    "googletest:gtest_main",
116    "hilog:libhilog",
117    "ipc:ipc_core",
118    "ipc:ipc_single",
119    "samgr:samgr_proxy",
120  ]
121  if (dsoftbus_feature_deps_ability_base) {
122    external_deps += [
123      "ability_base:base",
124      "ability_base:want",
125    ]
126  }
127}
128
129group("unittest") {
130  testonly = true
131  if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
132    deps = [
133      ":LnnLinkWatchTest",
134      ":LnnWifiServiceMonitorTest",
135    ]
136  }
137}
138