• 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_common_test") {
18  module_out_path = "netmanager_base/net_common_test"
19
20  include_dirs = [
21    "$INNERKITS_ROOT/include",
22    "$NETCONNMANAGER_COMMON_DIR/include",
23    "$NETCONNMANAGER_SOURCE_DIR/include",
24    "$INNERKITS_ROOT/netconnclient/include",
25    "$INNERKITS_ROOT/netstatsclient/include",
26    "$NETMANAGER_BASE_ROOT/utils/common_utils/include",
27  ]
28
29  sources = [
30    "broadcast_manager_test.cpp",
31    "errorcode_convertor_test.cpp",
32    "net_manager_center_test.cpp",
33    "net_mgr_log_wrapper_test.cpp",
34    "net_setting_test.cpp",
35    "netmanager_base_permission_test.cpp",
36    "netmanager_hitrace_test.cpp",
37    "route_utils_test.cpp",
38  ]
39
40  deps = [
41    "$INNERKITS_ROOT/netconnclient:net_conn_parcel",
42    "$INNERKITS_ROOT/netstatsclient:net_stats_parcel",
43    "$NETCONNMANAGER_COMMON_DIR:net_service_common",
44    "$NETCONNMANAGER_SOURCE_DIR:net_conn_manager",
45    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
46  ]
47
48  external_deps = [
49    "access_token:libaccesstoken_sdk",
50    "access_token:libnativetoken",
51    "access_token:libtoken_setproc",
52    "hisysevent_native:libhisysevent",
53    "hitrace_native:hitrace_meter",
54    "ipc:ipc_core",
55    "safwk:system_ability_fwk",
56    "samgr:samgr_proxy",
57  ]
58
59  defines = [
60    "NETMGR_LOG_TAG = \"NetConnManager\"",
61    "LOG_DOMAIN = 0xD0015B0",
62  ]
63
64  if (enable_netmgr_debug) {
65    defines += [ "NETMGR_DEBUG" ]
66  }
67
68  if (is_standard_system) {
69    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
70  } else {
71    external_deps += [ "hilog:libhilog" ]
72  }
73
74  if (enable_sys_func) {
75    defines += [ "SYS_FUNC" ]
76  }
77
78  part_name = "netmanager_base"
79  subsystem_name = "communication"
80}
81