• 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 = "data_object/impl"
17
18data_object_base_path = "//foundation/distributeddatamgr/data_object"
19
20data_object_innerkits_path = "${data_object_base_path}/frameworks/innerkitsimpl"
21
22kv_store_include_path =
23    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb"
24
25config("module_private_config") {
26  visibility = [ ":*" ]
27
28  include_dirs = [
29    "./mock/include",
30    "${data_object_innerkits_path}/include/adaptor",
31    "${data_object_innerkits_path}/include/common",
32    "${data_object_innerkits_path}/include/communicator",
33    "${kv_store_include_path}/include",
34    "${kv_store_include_path}/interfaces/include/",
35    "${kv_store_include_path}/interfaces/include/relational",
36  ]
37}
38
39ohos_unittest("NativeObjectStoreTest") {
40  module_out_path = module_output_path
41
42  sources = [
43    "mock/src/mock_soft_bus.cpp",
44    "src/app_pipe_mgr_test.cpp",
45    "src/communicator_test.cpp",
46    "src/object_store_test.cpp",
47    "src/process_communicator_impl_test.cpp",
48  ]
49
50  configs = [ ":module_private_config" ]
51
52  external_deps = [
53    "access_token:libaccesstoken_sdk",
54    "access_token:libnativetoken",
55    "data_object:distributeddataobject_impl",
56    "hilog_native:libhilog",
57  ]
58
59  deps = [
60    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
61    "//third_party/googletest:gmock",
62    "//third_party/googletest:gtest_main",
63  ]
64}
65
66group("unittest") {
67  testonly = true
68  deps = [ ":NativeObjectStoreTest" ]
69}
70