• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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.
13import("//build/ohos_var.gni")
14import("//build/test.gni")
15
16module_output_path = "datamgr_service/distributeddatafwk"
17
18###############################################################################
19config("module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "../bootstrap/include/",
24    "../config/include/",
25    "../directory/include/",
26    "../../framework/include/",
27  ]
28}
29
30ohos_unittest("ConfigFactoryTest") {
31  module_out_path = module_output_path
32  sources = [ "config_factory_test.cpp" ]
33
34  configs = [ ":module_private_config" ]
35
36  external_deps = [
37    "ability_base:base",
38    "ability_base:want",
39    "c_utils:utils",
40    "hiviewdfx_hilog_native:libhilog",
41    "ipc:ipc_core",
42  ]
43
44  deps = [
45    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
46    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework:distributeddatasvcfwk",
47    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service:distributeddatasvc",
48    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner",
49    "//third_party/googletest:gtest_main",
50    "//third_party/openssl:libcrypto_shared",
51  ]
52}
53
54ohos_unittest("DirectoryManagerTest") {
55  module_out_path = module_output_path
56  sources = [ "directory_manager_test.cpp" ]
57
58  configs = [ ":module_private_config" ]
59
60  external_deps = [
61    "ability_base:base",
62    "ability_base:want",
63    "access_token:libaccesstoken_sdk",
64    "access_token:libnativetoken",
65    "c_utils:utils",
66    "hiviewdfx_hilog_native:libhilog",
67    "ipc:ipc_core",
68  ]
69
70  deps = [
71    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
72    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework:distributeddatasvcfwk",
73    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service:distributeddatasvc",
74    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner",
75    "//third_party/googletest:gtest_main",
76  ]
77}
78
79###############################################################################
80group("unittest") {
81  testonly = true
82
83  deps = []
84
85  deps += [
86    ":ConfigFactoryTest",
87    ":DirectoryManagerTest",
88  ]
89}
90###############################################################################
91