• 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_policy_manager_test") {
18  module_out_path = "netmanager_base/net_policy_manager_test"
19
20  sources = [
21    "net_policy_callback_test.cpp",
22    "net_policy_manager_test.cpp",
23  ]
24
25  include_dirs = [
26    "$INNERKITS_ROOT/netpolicyclient/include",
27    "$INNERKITS_ROOT/netpolicyclient/include/proxy",
28    "$NETPOLICYMANAGER_SOURCE_DIR/include",
29  ]
30
31  deps = [
32    "$INNERKITS_ROOT/netpolicyclient:net_policy_manager_if",
33    "$NETCONNMANAGER_COMMON_DIR:net_service_common",
34    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
35  ]
36
37  external_deps = [
38    "ipc:ipc_core",
39    "safwk:system_ability_fwk",
40    "samgr_standard:samgr_proxy",
41  ]
42
43  defines = [
44    "NETMGR_LOG_TAG = \"NetPolicyManager\"",
45    "LOG_DOMAIN = 0xD0015B0",
46  ]
47
48  if (enable_netmgr_debug) {
49    defines += [ "NETMGR_DEBUG" ]
50  }
51
52  if (is_standard_system) {
53    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
54  } else {
55    external_deps += [ "hilog:libhilog" ]
56  }
57
58  part_name = "netmanager_base"
59  subsystem_name = "communication"
60}
61
62group("unittest") {
63  testonly = true
64  deps = [ ":net_policy_manager_test" ]
65}
66