• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/test.gni")
14
15module_output_path = "datamgr_service/distributeddatafwk"
16
17###############################################################################
18ohos_unittest("CommunicationProviderTest") {
19  module_out_path = module_output_path
20
21  sources = [ "./unittest/communication_provider_impl_test.cpp" ]
22  include_dirs = [
23    "//commonlibrary/c_utils/base/include",
24    "//foundation/distributeddatamgr/kv_store/frameworks/common",
25    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/autils",
26    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/communicator",
27    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/dfx",
28    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include",
29    "../src",
30  ]
31  external_deps = [
32    "dsoftbus:softbus_client",
33    "hilog:libhilog",
34    "ipc:ipc_core",
35  ]
36  deps = [
37    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/communicator:distributeddata_communicator_static",
38    "//third_party/googletest:gtest_main",
39  ]
40  defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
41}
42
43ohos_unittest("DeviceManagerAdapterTest") {
44  module_out_path = module_output_path
45
46  sources = [ "unittest/device_manager_adapter_test.cpp" ]
47  include_dirs = [
48    "//commonlibrary/c_utils/base/include",
49    "//foundation/distributeddatamgr/kv_store/frameworks/common",
50    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/autils",
51    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/communicator",
52    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/dfx",
53    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include",
54    "../src",
55  ]
56  external_deps = [
57    "access_token:libaccesstoken_sdk",
58    "access_token:libnativetoken",
59    "access_token:libtoken_setproc",
60    "dsoftbus:softbus_client",
61    "hilog:libhilog",
62    "ipc:ipc_core",
63  ]
64  deps = [
65    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/communicator:distributeddata_communicator_static",
66    "//foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp:devicemanagersdk",
67    "//third_party/googletest:gtest_main",
68  ]
69  defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
70}
71
72###############################################################################
73config("module_comm_config") {
74  visibility = [ ":*" ]
75
76  include_dirs = [
77    "./unittest/communicator",
78    "./unittest/communicator/include",
79    "//commonlibrary/c_utils/base/include",
80    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include",
81    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/communicator",
82    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/dfx",
83    "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/include/autils",
84  ]
85}
86
87###############################################################################
88group("unittest") {
89  testonly = true
90
91  deps = []
92
93  deps += [
94    ":CommunicationProviderTest",
95    ":DeviceManagerAdapterTest",
96  ]
97}
98###############################################################################
99