1# Copyright (c) 2023 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") 15 16module_output_path = "enterprise_device_management/enterprise_device_management" 17 18ohos_unittest("EdmNetworkManagerProxyUnitTest") { 19 module_out_path = module_output_path 20 21 include_dirs = [ 22 "../include", 23 "../mock/include", 24 "../enterprise_device_mgr_proxy/enterprise_device_mgr_proxy_test", 25 ] 26 27 sources = [ 28 "../enterprise_device_mgr_proxy/enterprise_device_mgr_proxy_test/enterprise_device_mgr_stub_mock.cpp", 29 "../mock/src/edm_sys_manager_mock.cpp", 30 "../src/utils.cpp", 31 "./network_manager_proxy_test/network_manager_proxy_test.cpp", 32 ] 33 34 configs = [ "../../../common/config:coverage_flags" ] 35 36 deps = [ 37 "../../../common/native:edm_commom", 38 "../../../interfaces/inner_api:edmservice_kits", 39 "//third_party/googletest:gmock_main", 40 "//third_party/googletest:gtest_main", 41 ] 42 43 external_deps = [ 44 "ability_base:want", 45 "access_token:libaccesstoken_sdk", 46 "access_token:libnativetoken", 47 "access_token:libtoken_setproc", 48 "c_utils:utils", 49 "hilog:libhilog", 50 "init:libbegetutil", 51 "ipc:ipc_core", 52 "netmanager_base:net_conn_manager_if", 53 "os_account:os_account_innerkits", 54 "samgr:samgr_proxy", 55 ] 56 57 sanitize = { 58 boundary_sanitize = true 59 cfi = true 60 cfi_cross_dso = true 61 debug = false 62 integer_overflow = true 63 ubsan = true 64 blocklist = "../cfi_blocklist.txt" 65 } 66 branch_protector_ret = "pac_ret" 67 subsystem_name = "customization" 68 part_name = "enterprise_device_management" 69} 70 71group("unittest") { 72 testonly = true 73 74 deps = [ 75 # deps file 76 ":EdmNetworkManagerProxyUnitTest", 77 ] 78} 79