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