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