• 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/test.gni")
15import("//foundation/communication/netmanager_base/netmanager_base_config.gni")
16
17ohos_unittest("netsys_distributed_test") {
18  module_out_path = "netmanager_base/netmanager_base/netsys_distributed_test"
19
20  sources = [
21    "$NETMANAGER_BASE_ROOT/test/security/netmanager_base_test_security.cpp",
22    "distributed_manager_test.cpp",
23    "net_manager_native_test.cpp",
24    "netsys_native_service_stub_test.cpp",
25    "netsys_native_service_test.cpp",
26    "route_manager_test.cpp",
27  ]
28
29  include_dirs = [
30    "$FWMARK_CLIENT_DIR/include",
31    "$INNERKITS_ROOT/netconnclient/include",
32    "$INNERKITS_ROOT/netconnclient/include/proxy",
33    "$INNERKITS_ROOT/netmanagernative/include",
34    "$NETMANAGER_BASE_ROOT/test/security",
35    "$NETMANAGERNATIVE_ROOT/include",
36    "$NETMANAGERNATIVE_ROOT/include/netsys/wrapper",
37    "$NETMANAGER_BASE_ROOT/services/common/include",
38    "$NETMANAGER_BASE_ROOT/services/netmanagernative/bpf/include",
39    "$NETMANAGER_BASE_ROOT/services/netmanagernative/src/netsys",
40    "$NETMANAGER_BASE_ROOT/test/commonduplicatedcode",
41    "$NETSYSCONTROLLER_ROOT_DIR/include",
42    "$NETSYSNATIVE_INNERKITS_SOURCE_DIR",
43    "$NETSYSNATIVE_SOURCE_DIR/include/manager",
44    "$NETSYSNATIVE_SOURCE_DIR/include/netsys",
45  ]
46
47  deps = [
48    "$FWMARK_CLIENT_DIR:fwmark_client",
49    "$INNERKITS_ROOT/netconnclient:net_conn_manager_if",
50    "$NETMANAGERNATIVE_ROOT:netsys_client",
51    "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager_static",
52    "$NETMANAGER_BASE_ROOT/services/netmanagernative/bpf:netsys_bpf_utils",
53  ]
54
55  external_deps = [
56    "ability_base:want",
57    "access_token:libaccesstoken_sdk",
58    "access_token:libnativetoken",
59    "access_token:libtoken_setproc",
60    "bundle_framework:appexecfwk_base",
61    "bundle_framework:appexecfwk_core",
62    "c_utils:utils",
63    "dhcp:dhcp_sdk",
64    "ffrt:libffrt",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67    "safwk:system_ability_fwk",
68    "samgr:samgr_proxy",
69  ]
70
71  defines = [
72    "NETMGRNATIVE_LOG_TAG = \"NetsysNativeService\"",
73    "LOG_DOMAIN = 0xD0015B0",
74    "SHARING_MANAGER_DEPS",
75  ]
76
77  if (netmanager_base_enable_feature_sysvpn) {
78    defines += [ "SUPPORT_SYSVPN" ]
79  }
80
81  external_deps += [ "hilog:libhilog" ]
82
83  part_name = "netmanager_base"
84  subsystem_name = "communication"
85}
86