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