• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 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    "${pasteboard_utils_path}/native/include",
23    "${pasteboard_service_path}/dfx/src",
24    "${pasteboard_service_path}/dfx/src/behaviour",
25    "${pasteboard_service_path}/dfx/src/fault",
26    "${pasteboard_service_path}/dfx/src/statistic",
27    "${pasteboard_service_path}/core/include",
28    "include",
29    "unittest/include",
30    "//foundation/distributeddatamgr/pasteboard/framework/tlv",
31  ]
32}
33
34module_output_path = "pasteboard/pasteboard"
35
36ohos_unittest("PasteboardServiceTest") {
37  module_out_path = module_output_path
38  sanitize = {
39    ubsan = true
40    boundary_sanitize = true
41    cfi = true
42    cfi_cross_dso = true
43    debug = false
44  }
45  cflags = [ "-fno-access-control" ]
46  sources = [
47    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
48    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
49    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
50    "${pasteboard_service_path}/dfx/src/pasteboard_app_event_dfx.cpp",
51    "${pasteboard_service_path}/dfx/src/reporter.cpp",
52    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
53    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_client.cpp",
54    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_stub.cpp",
55    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
56    "unittest/src/dfx_test.cpp",
57    "unittest/src/paste_service_test.cpp",
58    "unittest/src/pasteboard_entry_getter_client_test.cpp",
59  ]
60  configs = [ ":module_private_config" ]
61  external_deps = [
62    "ability_base:want",
63    "ability_base:zuri",
64    "ability_runtime:wantagent_innerkits",
65    "access_token:libaccesstoken_sdk",
66    "access_token:libtoken_setproc",
67    "c_utils:utils",
68    "ffrt:libffrt",
69    "googletest:gtest_main",
70    "hiappevent:hiappevent_innerapi",
71    "hilog:libhilog",
72    "hisysevent:libhisysevent",
73    "image_framework:image_native",
74    "ipc:ipc_core",
75    "os_account:os_account_innerkits",
76    "samgr:samgr_proxy",
77    "udmf:udmf_client",
78  ]
79
80  deps = [
81    "${pasteboard_framework_path}:pasteboard_framework",
82    "${pasteboard_innerkits_path}:pasteboard_client",
83    "${pasteboard_innerkits_path}:pasteboard_data",
84  ]
85}
86
87ohos_unittest("PasteServInterfaceTest") {
88  use_exceptions = true
89  module_out_path = module_output_path
90  sources = [
91    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
92    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
93    "${pasteboard_service_path}/account/src/account_manager.cpp",
94    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
95    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
96    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
97    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
98    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
99    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
100    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
101    "${pasteboard_service_path}/dfx/src/command.cpp",
102    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
103    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
104    "${pasteboard_service_path}/dfx/src/pasteboard_dump_helper.cpp",
105    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
106    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
107    "${pasteboard_service_path}/dfx/src/reporter.cpp",
108    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
109    "${pasteboard_service_path}/load/src/config.cpp",
110    "${pasteboard_service_path}/load/src/loader.cpp",
111    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
112    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
113    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
114    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
115    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
116    "unittest/src/pasteboard_service_test.cpp",
117  ]
118  defines = []
119  configs = [ ":module_private_config" ]
120  cflags = [ "-fno-access-control" ]
121  include_dirs = [
122    "${pasteboard_service_path}/dfx/src",
123    "${pasteboard_service_path}/dfx/src/behaviour",
124    "${pasteboard_service_path}/dfx/src/statistic",
125    "${pasteboard_service_path}/dfx/src/fault",
126    "${pasteboard_service_path}/zidl/include",
127    "${pasteboard_service_path}/account/include",
128    "${pasteboard_service_path}/core/include",
129    "${pasteboard_service_path}/load/include",
130    "${pasteboard_service_path}/switch",
131    "${pasteboard_root_path}/adapter/data_share",
132    "${pasteboard_root_path}/adapter/pasteboard_progress",
133    "${pasteboard_root_path}/adapter/security_level",
134    "${pasteboard_innerkits_path}/include",
135    "${pasteboard_utils_path}/mock/include",
136    "${pasteboard_utils_path}/native/include",
137    "${pasteboard_utils_path}/system/safwk/native/include",
138    "${pasteboard_framework_path}/framework/include",
139    "${pasteboard_framework_path}/framework/include/device",
140  ]
141  external_deps = [
142    "ability_base:base",
143    "ability_base:want",
144    "ability_base:zuri",
145    "ability_runtime:ability_manager",
146    "ability_runtime:uri_permission_mgr",
147    "ability_runtime:wantagent_innerkits",
148    "access_token:libaccesstoken_sdk",
149    "access_token:libprivacy_sdk",
150    "access_token:libtokenid_sdk",
151    "app_file_service:remote_file_share_native",
152    "bundle_framework:appexecfwk_base",
153    "bundle_framework:appexecfwk_core",
154    "cJSON:cjson",
155    "common_event_service:cesfwk_innerkits",
156    "data_share:datashare_consumer",
157    "dataclassification:data_transit_mgr",
158    "device_manager:devicemanagersdk",
159    "dfs_service:distributed_file_daemon_kit_inner",
160    "eventhandler:libeventhandler",
161    "ffrt:libffrt",
162    "googletest:gmock",
163    "hilog:libhilog",
164    "hisysevent:libhisysevent",
165    "hitrace:hitrace_meter",
166    "hitrace:libhitracechain",
167    "image_framework:image_native",
168    "imf:inputmethod_client",
169    "input:libmmi-client",
170    "ipc:ipc_single",
171    "libxml2:libxml2",
172    "memmgr:memmgrclient",
173    "os_account:os_account_innerkits",
174    "resource_schedule_service:ressched_client",
175    "safwk:system_ability_fwk",
176    "samgr:samgr_proxy",
177    "udmf:udmf_client",
178  ]
179  deps = [
180    "${pasteboard_framework_path}:pasteboard_framework",
181    "${pasteboard_innerkits_path}:pasteboard_client",
182    "${pasteboard_innerkits_path}:pasteboard_data",
183    "${pasteboard_service_path}:pasteboard_service",
184    "${pasteboard_service_path}:pasteboard_stub_proxy",
185  ]
186  if (pasteboard_vixl_part_enabled) {
187    external_deps += [ "vixl:libvixl" ]
188    defines += [ "PB_VIXL_ENABLE" ]
189  }
190
191  if (window_manager_use_sceneboard) {
192    external_deps += [ "window_manager:libwm_lite" ]
193    defines += [ "SCENE_BOARD_ENABLE" ]
194  } else {
195    external_deps += [ "window_manager:libwm" ]
196  }
197  if (pasteboard_dlp_part_enabled) {
198    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
199    defines += [ "WITH_DLP" ]
200  }
201  if (pasteboard_device_info_manager_part_enabled) {
202    external_deps += [
203      "device_info_manager:distributed_device_profile_common",
204      "device_info_manager:distributed_device_profile_sdk",
205    ]
206    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
207  }
208
209  if (pasteboard_device_manager_part_enabled) {
210    external_deps += [ "device_manager:devicemanagersdk" ]
211    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
212  }
213
214  if (pasteboard_screenlock_mgr_part_enabled) {
215    external_deps += [ "screenlock_mgr:screenlock_client" ]
216    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
217  }
218}
219
220ohos_unittest("PasteServInterfaceMockTest") {
221  use_exceptions = true
222  module_out_path = module_output_path
223  sources = [
224    "${pasteboard_framework_path}/clip/default_clip.cpp",
225    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
226    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
227    "${pasteboard_service_path}/account/src/account_manager.cpp",
228    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
229    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
230    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
231    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
232    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
233    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
234    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
235    "${pasteboard_service_path}/dfx/src/command.cpp",
236    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
237    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
238    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
239    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
240    "${pasteboard_service_path}/dfx/src/reporter.cpp",
241    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
242    "${pasteboard_service_path}/load/src/config.cpp",
243    "${pasteboard_service_path}/load/src/loader.cpp",
244    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
245    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
246    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
247    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
248    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
249    "unittest/src/pasteboard_service_mock_test.cpp",
250  ]
251  defines = []
252  configs = [ ":module_private_config" ]
253  cflags = [ "-fno-access-control" ]
254  include_dirs = [
255    "${pasteboard_service_path}/dfx/src",
256    "${pasteboard_service_path}/dfx/src/behaviour",
257    "${pasteboard_service_path}/dfx/src/statistic",
258    "${pasteboard_service_path}/dfx/src/fault",
259    "${pasteboard_service_path}/zidl/include",
260    "${pasteboard_service_path}/account/include",
261    "${pasteboard_service_path}/core/include",
262    "${pasteboard_service_path}/load/include",
263    "${pasteboard_service_path}/switch",
264    "${pasteboard_root_path}/adapter/data_share",
265    "${pasteboard_root_path}/adapter/pasteboard_progress",
266    "${pasteboard_root_path}/adapter/security_level",
267    "${pasteboard_innerkits_path}/include",
268    "${pasteboard_utils_path}/mock/include",
269    "${pasteboard_utils_path}/native/include",
270    "${pasteboard_utils_path}/system/safwk/native/include",
271    "${pasteboard_framework_path}/clip",
272    "${pasteboard_framework_path}/framework/include",
273    "${pasteboard_framework_path}/framework/include/device",
274    "${pasteboard_framework_path}/tlv",
275  ]
276  external_deps = [
277    "ability_base:base",
278    "ability_base:want",
279    "ability_base:zuri",
280    "ability_runtime:ability_manager",
281    "ability_runtime:uri_permission_mgr",
282    "ability_runtime:wantagent_innerkits",
283    "access_token:libaccesstoken_sdk",
284    "access_token:libprivacy_sdk",
285    "access_token:libtokenid_sdk",
286    "app_file_service:remote_file_share_native",
287    "bundle_framework:appexecfwk_base",
288    "bundle_framework:appexecfwk_core",
289    "cJSON:cjson",
290    "common_event_service:cesfwk_innerkits",
291    "data_share:datashare_consumer",
292    "dataclassification:data_transit_mgr",
293    "device_manager:devicemanagersdk",
294    "dfs_service:distributed_file_daemon_kit_inner",
295    "eventhandler:libeventhandler",
296    "ffrt:libffrt",
297    "googletest:gmock",
298    "hilog:libhilog",
299    "hisysevent:libhisysevent",
300    "hitrace:hitrace_meter",
301    "hitrace:libhitracechain",
302    "imf:inputmethod_client",
303    "input:libmmi-client",
304    "ipc:ipc_single",
305    "libxml2:libxml2",
306    "memmgr:memmgrclient",
307    "os_account:os_account_innerkits",
308    "resource_schedule_service:ressched_client",
309    "safwk:system_ability_fwk",
310    "samgr:samgr_proxy",
311    "udmf:udmf_client",
312  ]
313  deps = [
314    "${pasteboard_framework_path}:pasteboard_framework",
315    "${pasteboard_innerkits_path}:pasteboard_client",
316    "${pasteboard_innerkits_path}:pasteboard_data",
317    "${pasteboard_service_path}:pasteboard_service",
318    "${pasteboard_service_path}:pasteboard_stub_proxy",
319  ]
320  if (pasteboard_vixl_part_enabled) {
321    external_deps += [ "vixl:libvixl" ]
322    defines += [ "PB_VIXL_ENABLE" ]
323  }
324
325  if (window_manager_use_sceneboard) {
326    external_deps += [ "window_manager:libwm_lite" ]
327    defines += [ "SCENE_BOARD_ENABLE" ]
328  } else {
329    external_deps += [ "window_manager:libwm" ]
330  }
331  if (pasteboard_dlp_part_enabled) {
332    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
333    defines += [ "WITH_DLP" ]
334  }
335  if (pasteboard_device_info_manager_part_enabled) {
336    external_deps += [
337      "device_info_manager:distributed_device_profile_common",
338      "device_info_manager:distributed_device_profile_sdk",
339    ]
340    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
341  }
342
343  if (pasteboard_device_manager_part_enabled) {
344    external_deps += [ "device_manager:devicemanagersdk" ]
345    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
346  }
347
348  if (pasteboard_screenlock_mgr_part_enabled) {
349    external_deps += [ "screenlock_mgr:screenlock_client" ]
350    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
351  }
352}
353
354ohos_unittest("PasteboardDialogNormalTest") {
355  module_out_path = module_output_path
356  sources = [
357    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
358    "unittest/src/pasteboard_dialog_normal_branch_test.cpp",
359  ]
360  configs = [ ":module_private_config" ]
361  external_deps = [
362    "ability_base:want",
363    "ability_runtime:ability_manager",
364    "c_utils:utils",
365    "googletest:gtest_main",
366    "hilog:libhilog",
367    "ipc:ipc_core",
368    "samgr:samgr_proxy",
369  ]
370}
371
372ohos_unittest("PasteboardDialogAbnormalTest") {
373  module_out_path = module_output_path
374
375  sources = [
376    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
377    "unittest/src/pasteboard_dialog_abnormal_branch_test.cpp",
378  ]
379  configs = [ ":module_private_config" ]
380  external_deps = [
381    "ability_base:want",
382    "ability_runtime:ability_manager",
383    "c_utils:utils",
384    "googletest:gtest_main",
385    "hilog:libhilog",
386    "ipc:ipc_core",
387    "samgr:samgr_proxy",
388  ]
389}
390
391ohos_unittest("PasteboardLinkedListTest") {
392  module_out_path = module_output_path
393  include_dirs = [ "${pasteboard_utils_path}/native/include" ]
394  sources = [ "unittest/src/pasteboard_linked_list_test.cpp" ]
395  external_deps = [
396    "googletest:gtest_main",
397    "hilog:libhilog",
398  ]
399}
400
401ohos_unittest("PasteboardDeduplicateMemoryTest") {
402  module_out_path = module_output_path
403  include_dirs = [
404    "${pasteboard_service_path}/dfx/src",
405    "${pasteboard_utils_path}/native/include",
406  ]
407  sources = [ "unittest/src/pasteboard_deduplicate_memory_test.cpp" ]
408  external_deps = [
409    "c_utils:utils",
410    "googletest:gtest_main",
411    "hilog:libhilog",
412  ]
413}
414
415ohos_unittest("PasteboardPatternTest") {
416  use_exceptions = true
417  module_out_path = module_output_path
418  sources = [
419    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
420    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
421    "unittest/src/pasteboard_pattern_test.cpp",
422  ]
423  configs = [ ":module_private_config" ]
424  external_deps = [
425    "c_utils:utils",
426    "ffrt:libffrt",
427    "googletest:gtest_main",
428    "hilog:libhilog",
429    "ipc:ipc_core",
430    "libxml2:libxml2",
431    "udmf:udmf_client",
432  ]
433  deps = [
434    "${pasteboard_framework_path}:pasteboard_framework",
435    "${pasteboard_innerkits_path}:pasteboard_client",
436    "${pasteboard_innerkits_path}:pasteboard_data",
437  ]
438}
439
440ohos_unittest("PasteboardDelayStubTest") {
441  module_out_path = module_output_path
442  defines = [
443    "private = public",
444    "protected = public",
445  ]
446  sources = [
447    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_stub.cpp",
448    "${pasteboard_service_path}/zidl/src/pasteboard_observer_stub.cpp",
449    "unittest/src/pasteboard_delay_getter_stub_test.cpp",
450  ]
451  configs = [ ":module_private_config" ]
452  deps = [
453    "${pasteboard_framework_path}:pasteboard_framework",
454    "${pasteboard_innerkits_path}:pasteboard_client",
455    "${pasteboard_innerkits_path}:pasteboard_data",
456    "${pasteboard_service_path}:pasteboard_service",
457  ]
458  external_deps = [
459    "c_utils:utils",
460    "ffrt:libffrt",
461    "googletest:gmock_main",
462    "googletest:gtest_main",
463    "hilog:libhilog",
464    "ipc:ipc_core",
465    "udmf:udmf_client",
466  ]
467}
468
469ohos_unittest("PasteboardDelayProxyTest") {
470  module_out_path = module_output_path
471  defines = [
472    "private = public",
473    "protected = public",
474  ]
475  sources = [
476    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
477    "unittest/src/pasteboard_delay_getter_proxy_test.cpp",
478  ]
479  configs = [ ":module_private_config" ]
480  deps = [
481    "${pasteboard_framework_path}:pasteboard_framework",
482    "${pasteboard_innerkits_path}:pasteboard_client",
483    "${pasteboard_innerkits_path}:pasteboard_data",
484    "${pasteboard_service_path}:pasteboard_service",
485  ]
486  external_deps = [
487    "c_utils:utils",
488    "ffrt:libffrt",
489    "googletest:gmock_main",
490    "googletest:gtest_main",
491    "hilog:libhilog",
492    "ipc:ipc_core",
493    "udmf:udmf_client",
494  ]
495}
496
497ohos_unittest("PasteboardEntryGetterStubTest") {
498  module_out_path = module_output_path
499  include_dirs = []
500  sources = [
501    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_stub.cpp",
502    "${pasteboard_tlv_path}/message_parcel_warp.cpp",
503    "unittest/src/pasteboard_entry_getter_stub_test.cpp",
504  ]
505  configs = [ ":module_private_config" ]
506  cflags = [ "-fno-access-control" ]
507  external_deps = [
508    "c_utils:utils",
509    "ffrt:libffrt",
510    "googletest:gmock",
511    "googletest:gtest_main",
512    "hilog:libhilog",
513    "init:libbegetutil",
514    "ipc:ipc_core",
515    "udmf:udmf_client",
516  ]
517  deps = [
518    "${pasteboard_framework_path}:pasteboard_framework",
519    "${pasteboard_innerkits_path}:pasteboard_client",
520    "${pasteboard_innerkits_path}:pasteboard_data",
521  ]
522}
523
524ohos_unittest("PasteboardEntryGetterProxyTest") {
525  module_out_path = module_output_path
526  include_dirs = []
527  sources = [
528    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
529    "${pasteboard_tlv_path}/message_parcel_warp.cpp",
530    "unittest/src/pasteboard_entry_getter_proxy_test.cpp",
531  ]
532  configs = [ ":module_private_config" ]
533  cflags = [ "-fno-access-control" ]
534  external_deps = [
535    "c_utils:utils",
536    "ffrt:libffrt",
537    "googletest:gmock",
538    "googletest:gtest_main",
539    "hilog:libhilog",
540    "init:libbegetutil",
541    "ipc:ipc_core",
542    "udmf:udmf_client",
543  ]
544  deps = [
545    "${pasteboard_framework_path}:pasteboard_framework",
546    "${pasteboard_innerkits_path}:pasteboard_client",
547    "${pasteboard_innerkits_path}:pasteboard_data",
548  ]
549}
550
551ohos_unittest("PasteboardLoadTest") {
552  module_out_path = module_output_path
553  include_dirs = [ "${pasteboard_root_path}/services/load/include" ]
554  sources = [
555    "${pasteboard_root_path}/services/load/src/loader.cpp",
556    "unittest/src/pasteboard_load_test.cpp",
557  ]
558  configs = [ ":module_private_config" ]
559  cflags = [ "-fno-access-control" ]
560  external_deps = [
561    "c_utils:utils",
562    "ffrt:libffrt",
563    "googletest:gtest_main",
564    "hilog:libhilog",
565    "init:libbegetutil",
566    "udmf:udmf_client",
567  ]
568  deps = [ "${pasteboard_framework_path}:pasteboard_framework" ]
569}
570
571ohos_unittest("PasteboardDisposableManagerTest") {
572  module_out_path = module_output_path
573
574  cflags = [ "-fno-access-control" ]
575
576  include_dirs = [
577    "${pasteboard_framework_path}/include",
578    "${pasteboard_service_path}/core/include",
579    "${pasteboard_utils_path}/native/include",
580    "unittest/mock/access_token",
581  ]
582
583  sources = [
584    "${pasteboard_framework_path}/ffrt/ffrt_utils.cpp",
585    "${pasteboard_framework_path}/permission/permission_utils.cpp",
586    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
587    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
588    "unittest/mock/access_token/accesstoken_kit_mock.cpp",
589    "unittest/src/pasteboard_disposable_manager_test.cpp",
590  ]
591
592  deps = [
593    "${pasteboard_framework_path}:pasteboard_framework",
594    "${pasteboard_innerkits_path}:pasteboard_client",
595    "${pasteboard_innerkits_path}:pasteboard_data",
596  ]
597
598  external_deps = [
599    "bundle_framework:appexecfwk_core",
600    "c_utils:utils",
601    "ffrt:libffrt",
602    "googletest:gmock",
603    "googletest:gtest_main",
604    "hilog:libhilog",
605    "init:libbegetutil",
606    "ipc:ipc_single",
607  ]
608}
609
610ohos_unittest("PasteServGetLocalDataTest") {
611  use_exceptions = true
612  module_out_path = module_output_path
613  sources = [
614    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
615    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
616    "${pasteboard_service_path}/account/src/account_manager.cpp",
617    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
618    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
619    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
620    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
621    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
622    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
623    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
624    "${pasteboard_service_path}/dfx/src/command.cpp",
625    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
626    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
627    "${pasteboard_service_path}/dfx/src/pasteboard_dump_helper.cpp",
628    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
629    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
630    "${pasteboard_service_path}/dfx/src/reporter.cpp",
631    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
632    "${pasteboard_service_path}/load/src/config.cpp",
633    "${pasteboard_service_path}/load/src/loader.cpp",
634    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
635    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
636    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
637    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
638    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
639    "unittest/src/pasteboard_service_getlocaldata_test.cpp",
640  ]
641  defines = []
642  configs = [ ":module_private_config" ]
643  cflags = [ "-fno-access-control" ]
644  include_dirs = [
645    "${pasteboard_service_path}/dfx/src",
646    "${pasteboard_service_path}/dfx/src/behaviour",
647    "${pasteboard_service_path}/dfx/src/statistic",
648    "${pasteboard_service_path}/dfx/src/fault",
649    "${pasteboard_service_path}/zidl/include",
650    "${pasteboard_service_path}/account/include",
651    "${pasteboard_service_path}/core/include",
652    "${pasteboard_service_path}/load/include",
653    "${pasteboard_service_path}/switch",
654    "${pasteboard_root_path}/adapter/data_share",
655    "${pasteboard_root_path}/adapter/pasteboard_progress",
656    "${pasteboard_root_path}/adapter/security_level",
657    "${pasteboard_innerkits_path}/include",
658    "${pasteboard_utils_path}/mock/include",
659    "${pasteboard_utils_path}/native/include",
660    "${pasteboard_utils_path}/system/safwk/native/include",
661    "${pasteboard_framework_path}/framework/include",
662    "${pasteboard_framework_path}/framework/include/device",
663  ]
664  external_deps = [
665    "ability_base:base",
666    "ability_base:want",
667    "ability_base:zuri",
668    "ability_runtime:ability_manager",
669    "ability_runtime:uri_permission_mgr",
670    "ability_runtime:wantagent_innerkits",
671    "access_token:libaccesstoken_sdk",
672    "access_token:libprivacy_sdk",
673    "access_token:libtokenid_sdk",
674    "app_file_service:remote_file_share_native",
675    "bundle_framework:appexecfwk_base",
676    "bundle_framework:appexecfwk_core",
677    "cJSON:cjson",
678    "common_event_service:cesfwk_innerkits",
679    "data_share:datashare_consumer",
680    "dataclassification:data_transit_mgr",
681    "device_manager:devicemanagersdk",
682    "dfs_service:distributed_file_daemon_kit_inner",
683    "eventhandler:libeventhandler",
684    "ffrt:libffrt",
685    "googletest:gmock",
686    "hilog:libhilog",
687    "hisysevent:libhisysevent",
688    "hitrace:hitrace_meter",
689    "hitrace:libhitracechain",
690    "image_framework:image_native",
691    "imf:inputmethod_client",
692    "input:libmmi-client",
693    "ipc:ipc_single",
694    "libxml2:libxml2",
695    "memmgr:memmgrclient",
696    "os_account:os_account_innerkits",
697    "resource_schedule_service:ressched_client",
698    "safwk:system_ability_fwk",
699    "samgr:samgr_proxy",
700    "udmf:udmf_client",
701  ]
702  deps = [
703    "${pasteboard_framework_path}:pasteboard_framework",
704    "${pasteboard_innerkits_path}:pasteboard_client",
705    "${pasteboard_innerkits_path}:pasteboard_data",
706    "${pasteboard_service_path}:pasteboard_service",
707    "${pasteboard_service_path}:pasteboard_stub_proxy",
708  ]
709  if (pasteboard_vixl_part_enabled) {
710    external_deps += [ "vixl:libvixl" ]
711    defines += [ "PB_VIXL_ENABLE" ]
712  }
713
714  if (window_manager_use_sceneboard) {
715    external_deps += [ "window_manager:libwm_lite" ]
716    defines += [ "SCENE_BOARD_ENABLE" ]
717  } else {
718    external_deps += [ "window_manager:libwm" ]
719  }
720  if (pasteboard_dlp_part_enabled) {
721    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
722    defines += [ "WITH_DLP" ]
723  }
724  if (pasteboard_device_info_manager_part_enabled) {
725    external_deps += [
726      "device_info_manager:distributed_device_profile_common",
727      "device_info_manager:distributed_device_profile_sdk",
728    ]
729    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
730  }
731
732  if (pasteboard_device_manager_part_enabled) {
733    external_deps += [ "device_manager:devicemanagersdk" ]
734    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
735  }
736
737  if (pasteboard_screenlock_mgr_part_enabled) {
738    external_deps += [ "screenlock_mgr:screenlock_client" ]
739    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
740  }
741}
742
743ohos_unittest("PasteServSubscribeTest") {
744  use_exceptions = true
745  module_out_path = module_output_path
746  sources = [
747    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
748    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
749    "${pasteboard_service_path}/account/src/account_manager.cpp",
750    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
751    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
752    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
753    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
754    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
755    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
756    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
757    "${pasteboard_service_path}/dfx/src/command.cpp",
758    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
759    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
760    "${pasteboard_service_path}/dfx/src/pasteboard_dump_helper.cpp",
761    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
762    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
763    "${pasteboard_service_path}/dfx/src/reporter.cpp",
764    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
765    "${pasteboard_service_path}/load/src/config.cpp",
766    "${pasteboard_service_path}/load/src/loader.cpp",
767    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
768    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
769    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
770    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
771    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
772    "unittest/src/pasteboard_service_subscribe_test.cpp",
773  ]
774  defines = []
775  configs = [ ":module_private_config" ]
776  cflags = [ "-fno-access-control" ]
777  include_dirs = [
778    "${pasteboard_service_path}/dfx/src",
779    "${pasteboard_service_path}/dfx/src/behaviour",
780    "${pasteboard_service_path}/dfx/src/statistic",
781    "${pasteboard_service_path}/dfx/src/fault",
782    "${pasteboard_service_path}/zidl/include",
783    "${pasteboard_service_path}/account/include",
784    "${pasteboard_service_path}/core/include",
785    "${pasteboard_service_path}/load/include",
786    "${pasteboard_service_path}/switch",
787    "${pasteboard_root_path}/adapter/data_share",
788    "${pasteboard_root_path}/adapter/pasteboard_progress",
789    "${pasteboard_root_path}/adapter/security_level",
790    "${pasteboard_innerkits_path}/include",
791    "${pasteboard_utils_path}/mock/include",
792    "${pasteboard_utils_path}/native/include",
793    "${pasteboard_utils_path}/system/safwk/native/include",
794    "${pasteboard_framework_path}/framework/include",
795    "${pasteboard_framework_path}/framework/include/device",
796  ]
797  external_deps = [
798    "ability_base:base",
799    "ability_base:want",
800    "ability_base:zuri",
801    "ability_runtime:ability_manager",
802    "ability_runtime:uri_permission_mgr",
803    "ability_runtime:wantagent_innerkits",
804    "access_token:libaccesstoken_sdk",
805    "access_token:libprivacy_sdk",
806    "access_token:libtokenid_sdk",
807    "app_file_service:remote_file_share_native",
808    "bundle_framework:appexecfwk_base",
809    "bundle_framework:appexecfwk_core",
810    "cJSON:cjson",
811    "common_event_service:cesfwk_innerkits",
812    "data_share:datashare_consumer",
813    "dataclassification:data_transit_mgr",
814    "device_manager:devicemanagersdk",
815    "dfs_service:distributed_file_daemon_kit_inner",
816    "eventhandler:libeventhandler",
817    "ffrt:libffrt",
818    "googletest:gmock",
819    "hilog:libhilog",
820    "hisysevent:libhisysevent",
821    "hitrace:hitrace_meter",
822    "hitrace:libhitracechain",
823    "image_framework:image_native",
824    "imf:inputmethod_client",
825    "input:libmmi-client",
826    "ipc:ipc_single",
827    "libxml2:libxml2",
828    "memmgr:memmgrclient",
829    "os_account:os_account_innerkits",
830    "resource_schedule_service:ressched_client",
831    "safwk:system_ability_fwk",
832    "samgr:samgr_proxy",
833    "udmf:udmf_client",
834  ]
835  deps = [
836    "${pasteboard_framework_path}:pasteboard_framework",
837    "${pasteboard_innerkits_path}:pasteboard_client",
838    "${pasteboard_innerkits_path}:pasteboard_data",
839    "${pasteboard_service_path}:pasteboard_service",
840    "${pasteboard_service_path}:pasteboard_stub_proxy",
841  ]
842  if (pasteboard_vixl_part_enabled) {
843    external_deps += [ "vixl:libvixl" ]
844    defines += [ "PB_VIXL_ENABLE" ]
845  }
846
847  if (window_manager_use_sceneboard) {
848    external_deps += [ "window_manager:libwm_lite" ]
849    defines += [ "SCENE_BOARD_ENABLE" ]
850  } else {
851    external_deps += [ "window_manager:libwm" ]
852  }
853  if (pasteboard_dlp_part_enabled) {
854    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
855    defines += [ "WITH_DLP" ]
856  }
857  if (pasteboard_device_info_manager_part_enabled) {
858    external_deps += [
859      "device_info_manager:distributed_device_profile_common",
860      "device_info_manager:distributed_device_profile_sdk",
861    ]
862    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
863  }
864
865  if (pasteboard_device_manager_part_enabled) {
866    external_deps += [ "device_manager:devicemanagersdk" ]
867    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
868  }
869
870  if (pasteboard_screenlock_mgr_part_enabled) {
871    external_deps += [ "screenlock_mgr:screenlock_client" ]
872    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
873  }
874}
875
876ohos_unittest("PasteServNotifyTest") {
877  use_exceptions = true
878  module_out_path = module_output_path
879  sources = [
880    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
881    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
882    "${pasteboard_service_path}/account/src/account_manager.cpp",
883    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
884    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
885    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
886    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
887    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
888    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
889    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
890    "${pasteboard_service_path}/dfx/src/command.cpp",
891    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
892    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
893    "${pasteboard_service_path}/dfx/src/pasteboard_dump_helper.cpp",
894    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
895    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
896    "${pasteboard_service_path}/dfx/src/reporter.cpp",
897    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
898    "${pasteboard_service_path}/load/src/config.cpp",
899    "${pasteboard_service_path}/load/src/loader.cpp",
900    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
901    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
902    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
903    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
904    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
905    "unittest/src/pasteboard_service_notify_test.cpp",
906  ]
907  defines = []
908  configs = [ ":module_private_config" ]
909  cflags = [ "-fno-access-control" ]
910  include_dirs = [
911    "${pasteboard_service_path}/dfx/src",
912    "${pasteboard_service_path}/dfx/src/behaviour",
913    "${pasteboard_service_path}/dfx/src/statistic",
914    "${pasteboard_service_path}/dfx/src/fault",
915    "${pasteboard_service_path}/zidl/include",
916    "${pasteboard_service_path}/account/include",
917    "${pasteboard_service_path}/core/include",
918    "${pasteboard_service_path}/load/include",
919    "${pasteboard_service_path}/switch",
920    "${pasteboard_root_path}/adapter/data_share",
921    "${pasteboard_root_path}/adapter/pasteboard_progress",
922    "${pasteboard_root_path}/adapter/security_level",
923    "${pasteboard_innerkits_path}/include",
924    "${pasteboard_utils_path}/mock/include",
925    "${pasteboard_utils_path}/native/include",
926    "${pasteboard_utils_path}/system/safwk/native/include",
927    "${pasteboard_framework_path}/framework/include",
928    "${pasteboard_framework_path}/framework/include/device",
929  ]
930  external_deps = [
931    "ability_base:base",
932    "ability_base:want",
933    "ability_base:zuri",
934    "ability_runtime:ability_manager",
935    "ability_runtime:uri_permission_mgr",
936    "ability_runtime:wantagent_innerkits",
937    "access_token:libaccesstoken_sdk",
938    "access_token:libprivacy_sdk",
939    "access_token:libtokenid_sdk",
940    "app_file_service:remote_file_share_native",
941    "bundle_framework:appexecfwk_base",
942    "bundle_framework:appexecfwk_core",
943    "cJSON:cjson",
944    "common_event_service:cesfwk_innerkits",
945    "data_share:datashare_consumer",
946    "dataclassification:data_transit_mgr",
947    "device_manager:devicemanagersdk",
948    "dfs_service:distributed_file_daemon_kit_inner",
949    "eventhandler:libeventhandler",
950    "ffrt:libffrt",
951    "googletest:gmock",
952    "hilog:libhilog",
953    "hisysevent:libhisysevent",
954    "hitrace:hitrace_meter",
955    "hitrace:libhitracechain",
956    "image_framework:image_native",
957    "imf:inputmethod_client",
958    "input:libmmi-client",
959    "ipc:ipc_single",
960    "libxml2:libxml2",
961    "memmgr:memmgrclient",
962    "os_account:os_account_innerkits",
963    "resource_schedule_service:ressched_client",
964    "safwk:system_ability_fwk",
965    "samgr:samgr_proxy",
966    "udmf:udmf_client",
967  ]
968  deps = [
969    "${pasteboard_framework_path}:pasteboard_framework",
970    "${pasteboard_innerkits_path}:pasteboard_client",
971    "${pasteboard_innerkits_path}:pasteboard_data",
972    "${pasteboard_service_path}:pasteboard_service",
973    "${pasteboard_service_path}:pasteboard_stub_proxy",
974  ]
975  if (pasteboard_vixl_part_enabled) {
976    external_deps += [ "vixl:libvixl" ]
977    defines += [ "PB_VIXL_ENABLE" ]
978  }
979
980  if (window_manager_use_sceneboard) {
981    external_deps += [ "window_manager:libwm_lite" ]
982    defines += [ "SCENE_BOARD_ENABLE" ]
983  } else {
984    external_deps += [ "window_manager:libwm" ]
985  }
986  if (pasteboard_dlp_part_enabled) {
987    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
988    defines += [ "WITH_DLP" ]
989  }
990  if (pasteboard_device_info_manager_part_enabled) {
991    external_deps += [
992      "device_info_manager:distributed_device_profile_common",
993      "device_info_manager:distributed_device_profile_sdk",
994    ]
995    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
996  }
997
998  if (pasteboard_device_manager_part_enabled) {
999    external_deps += [ "device_manager:devicemanagersdk" ]
1000    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
1001  }
1002
1003  if (pasteboard_screenlock_mgr_part_enabled) {
1004    external_deps += [ "screenlock_mgr:screenlock_client" ]
1005    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
1006  }
1007}
1008
1009ohos_unittest("PasteServSetDataTest") {
1010  use_exceptions = true
1011  module_out_path = module_output_path
1012  sources = [
1013    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
1014    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
1015    "${pasteboard_service_path}/account/src/account_manager.cpp",
1016    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
1017    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
1018    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
1019    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
1020    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
1021    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
1022    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
1023    "${pasteboard_service_path}/dfx/src/command.cpp",
1024    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
1025    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
1026    "${pasteboard_service_path}/dfx/src/pasteboard_dump_helper.cpp",
1027    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
1028    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
1029    "${pasteboard_service_path}/dfx/src/reporter.cpp",
1030    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
1031    "${pasteboard_service_path}/load/src/config.cpp",
1032    "${pasteboard_service_path}/load/src/loader.cpp",
1033    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
1034    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
1035    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
1036    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
1037    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
1038    "unittest/src/pasteboard_service_setdata_test.cpp",
1039  ]
1040  defines = []
1041  configs = [ ":module_private_config" ]
1042  cflags = [ "-fno-access-control" ]
1043  include_dirs = [
1044    "${pasteboard_service_path}/dfx/src",
1045    "${pasteboard_service_path}/dfx/src/behaviour",
1046    "${pasteboard_service_path}/dfx/src/statistic",
1047    "${pasteboard_service_path}/dfx/src/fault",
1048    "${pasteboard_service_path}/zidl/include",
1049    "${pasteboard_service_path}/account/include",
1050    "${pasteboard_service_path}/core/include",
1051    "${pasteboard_service_path}/load/include",
1052    "${pasteboard_service_path}/switch",
1053    "${pasteboard_root_path}/adapter/data_share",
1054    "${pasteboard_root_path}/adapter/pasteboard_progress",
1055    "${pasteboard_root_path}/adapter/security_level",
1056    "${pasteboard_innerkits_path}/include",
1057    "${pasteboard_utils_path}/mock/include",
1058    "${pasteboard_utils_path}/native/include",
1059    "${pasteboard_utils_path}/system/safwk/native/include",
1060    "${pasteboard_framework_path}/framework/include",
1061    "${pasteboard_framework_path}/framework/include/device",
1062  ]
1063  external_deps = [
1064    "ability_base:base",
1065    "ability_base:want",
1066    "ability_base:zuri",
1067    "ability_runtime:ability_manager",
1068    "ability_runtime:uri_permission_mgr",
1069    "ability_runtime:wantagent_innerkits",
1070    "access_token:libaccesstoken_sdk",
1071    "access_token:libprivacy_sdk",
1072    "access_token:libtokenid_sdk",
1073    "app_file_service:remote_file_share_native",
1074    "bundle_framework:appexecfwk_base",
1075    "bundle_framework:appexecfwk_core",
1076    "cJSON:cjson",
1077    "common_event_service:cesfwk_innerkits",
1078    "data_share:datashare_consumer",
1079    "dataclassification:data_transit_mgr",
1080    "device_manager:devicemanagersdk",
1081    "dfs_service:distributed_file_daemon_kit_inner",
1082    "eventhandler:libeventhandler",
1083    "ffrt:libffrt",
1084    "googletest:gmock",
1085    "hilog:libhilog",
1086    "hisysevent:libhisysevent",
1087    "hitrace:hitrace_meter",
1088    "hitrace:libhitracechain",
1089    "image_framework:image_native",
1090    "imf:inputmethod_client",
1091    "input:libmmi-client",
1092    "ipc:ipc_single",
1093    "libxml2:libxml2",
1094    "memmgr:memmgrclient",
1095    "os_account:os_account_innerkits",
1096    "resource_schedule_service:ressched_client",
1097    "safwk:system_ability_fwk",
1098    "samgr:samgr_proxy",
1099    "udmf:udmf_client",
1100  ]
1101  deps = [
1102    "${pasteboard_framework_path}:pasteboard_framework",
1103    "${pasteboard_innerkits_path}:pasteboard_client",
1104    "${pasteboard_innerkits_path}:pasteboard_data",
1105    "${pasteboard_service_path}:pasteboard_service",
1106    "${pasteboard_service_path}:pasteboard_stub_proxy",
1107  ]
1108  if (pasteboard_vixl_part_enabled) {
1109    external_deps += [ "vixl:libvixl" ]
1110    defines += [ "PB_VIXL_ENABLE" ]
1111  }
1112
1113  if (window_manager_use_sceneboard) {
1114    external_deps += [ "window_manager:libwm_lite" ]
1115    defines += [ "SCENE_BOARD_ENABLE" ]
1116  } else {
1117    external_deps += [ "window_manager:libwm" ]
1118  }
1119  if (pasteboard_dlp_part_enabled) {
1120    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
1121    defines += [ "WITH_DLP" ]
1122  }
1123  if (pasteboard_device_info_manager_part_enabled) {
1124    external_deps += [
1125      "device_info_manager:distributed_device_profile_common",
1126      "device_info_manager:distributed_device_profile_sdk",
1127    ]
1128    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
1129  }
1130
1131  if (pasteboard_device_manager_part_enabled) {
1132    external_deps += [ "device_manager:devicemanagersdk" ]
1133    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
1134  }
1135
1136  if (pasteboard_screenlock_mgr_part_enabled) {
1137    external_deps += [ "screenlock_mgr:screenlock_client" ]
1138    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
1139  }
1140}
1141
1142ohos_unittest("PasteServGetDataTest") {
1143  use_exceptions = true
1144  module_out_path = module_output_path
1145  sources = [
1146    "${pasteboard_root_path}/adapter/data_share/datashare_delegate.cpp",
1147    "${pasteboard_root_path}/adapter/security_level/security_level.cpp",
1148    "${pasteboard_service_path}/account/src/account_manager.cpp",
1149    "${pasteboard_service_path}/core/src/pasteboard_dialog.cpp",
1150    "${pasteboard_service_path}/core/src/pasteboard_disposable_manager.cpp",
1151    "${pasteboard_service_path}/core/src/pasteboard_lib_guard.cpp",
1152    "${pasteboard_service_path}/core/src/pasteboard_pattern.cpp",
1153    "${pasteboard_service_path}/core/src/pasteboard_service.cpp",
1154    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
1155    "${pasteboard_service_path}/dfx/src/calculate_time_consuming.cpp",
1156    "${pasteboard_service_path}/dfx/src/command.cpp",
1157    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
1158    "${pasteboard_service_path}/dfx/src/hiview_adapter.cpp",
1159    "${pasteboard_service_path}/dfx/src/pasteboard_dump_helper.cpp",
1160    "${pasteboard_service_path}/dfx/src/pasteboard_event_dfx.cpp",
1161    "${pasteboard_service_path}/dfx/src/pasteboard_trace.cpp",
1162    "${pasteboard_service_path}/dfx/src/reporter.cpp",
1163    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
1164    "${pasteboard_service_path}/load/src/config.cpp",
1165    "${pasteboard_service_path}/load/src/loader.cpp",
1166    "${pasteboard_service_path}/switch/pasteboard_switch.cpp",
1167    "${pasteboard_service_path}/zidl/src/pasteboard_delay_getter_proxy.cpp",
1168    "${pasteboard_service_path}/zidl/src/pasteboard_entry_getter_proxy.cpp",
1169    "${pasteboard_utils_path}/native/src/pasteboard_common.cpp",
1170    "${pasteboard_utils_path}/native/src/pasteboard_time.cpp",
1171    "unittest/src/pasteboard_service_getdata_test.cpp",
1172  ]
1173  defines = []
1174  configs = [ ":module_private_config" ]
1175  cflags = [ "-fno-access-control" ]
1176  include_dirs = [
1177    "${pasteboard_service_path}/dfx/src",
1178    "${pasteboard_service_path}/dfx/src/behaviour",
1179    "${pasteboard_service_path}/dfx/src/statistic",
1180    "${pasteboard_service_path}/dfx/src/fault",
1181    "${pasteboard_service_path}/zidl/include",
1182    "${pasteboard_service_path}/account/include",
1183    "${pasteboard_service_path}/core/include",
1184    "${pasteboard_service_path}/load/include",
1185    "${pasteboard_service_path}/switch",
1186    "${pasteboard_root_path}/adapter/data_share",
1187    "${pasteboard_root_path}/adapter/pasteboard_progress",
1188    "${pasteboard_root_path}/adapter/security_level",
1189    "${pasteboard_innerkits_path}/include",
1190    "${pasteboard_utils_path}/mock/include",
1191    "${pasteboard_utils_path}/native/include",
1192    "${pasteboard_utils_path}/system/safwk/native/include",
1193    "${pasteboard_framework_path}/framework/include",
1194    "${pasteboard_framework_path}/framework/include/device",
1195  ]
1196  external_deps = [
1197    "ability_base:base",
1198    "ability_base:want",
1199    "ability_base:zuri",
1200    "ability_runtime:ability_manager",
1201    "ability_runtime:uri_permission_mgr",
1202    "ability_runtime:wantagent_innerkits",
1203    "access_token:libaccesstoken_sdk",
1204    "access_token:libprivacy_sdk",
1205    "access_token:libtokenid_sdk",
1206    "app_file_service:remote_file_share_native",
1207    "bundle_framework:appexecfwk_base",
1208    "bundle_framework:appexecfwk_core",
1209    "cJSON:cjson",
1210    "common_event_service:cesfwk_innerkits",
1211    "data_share:datashare_consumer",
1212    "dataclassification:data_transit_mgr",
1213    "device_manager:devicemanagersdk",
1214    "dfs_service:distributed_file_daemon_kit_inner",
1215    "eventhandler:libeventhandler",
1216    "ffrt:libffrt",
1217    "googletest:gmock",
1218    "hilog:libhilog",
1219    "hisysevent:libhisysevent",
1220    "hitrace:hitrace_meter",
1221    "hitrace:libhitracechain",
1222    "image_framework:image_native",
1223    "imf:inputmethod_client",
1224    "input:libmmi-client",
1225    "ipc:ipc_single",
1226    "libxml2:libxml2",
1227    "memmgr:memmgrclient",
1228    "os_account:os_account_innerkits",
1229    "resource_schedule_service:ressched_client",
1230    "safwk:system_ability_fwk",
1231    "samgr:samgr_proxy",
1232    "udmf:udmf_client",
1233  ]
1234  deps = [
1235    "${pasteboard_framework_path}:pasteboard_framework",
1236    "${pasteboard_innerkits_path}:pasteboard_client",
1237    "${pasteboard_innerkits_path}:pasteboard_data",
1238    "${pasteboard_service_path}:pasteboard_service",
1239    "${pasteboard_service_path}:pasteboard_stub_proxy",
1240  ]
1241  if (pasteboard_vixl_part_enabled) {
1242    external_deps += [ "vixl:libvixl" ]
1243    defines += [ "PB_VIXL_ENABLE" ]
1244  }
1245
1246  if (window_manager_use_sceneboard) {
1247    external_deps += [ "window_manager:libwm_lite" ]
1248    defines += [ "SCENE_BOARD_ENABLE" ]
1249  } else {
1250    external_deps += [ "window_manager:libwm" ]
1251  }
1252  if (pasteboard_dlp_part_enabled) {
1253    external_deps += [ "dlp_permission_service:libdlp_permission_sdk" ]
1254    defines += [ "WITH_DLP" ]
1255  }
1256  if (pasteboard_device_info_manager_part_enabled) {
1257    external_deps += [
1258      "device_info_manager:distributed_device_profile_common",
1259      "device_info_manager:distributed_device_profile_sdk",
1260    ]
1261    defines += [ "PB_DEVICE_INFO_MANAGER_ENABLE" ]
1262  }
1263
1264  if (pasteboard_device_manager_part_enabled) {
1265    external_deps += [ "device_manager:devicemanagersdk" ]
1266    defines += [ "PB_DEVICE_MANAGER_ENABLE" ]
1267  }
1268
1269  if (pasteboard_screenlock_mgr_part_enabled) {
1270    external_deps += [ "screenlock_mgr:screenlock_client" ]
1271    defines += [ "PB_SCREENLOCK_MGR_ENABLE" ]
1272  }
1273}
1274
1275group("unittest") {
1276  testonly = true
1277  deps = [
1278    ":PasteboardDeduplicateMemoryTest",
1279    ":PasteboardDelayProxyTest",
1280    ":PasteboardDelayStubTest",
1281    ":PasteboardDialogAbnormalTest",
1282    ":PasteboardDialogNormalTest",
1283    ":PasteboardDisposableManagerTest",
1284    ":PasteboardEntryGetterProxyTest",
1285    ":PasteboardEntryGetterStubTest",
1286    ":PasteboardLinkedListTest",
1287    ":PasteboardLoadTest",
1288    ":PasteboardPatternTest",
1289    ":PasteboardServiceTest",
1290  ]
1291}