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") 15import("//foundation/filemanagement/storage_service/storage_service_aafwk.gni") 16 17ROOT_DIR = "../../.." 18 19ohos_unittest("quota_manager_test") { 20 branch_protector_ret = "pac_ret" 21 sanitize = { 22 integer_overflow = true 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 } 27 module_out_path = "storage_service/storage_daemon" 28 29 defines = [ "STORAGE_LOG_TAG = \"StorageDaemon\"" ] 30 31 include_dirs = [ 32 "$ROOT_DIR/common/include", 33 "$ROOT_DIR/storage_daemon/include", 34 "$ROOT_DIR/storage_daemon/utils", 35 "$ROOT_DIR/storage_manager/include", 36 "${storage_interface_path}/innerkits/storage_manager/native", 37 ] 38 39 sources = [ 40 "$ROOT_DIR/storage_daemon/quota/quota_manager.cpp", 41 "$ROOT_DIR/storage_daemon/quota/test/quota_manager_test.cpp", 42 "$ROOT_DIR/storage_daemon/utils/test/common/help_utils.cpp", 43 ] 44 45 deps = [ 46 "$ROOT_DIR/storage_daemon:storage_common_utils", 47 "//third_party/googletest:gtest_main", 48 ] 49 50 external_deps = [ 51 "ability_base:zuri", 52 "app_file_service:fileuri_native", 53 "app_file_service:sandbox_helper_native", 54 "c_utils:utils", 55 "hilog:libhilog", 56 "init:libbegetutil", 57 "ipc:ipc_single", 58 ] 59} 60 61group("storage_daemon_quota_test") { 62 testonly = true 63 deps = [ ":quota_manager_test" ] 64} 65