• 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    "../include/",
24    "../../service/bootstrap/include/",
25  ]
26  ldflags = [ "-Wl,--whole-archive" ]
27}
28
29ohos_unittest("CheckerManagerTest") {
30  module_out_path = module_output_path
31  sources = [ "checker_manager_test.cpp" ]
32
33  configs = [ ":module_private_config" ]
34
35  external_deps = [
36    "access_token:libaccesstoken_sdk",
37    "access_token:libnativetoken",
38    "c_utils:utils",
39    "hiviewdfx_hilog_native:libhilog",
40    "ipc:ipc_core",
41  ]
42
43  deps = [
44    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
45    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/checker:distributeddata_checker_static",
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("EventCenterTest") {
55  module_out_path = module_output_path
56  sources = [ "event_center_test.cpp" ]
57
58  configs = [ ":module_private_config" ]
59
60  external_deps = [
61    "c_utils:utils",
62    "hiviewdfx_hilog_native:libhilog",
63    "ipc:ipc_core",
64  ]
65
66  deps = [
67    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
68    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework:distributeddatasvcfwk",
69    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner",
70    "//third_party/googletest:gtest_main",
71  ]
72}
73
74ohos_unittest("SerializableTest") {
75  module_out_path = module_output_path
76
77  sources = [ "serializable_test.cpp" ]
78
79  configs = [ ":module_private_config" ]
80
81  external_deps = [
82    "ability_base:base",
83    "ability_base:want",
84    "c_utils:utils",
85    "hiviewdfx_hilog_native:libhilog",
86    "ipc:ipc_core",
87  ]
88
89  deps = [
90    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
91    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework:distributeddatasvcfwk",
92    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner",
93    "//third_party/googletest:gtest_main",
94    "//third_party/openssl:libcrypto_shared",
95  ]
96}
97
98###############################################################################
99group("unittest") {
100  testonly = true
101
102  deps = []
103
104  deps += [
105    ":CheckerManagerTest",
106    ":EventCenterTest",
107    ":SerializableTest",
108  ]
109}
110###############################################################################
111