1# Copyright (c) 2021 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/filemanagement/storage_service/storage_service_aafwk.gni") 16 17ohos_unittest("file_utils_test") { 18 branch_protector_ret = "pac_ret" 19 sanitize = { 20 integer_overflow = true 21 cfi = true 22 cfi_cross_dso = true 23 debug = false 24 } 25 module_out_path = "storage_service/storage_daemon" 26 27 defines = [ 28 "STORAGE_LOG_TAG = \"StorageDaemon\"", 29 "LOG_DOMAIN = 0xD004301", 30 ] 31 32 include_dirs = [ 33 "${storage_daemon_path}/include", 34 "${storage_service_common_path}/include", 35 "${storage_interface_path}/innerkits/storage_manager/native", 36 ] 37 38 sources = [ 39 "${storage_daemon_path}/utils/storage_radar.cpp", 40 "common/help_utils.cpp", 41 "file_utils_test.cpp", 42 ] 43 44 deps = [ 45 "${storage_daemon_path}:storage_common_utils", 46 "//third_party/googletest:gtest_main", 47 ] 48 49 external_deps = [ 50 "c_utils:utils", 51 "hilog:libhilog", 52 "hisysevent:libhisysevent", 53 "huks:libhukssdk", 54 "ipc:ipc_single", 55 "ipc:libdbinder", 56 ] 57} 58 59ohos_unittest("hi_audit_test") { 60 branch_protector_ret = "pac_ret" 61 sanitize = { 62 integer_overflow = true 63 cfi = true 64 cfi_cross_dso = true 65 debug = false 66 } 67 module_out_path = "storage_service/storage_daemon" 68 69 defines = [ 70 "STORAGE_LOG_TAG = \"StorageDaemon\"", 71 "LOG_DOMAIN = 0xD004301", 72 "private = public", 73 ] 74 75 include_dirs = [ 76 "${storage_daemon_path}/include", 77 "${storage_service_common_path}/include", 78 "${storage_interface_path}/innerkits/storage_manager/native", 79 ] 80 81 sources = [ "hi_audit_test.cpp" ] 82 83 deps = [ "${storage_daemon_path}:storage_common_utils" ] 84 85 external_deps = [ 86 "c_utils:utils", 87 "googletest:gtest_main", 88 "hilog:libhilog", 89 "hisysevent:libhisysevent", 90 "huks:libhukssdk", 91 "ipc:ipc_single", 92 "ipc:libdbinder", 93 ] 94} 95 96group("storage_daemon_utils_test") { 97 testonly = true 98 deps = [ 99 ":file_utils_test", 100 ":hi_audit_test", 101 ] 102} 103