1# Copyright (c) 2022-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("firewall_manager_test") { 18 module_out_path = "netmanager_base/netsys_native_manager_test" 19 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 debug = false 24 } 25 26 branch_protector_ret = "pac_ret" 27 28 sources = [ "firewall_manager_test.cpp" ] 29 30 include_dirs = [ 31 "$INNERKITS_ROOT/dnsresolverclient/include", 32 "$INNERKITS_ROOT/dnsresolverclient/include/proxy", 33 "$INNERKITS_ROOT/netmanagernative/include", 34 "$NETSYSNATIVE_INNERKITS_SOURCE_DIR", 35 "$NETSYSNATIVE_SOURCE_DIR/include", 36 "$NETSYSNATIVE_SOURCE_DIR/include/netsys", 37 "$NETSYSNATIVE_SOURCE_DIR/include/manager", 38 "$NETSYSCONTROLLER_ROOT_DIR/include", 39 "$NETSYSNATIVE_SOURCE_DIR/test", 40 ] 41 42 deps = [ 43 "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager_static", 44 "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", 45 ] 46 47 external_deps = [ 48 "ability_base:want", 49 "bundle_framework:appexecfwk_base", 50 "bundle_framework:appexecfwk_core", 51 "c_utils:utils", 52 "ipc:ipc_core", 53 "safwk:system_ability_fwk", 54 "samgr:samgr_proxy", 55 ] 56 57 defines = [ 58 "NETMGRNATIVE_LOG_TAG = \"NetsysNativeService\"", 59 "LOG_DOMAIN = 0xD0015B0", 60 ] 61 62 if (enable_netmgr_debug) { 63 defines += [ "NETMGR_DEBUG" ] 64 } 65 66 external_deps += [ "hilog:libhilog" ] 67 68 part_name = "netmanager_base" 69 subsystem_name = "communication" 70} 71 72ohos_unittest("firewall_manager_class_test") { 73 module_out_path = "netmanager_base/netsys_native_manager_test" 74 75 sanitize = { 76 cfi = true 77 cfi_cross_dso = true 78 debug = false 79 } 80 81 branch_protector_ret = "pac_ret" 82 83 sources = [ "firewall_manager_class_test.cpp" ] 84 85 include_dirs = [ 86 "$INNERKITS_ROOT/dnsresolverclient/include", 87 "$INNERKITS_ROOT/dnsresolverclient/include/proxy", 88 "$INNERKITS_ROOT/netmanagernative/include", 89 "$NETSYSNATIVE_INNERKITS_SOURCE_DIR", 90 "$NETSYSNATIVE_SOURCE_DIR/include", 91 "$NETSYSNATIVE_SOURCE_DIR/include/netsys", 92 "$NETSYSNATIVE_SOURCE_DIR/include/manager", 93 "$NETSYSCONTROLLER_ROOT_DIR/include", 94 "$NETSYSNATIVE_SOURCE_DIR/test", 95 ] 96 97 deps = [ 98 "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager_static", 99 "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", 100 ] 101 102 external_deps = [ 103 "ability_base:want", 104 "bundle_framework:appexecfwk_base", 105 "bundle_framework:appexecfwk_core", 106 "c_utils:utils", 107 "ipc:ipc_core", 108 "safwk:system_ability_fwk", 109 "samgr:samgr_proxy", 110 ] 111 112 defines = [ 113 "NETMGRNATIVE_LOG_TAG = \"NetsysNativeService\"", 114 "LOG_DOMAIN = 0xD0015B0", 115 ] 116 117 if (enable_netmgr_debug) { 118 defines += [ "NETMGR_DEBUG" ] 119 } 120 121 external_deps += [ "hilog:libhilog" ] 122 123 part_name = "netmanager_base" 124 subsystem_name = "communication" 125} 126