• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 = "filemanagement/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/user/src/mount_manager.cpp",
40    "$ROOT_DIR/user/src/user_manager.cpp",
41    "$ROOT_DIR/user/test/user_manager_test.cpp",
42    "$ROOT_DIR/utils/mount_argument_utils.cpp",
43    "$ROOT_DIR/utils/test/common/help_utils.cpp",
44  ]
45
46  deps = [
47    "$ROOT_DIR:storage_common_utils",
48    "//third_party/googletest:gtest_main",
49  ]
50
51  external_deps = [
52    "c_utils:utils",
53    "dfs_service:cloud_daemon_kit_inner",
54    "hilog:libhilog",
55    "huks:libhukssdk",
56    "init:libbegetutil",
57    "ipc:ipc_core",
58    "ipc:libdbinder",
59  ]
60}
61
62group("storage_daemon_user_test") {
63  testonly = true
64  deps = [ ":user_manager_test" ]
65}
66