1# Copyright (c) 2021-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_wrapper_test") { 18 module_out_path = "netmanager_base/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 = [ 29 "data_receiver_test.cpp", 30 "netsys_event_message_test.cpp", 31 "netsys_wrapper_test.cpp", 32 "wrapper_decoder_test.cpp", 33 "wrapper_distributor_test.cpp", 34 ] 35 36 include_dirs = [ 37 "$INNERKITS_ROOT/netmanagernative/include", 38 "$INNERKITS_ROOT/dnsresolverclient/include", 39 "$INNERKITS_ROOT/dnsresolverclient/include/proxy", 40 "$NETMANAGER_BASE_ROOT/test/commonduplicatedcode", 41 "$NETMANAGERNATIVE_ROOT/include/netsys/wrapper", 42 "$NETSYSNATIVE_SOURCE_DIR/include/netsys", 43 ] 44 45 deps = [ 46 "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager", 47 ] 48 49 external_deps = [ 50 "ability_base:want", 51 "bundle_framework:appexecfwk_base", 52 "bundle_framework:appexecfwk_core", 53 "c_utils:utils", 54 "ffrt:libffrt", 55 "ipc:ipc_core", 56 "safwk:system_ability_fwk", 57 "samgr:samgr_proxy", 58 ] 59 60 defines = [ 61 "NETMGRNATIVE_LOG_TAG = \"NetsysNativeService\"", 62 "LOG_DOMAIN = 0xD0015B0", 63 ] 64 65 external_deps += [ "hilog:libhilog" ] 66 67 part_name = "netmanager_base" 68 subsystem_name = "communication" 69} 70 71ohos_unittest("netsys_wrapper_fault_through_test") { 72 module_out_path = "netmanager_base/manager_test" 73 74 sanitize = { 75 cfi = true 76 cfi_cross_dso = true 77 debug = false 78 } 79 80 branch_protector_ret = "pac_ret" 81 82 sources = [ "wrapper_listener_test.cpp" ] 83 84 include_dirs = [ 85 "$INNERKITS_ROOT/netmanagernative/include", 86 "$INNERKITS_ROOT/dnsresolverclient/include", 87 "$INNERKITS_ROOT/dnsresolverclient/include/proxy", 88 "$NETMANAGER_BASE_ROOT/test/commonduplicatedcode", 89 "$NETMANAGERNATIVE_ROOT/include/netsys/wrapper", 90 "$NETSYSNATIVE_SOURCE_DIR/include/netsys", 91 ] 92 93 deps = [ 94 "$NETMANAGER_BASE_ROOT/services/netmanagernative:netsys_native_manager", 95 ] 96 97 external_deps = [ 98 "ability_base:want", 99 "bundle_framework:appexecfwk_base", 100 "bundle_framework:appexecfwk_core", 101 "c_utils:utils", 102 "ffrt:libffrt", 103 "ipc:ipc_core", 104 "safwk:system_ability_fwk", 105 "samgr:samgr_proxy", 106 "wifi:wifi_sdk", 107 ] 108 109 defines = [ 110 "NETMGRNATIVE_LOG_TAG = \"NetsysNativeService\"", 111 "LOG_DOMAIN = 0xD0015B0", 112 ] 113 114 external_deps += [ "hilog:libhilog" ] 115 116 part_name = "netmanager_base" 117 subsystem_name = "communication" 118} 119