1# Copyright (c) 2021-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 = "$storage_daemon_path" 18 19ohos_unittest("user_manager_test") { 20 module_out_path = "storage_service/storage_daemon" 21 22 defines = [ 23 "STORAGE_LOG_TAG = \"StorageDaemon\"", 24 "LOG_DOMAIN = 0xD004301", 25 ] 26 27 if (storage_service_user_crypto_manager) { 28 defines += [ "USER_CRYPTO_MANAGER" ] 29 } 30 31 include_dirs = [ 32 "$ROOT_DIR/include", 33 "$ROOT_DIR/utils", 34 "${storage_service_common_path}/include", 35 ] 36 37 sources = [ 38 "$ROOT_DIR/crypto/test/key_manager_mock.cpp", 39 "$ROOT_DIR/quota/quota_manager.cpp", 40 "$ROOT_DIR/user/src/mount_manager.cpp", 41 "$ROOT_DIR/user/src/user_manager.cpp", 42 "$ROOT_DIR/user/test/user_manager_test.cpp", 43 "$ROOT_DIR/utils/mount_argument_utils.cpp", 44 "$ROOT_DIR/utils/test/common/help_utils.cpp", 45 ] 46 47 deps = [ 48 "$ROOT_DIR:storage_common_utils", 49 "//third_party/googletest:gtest_main", 50 ] 51 52 external_deps = [ 53 "bundle_framework:appexecfwk_core", 54 "c_utils:utils", 55 "hilog:libhilog", 56 "huks:libhukssdk", 57 "init:libbegetutil", 58 "ipc:ipc_core", 59 "ipc:libdbinder", 60 ] 61 62 if (storage_service_dfs_service) { 63 defines += [ "DFS_SERVICE" ] 64 external_deps += [ "dfs_service:cloud_daemon_kit_inner" ] 65 } 66} 67 68group("storage_daemon_user_test") { 69 testonly = true 70 deps = [ ":user_manager_test" ] 71} 72