• 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_service_path}/dfx/src",
23    "${pasteboard_service_path}/dfx/src/behaviour",
24    "${pasteboard_service_path}/dfx/src/fault",
25    "${pasteboard_service_path}/dfx/src/statistic",
26    "include",
27    "unittest/include",
28    "//base/security/access_token/interfaces/innerkits/accesstoken/include",
29    "//foundation/distributeddatamgr/pasteboard/framework/tlv",
30    "//foundation/distributeddatamgr/pasteboard/framework/uri",
31  ]
32}
33
34module_output_path = "pasteboard/pasteboard_service"
35
36ohos_unittest("PasteboardServiceTest") {
37  module_out_path = module_output_path
38
39  sources = [
40    "${pasteboard_service_path}/dfx/src/behaviour/pasteboard_behaviour_reporter_impl.cpp",
41    "${pasteboard_service_path}/dfx/src/fault/pasteboard_fault_impl.cpp",
42    "${pasteboard_service_path}/dfx/src/reporter.cpp",
43    "${pasteboard_service_path}/dfx/src/statistic/time_consuming_statistic_impl.cpp",
44    "unittest/src/dfx_test.cpp",
45    "unittest/src/paste_service_test.cpp",
46  ]
47  configs = [
48    "//commonlibrary/c_utils/base:utils_config",
49    ":module_private_config",
50  ]
51  external_deps = [
52    "ability_base:want",
53    "ability_base:zuri",
54    "access_token:libaccesstoken_sdk",
55    "c_utils:utils",
56    "hilog:libhilog",
57    "image_framework:image_native",
58    "ipc:ipc_core",
59    "os_account:os_account_innerkits",
60  ]
61
62  deps = [
63    "${pasteboard_innerkits_path}:pasteboard_client",
64    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
65    "//third_party/googletest:gtest_main",
66  ]
67}
68
69group("unittest") {
70  testonly = true
71
72  deps = []
73
74  deps += [ ":PasteboardServiceTest" ]
75}
76