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("../../../core/common/dfx/dsoftbus_dfx.gni")
18import("../../../dsoftbus.gni")
19
20dsoftbus_root_path = "../../.."
21module_output_path = "dsoftbus/adapter"
22
23test_deps = [
24  "$dsoftbus_dfx_path/log:softbus_dfx_log",
25  "$dsoftbus_root_path/core/common:softbus_utils",
26]
27
28test_external_deps = [
29  "c_utils:utils",
30  "googletest:gmock_main",
31  "googletest:gtest_main",
32  "hilog:libhilog",
33  "json:nlohmann_json_static",
34]
35
36ohos_unittest("LnnWifiServiceMonitorTest") {
37  module_out_path = module_output_path
38  sources = [ "$dsoftbus_root_path/tests/adapter/common/src/lnn_wifiservice_monitor_test.cpp" ]
39
40  include_dirs = [
41    "$dsoftbus_root_path/adapter/common/include",
42    "$dsoftbus_root_path/core/common/include",
43    "$dsoftbus_root_path/adapter/common/net/wifi/include",
44    "$dsoftbus_root_path/adapter/common/bus_center/include",
45    "$dsoftbus_root_path/interfaces/kits/common",
46    "$dsoftbus_root_path/core/bus_center/service/include",
47    "$dsoftbus_root_path/interfaces/kits/bus_center",
48    "$dsoftbus_root_path/core/bus_center/interface",
49    "$dsoftbus_root_path/core/bus_center/ipc/standard/include",
50    "$dsoftbus_root_path/sdk/frame/standard/include",
51    "$dsoftbus_root_path/tests/core/bus_center/mock_common/include",
52    "$dsoftbus_root_path/core/transmission/interface",
53    "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include",
54    "$dsoftbus_root_path/core/common/include",
55    "$dsoftbus_root_path/adapter/common/bus_center/wlan",
56    "$dsoftbus_root_path/tests/adapter/common/src",
57    "$dsoftbus_root_path/tests/adapter/common/include",
58    "$dsoftbus_root_path/core/bus_center/utils/include",
59  ]
60
61  deps = test_deps
62  external_deps = test_external_deps
63  if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
64    external_deps += [
65      "ability_base:base",
66      "ability_base:want",
67      "ipc:ipc_core",
68      "wifi:wifi_sdk",
69    ]
70  }
71}
72
73group("unittest") {
74  testonly = true
75  if (!defined(ohos_lite) && softbus_communication_wifi_feature == true) {
76    deps = [ ":LnnWifiServiceMonitorTest" ]
77  }
78}
79