• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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")
15import("//foundation/distributeddatamgr/pasteboard/pasteboard.gni")
16
17config("module_private_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "${pasteboard_innerkits_path}/include",
22    "//foundation/distributeddatamgr/pasteboard/framework/framework/include",
23    "//foundation/distributeddatamgr/pasteboard/framework/tlv",
24    "${pasteboard_root_path}/framework/framework/include/serializable",
25    "${pasteboard_service_path}/load/include",
26    "include",
27    "test/include",
28  ]
29}
30
31module_output_path = "pasteboard/pasteboard_service"
32
33ohos_unittest("PasteboardFrameworkTest") {
34  resource_config_file = "//foundation/distributeddatamgr/pasteboard/framework/test/resource/ohos_test.xml"
35  module_out_path = module_output_path
36
37  sources = [
38    "${pasteboard_root_path}/framework/framework/serializable/serializable.cpp",
39    "${pasteboard_service_path}/load/src/config.cpp",
40    "src/clip_para_test.cpp",
41    "src/dm_adapter_test.cpp",
42    "src/paste_data_test.cpp",
43    "src/pasteboard_client_test.cpp",
44    "src/serializable_test.cpp",
45    "src/tlv_object_test.cpp",
46    "src/web_controller_test.cpp",
47  ]
48  configs = [
49    "//commonlibrary/c_utils/base:utils_config",
50    ":module_private_config",
51  ]
52  external_deps = [
53    "ability_base:base",
54    "ability_base:want",
55    "ability_base:zuri",
56    "app_file_service:remote_file_share_native",
57    "c_utils:utils",
58    "hilog:libhilog",
59    "image_framework:image_native",
60    "init:libbeget_proxy",
61    "init:libbegetutil",
62    "ipc:ipc_core",
63  ]
64
65  deps = [
66    "${pasteboard_framework_path}:pasteboard_framework",
67    "${pasteboard_innerkits_path}:pasteboard_client",
68    "//foundation/distributeddatamgr/pasteboard/framework/uri:pasteboard_uri",
69    "//third_party/googletest:gmock",
70    "//third_party/googletest:gtest_main",
71  ]
72
73  defines = []
74
75  if (pb_device_info_manager_part_enabled) {
76    external_deps += [ "device_info_manager:distributed_device_profile_client" ]
77    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
78  }
79
80  if (pb_device_manager_part_enabled) {
81    external_deps += [ "device_manager:devicemanagersdk" ]
82    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
83  }
84
85  configs += [ "//third_party/cJSON:cJSON_config" ]
86
87  deps += [ "//third_party/cJSON:cjson" ]
88}
89