• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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/test.gni")
15import("//foundation/communication/netmanager_base/netmanager_base_config.gni")
16
17ohos_unittest("netsys_native_manager_test") {
18  module_out_path = "netmanager_base/netsys_native_manager_test"
19  sources = [
20    "conn_manager_test.cpp",
21    "dhcp_controller_test.cpp",
22    "dhcp_result_parcel_test.cpp",
23    "dns_manager_test.cpp",
24    "dns_param_cache_test.cpp",
25    "dns_proxy_listen_test.cpp",
26    "dns_resolv_listen_test.cpp",
27    "fwmark_network_test.cpp",
28    "interface_manager_test.cpp",
29    "iptables_wrapper_test.cpp",
30    "local_network_test.cpp",
31    "net_conn_manager_test_util.cpp",
32    "netlink_msg_test.cpp",
33    "netsys_controller_test.cpp",
34    "netsys_native_client_test.cpp",
35    "netsys_native_service_proxy_test.cpp",
36    "netsys_native_service_test.cpp",
37    "netsys_network_test.cpp",
38    "resolver_config_test.cpp",
39    "route_manager_test.cpp",
40    "sharing_manager_test.cpp",
41  ]
42
43  include_dirs = [
44    "$NETSYSNATIVE_INNERKITS_SOURCE_DIR",
45    "$INNERKITS_ROOT/netmanagernative/include",
46    "$NETSYSNATIVE_SOURCE_DIR/include/manager",
47    "$NETSYSNATIVE_SOURCE_DIR/include/netsys",
48    "$FWMARK_CLIENT_DIR/include",
49    "$DHCP_MANAGER_ROOT/interfaces/inner_api/include",
50    "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces",
51    "$NETMANAGERNATIVE_ROOT/include",
52    "$NETMANAGERNATIVE_ROOT/include/netsys/wrapper",
53    "$NETSYSCONTROLLER_ROOT_DIR/include",
54  ]
55
56  deps = [
57    "$DHCP_MANAGER_ROOT/services/mgr_service:dhcp_manager_service",
58    "$FWMARK_CLIENT_DIR:fwmark_client",
59    "$NETMANAGERNATIVE_ROOT/netsys_client:netsys_client",
60    "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager",
61    "$NETMANAGER_BASE_ROOT/services/netsyscontroller:netsys_controller",
62  ]
63
64  external_deps = [
65    "ability_base:want",
66    "bundle_framework:appexecfwk_base",
67    "bundle_framework:appexecfwk_core",
68    "c_utils:utils",
69    "ipc:ipc_core",
70    "safwk:system_ability_fwk",
71    "samgr:samgr_proxy",
72  ]
73
74  defines = [
75    "NETMGRNATIVE_LOG_TAG = \"NetsysNativeService\"",
76    "LOG_DOMAIN = 0xD0015B0",
77    "SHARING_MANAGER_DEPS",
78  ]
79
80  if (is_standard_system) {
81    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
82  } else {
83    external_deps += [ "hilog:libhilog" ]
84  }
85
86  part_name = "netmanager_base"
87  subsystem_name = "communication"
88}
89