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("EdmSystemManagerProxyUnitTest") { 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 "./system_manager_proxy_test.cpp", 32 ] 33 34 configs = [ "../../../common/config:coverage_flags" ] 35 36 deps = [ 37 "../../../interfaces/inner_api:edmservice_kits", 38 "//third_party/googletest:gmock_main", 39 "//third_party/googletest:gtest_main", 40 ] 41 42 external_deps = [ 43 "ability_base:want", 44 "access_token:libaccesstoken_sdk", 45 "access_token:libnativetoken", 46 "access_token:libtoken_setproc", 47 "c_utils:utils", 48 "hilog:libhilog", 49 "init:libbegetutil", 50 "ipc:ipc_core", 51 "netmanager_base:net_conn_manager_if", 52 "os_account:os_account_innerkits", 53 "samgr:samgr_proxy", 54 ] 55 56 sanitize = { 57 boundary_sanitize = true 58 cfi = true 59 cfi_cross_dso = true 60 debug = false 61 integer_overflow = true 62 ubsan = true 63 blocklist = "../cfi_blocklist.txt" 64 } 65 branch_protector_ret = "pac_ret" 66 subsystem_name = "customization" 67 part_name = "enterprise_device_management" 68} 69 70group("unittest") { 71 testonly = true 72 73 deps = [ 74 # deps file 75 ":EdmSystemManagerProxyUnitTest", 76 ] 77} 78