• 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.
13
14import("//build/test.gni")
15
16module_output_path = "kv_store/distributeddatafwk"
17
18###############################################################################
19config("module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "//commonlibrary/c_utils/base/include",
24    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/include",
25    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/kvdb/src",
26    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/include",
27    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/src",
28    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/test/distributedtest/single_kvstore_client",
29    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/app_distributeddata/include",
30    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include",
31    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/include",
32    "//test/testfwk/developer_test/aw/distributed",
33  ]
34  lib_dirs = [ "//foundation/appexecfwk/libs" ]
35}
36
37ohos_distributedtest("DistributedTest") {
38  module_out_path = module_output_path
39
40  sources = [
41    "distributed_test_helper.cpp",
42    "distributed_test_helper.h",
43  ]
44  sources += [ "distributed_test.cpp" ]
45
46  configs = [ ":module_private_config" ]
47
48  external_deps = [
49    "c_utils:utils",
50    "hilog_native:libhilog",
51    "ipc:ipc_core",
52    "safwk:system_ability_fwk",
53    "samgr:samgr_proxy",
54  ]
55
56  deps = [
57    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
58    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/:distributeddb",
59    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/:distributeddata_inner",
60    "//third_party/googletest:gtest",
61  ]
62}
63
64ohos_distributedtest("DistributedTestAgent") {
65  module_out_path = module_output_path
66
67  sources = [ "distributed_test_agent.cpp" ]
68
69  configs = [ ":module_private_config" ]
70
71  external_deps = [
72    "c_utils:utils",
73    "hilog_native:libhilog",
74    "ipc:ipc_core",
75    "safwk:system_ability_fwk",
76    "samgr:samgr_proxy",
77  ]
78
79  deps = [
80    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter",
81    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/:distributeddb",
82    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/:distributeddata_inner",
83    "//third_party/googletest:gtest",
84  ]
85}
86
87###############################################################################
88group("distributedtest") {
89  testonly = true
90
91  deps = [
92    ":DistributedTest",
93    ":DistributedTestAgent",
94  ]
95}
96###############################################################################
97