• 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_netfirewall_test") {
18  module_out_path = "netmanager_base/netsys_netfirewall_test"
19
20  sources = [ "netsys_netfirewall_test.cpp" ]
21
22  include_dirs = [
23    "$NETSYSNATIVE_SOURCE_DIR/bpf/include",
24    "$NETMANAGER_BASE_ROOT/utils/log/include",
25    "$NETSYSNATIVE_SOURCE_DIR/include",
26    "$NETMANAGER_BASE_ROOT/interfaces/innerkits/include",
27    "$NETMANAGER_BASE_ROOT/interfaces/innerkits/netmanagernative/include",
28  ]
29
30  deps = [
31    "$INNERKITS_ROOT/netmanagernative:net_native_manager_if",
32    "$NETSYSNATIVE_SOURCE_DIR/bpf:netsys",
33    "$NETSYSNATIVE_SOURCE_DIR/bpf:netsys_bpf_utils",
34  ]
35
36  defines = [
37    "NETMGR_LOG_TAG = \"NetSysNetFirewallTest\"",
38    "LOG_DOMAIN = 0xD0015B0",
39  ]
40
41  if (enable_netmgr_debug) {
42    defines += [ "NETMGR_DEBUG" ]
43  }
44
45  external_deps = [
46    "c_utils:utils",
47    "hilog:libhilog",
48    "ipc:ipc_core",
49    "safwk:system_ability_fwk",
50  ]
51
52  public_configs = [ "$NETMANAGER_BASE_ROOT/resource:coverage_flags" ]
53  part_name = "netmanager_base"
54  subsystem_name = "communication"
55}
56
57ohos_unittest("suffix_match_trie_test") {
58  module_out_path = "netmanager_base/netsys_netfirewall_test"
59
60  include_dirs = [ "$NETMANAGER_BASE_ROOT/utils/common_utils/include" ]
61
62  sources = [ "suffix_match_trie_test.cpp" ]
63
64  external_deps = [ "c_utils:utils" ]
65
66  public_configs = [ "$NETMANAGER_BASE_ROOT/resource:coverage_flags" ]
67  part_name = "netmanager_base"
68  subsystem_name = "communication"
69}
70