• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../../../../backup.gni")
16
17ohos_unittest("bms_adapter_test") {
18  module_out_path = path_module_out_tests
19
20  include_dirs = [
21    "${path_backup}/interfaces/inner_api/native/backup_kit_inner/impl",
22    "${path_backup}/services/backup_sa/include",
23    "${path_backup}/utils/include",
24    "${path_backup}/utils/include/b_hilog",
25    "${path_backup_mock}/utils_mock/include",
26  ]
27
28  sources = [
29    "${path_backup_mock}/utils_mock/src/b_jsonutil_mock.cpp",
30    "${path_backup_mock}/utils_mock/src/b_sa_utils_mock.cpp",
31    "bms_adapter_test.cpp",
32  ]
33
34  deps = [
35    "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner",
36    "${path_backup}/services/backup_sa:backup_sa",
37  ]
38
39  defines = [
40    "LOG_TAG=\"app_file_service\"",
41    "LOG_DOMAIN=0xD200000",
42    "private = public",
43    "protected = public",
44  ]
45
46  external_deps = [
47    "bundle_framework:appexecfwk_base",
48    "bundle_framework:appexecfwk_core",
49    "c_utils:utils",
50    "googletest:gmock_main",
51    "googletest:gtest_main",
52    "hilog:libhilog",
53    "hitrace:hitrace_meter",
54    "ipc:ipc_core",
55    "jsoncpp:jsoncpp",
56    "safwk:system_ability_fwk",
57    "samgr:samgr_proxy",
58    "storage_service:storage_manager_sa_proxy",
59  ]
60
61  use_exceptions = true
62}
63
64group("adapter_test") {
65  testonly = true
66  deps = [ ":bms_adapter_test" ]
67}
68