• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/test.gni")
15import("//foundation/communication/netmanager_base/netmanager_base_config.gni")
16
17ohos_unittest("net_conn_manager_test") {
18  module_out_path = "netmanager_base/net_conn_manager_test"
19
20  sources = [
21    "inet_addr_test.cpp",
22    "net_activate_test.cpp",
23    "net_all_capabilities_test.cpp",
24    "net_caps_test.cpp",
25    "net_common_event_test.cpp",
26    "net_conn_callback_test.cpp",
27    "net_conn_client_test.cpp",
28    "net_conn_event_handler_test.cpp",
29    "net_conn_hievent_test.cpp",
30    "net_conn_manager_test.cpp",
31    "net_conn_service_iface_test.cpp",
32    "net_conn_service_test.cpp",
33    "net_detection_callback_test.cpp",
34    "net_handle_test.cpp",
35    "net_link_info_test.cpp",
36    "net_monitor_test.cpp",
37    "net_score_test.cpp",
38    "net_specifier_test.cpp",
39    "net_supplier_info_test.cpp",
40    "network_test.cpp",
41    "route_test.cpp",
42  ]
43
44  include_dirs = [
45    "$INNERKITS_ROOT/include",
46    "$INNERKITS_ROOT/netconnclient/include",
47    "$INNERKITS_ROOT/netconnclient/include/proxy",
48    "$NETCONNMANAGER_SOURCE_DIR/include/stub",
49    "$NETCONNMANAGER_SOURCE_DIR/include",
50    "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include",
51    "$NETMANAGERNATIVE_ROOT/net_mgr_native/include",
52    "$NETMANAGERNATIVE_ROOT/common/include",
53    "$NETMANAGER_BASE_ROOT/services/common/include",
54  ]
55
56  deps = [
57    "$INNERKITS_ROOT/netconnclient:net_conn_manager_if",
58    "$NETCONNMANAGER_SOURCE_DIR:net_conn_manager",
59    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
60  ]
61
62  external_deps = [
63    "ability_base:want",
64    "access_token:libaccesstoken_sdk",
65    "access_token:libnativetoken",
66    "access_token:libtoken_setproc",
67    "common_event_service:cesfwk_core",
68    "common_event_service:cesfwk_innerkits",
69    "eventhandler:libeventhandler",
70    "hisysevent_native:libhisysevent",
71    "ipc:ipc_core",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74  ]
75
76  defines = [
77    "NETMGR_LOG_TAG = \"NetConnManager\"",
78    "LOG_DOMAIN = 0xD0015B0",
79  ]
80
81  if (enable_netmgr_debug) {
82    defines += [ "NETMGR_DEBUG" ]
83  }
84
85  if (is_standard_system) {
86    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
87  } else {
88    external_deps += [ "hilog:libhilog" ]
89  }
90
91  if (enable_sys_func) {
92    defines += [ "SYS_FUNC" ]
93  }
94
95  part_name = "netmanager_base"
96  subsystem_name = "communication"
97}
98