• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../../../../device_status.gni")
16
17module_output_path = "${device_status_part_name}/device_status/devicestatussrv"
18
19ohos_unittest("DragManagerTest") {
20  sanitize = {
21    integer_overflow = true
22    ubsan = true
23    boundary_sanitize = true
24    cfi = true
25    cfi_cross_dso = true
26    debug = false
27    blocklist = "./../../ipc_blocklist.txt"
28  }
29
30  branch_protector_ret = "pac_ret"
31  module_out_path = module_output_path
32  include_dirs = [ "include" ]
33
34  defines = []
35
36  sources = [ "src/drag_manager_test.cpp" ]
37
38  cflags = [ "-Dprivate=public" ]
39
40  configs = []
41
42  deps = [
43    "${device_status_interfaces_path}/innerkits:devicestatus_client",
44    "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
45    "${device_status_root_path}/intention/cooperate/client:intention_cooperate_client",
46    "${device_status_root_path}/intention/drag/client:intention_drag_client",
47    "${device_status_root_path}/intention/ipc/socket:intention_socket_connection",
48    "${device_status_root_path}/intention/ipc/tunnel:intention_client",
49    "${device_status_root_path}/intention/prototype:intention_prototype",
50    "${device_status_root_path}/services:devicestatus_static_service",
51    "${device_status_utils_path}:devicestatus_util",
52  ]
53  external_deps = [
54    "ability_base:want",
55    "ability_runtime:app_manager",
56    "cJSON:cjson",
57    "c_utils:utils",
58    "data_share:datashare_consumer",
59    "graphic_2d:librender_service_client",
60    "graphic_2d:librender_service_base",
61    "hilog:libhilog",
62    "image_framework:image_native",
63    "init:libbegetutil",
64    "input:libmmi-client",
65    "libxml2:libxml2",
66    "samgr:samgr_proxy",
67    "window_manager:libdm",
68    "common_event_service:cesfwk_innerkits",
69  ]
70}
71
72ohos_unittest("DragServerTest") {
73  sanitize = {
74    integer_overflow = true
75    ubsan = true
76    boundary_sanitize = true
77    cfi = true
78    cfi_cross_dso = true
79    debug = false
80    blocklist = "./../../ipc_blocklist.txt"
81  }
82
83  branch_protector_ret = "pac_ret"
84  module_out_path = module_output_path
85  include_dirs = [
86    "include",
87    "${device_status_root_path}/libs/interface",
88    "${device_status_service_path}/communication/service/include",
89  ]
90
91  defines = []
92
93  sources = [ "src/drag_server_test.cpp" ]
94
95  cflags = [ "-Dprivate=public" ]
96
97  deps = [
98    "${device_status_interfaces_path}/innerkits:devicestatus_client",
99    "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
100    "${device_status_root_path}/intention/drag/client:intention_drag_client",
101    "${device_status_root_path}/intention/drag/server:intention_drag_server",
102    "${device_status_root_path}/intention/ipc/socket:intention_socket_connection",
103    "${device_status_root_path}/intention/prototype:intention_prototype",
104    "${device_status_root_path}/services:devicestatus_static_service",
105    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
106    "${device_status_utils_path}:devicestatus_util",
107  ]
108  external_deps = [
109    "ability_base:want",
110    "ability_runtime:app_manager",
111    "access_token:libaccesstoken_sdk",
112    "access_token:libnativetoken_shared",
113    "access_token:libtokensetproc_shared",
114    "bundle_framework:appexecfwk_core",
115    "common_event_service:cesfwk_innerkits",
116    "cJSON:cjson",
117    "c_utils:utils",
118    "data_share:datashare_consumer",
119    "device_manager:devicemanagersdk",
120    "eventhandler:libeventhandler",
121    "graphic_2d:libcomposer",
122    "graphic_2d:librender_service_base",
123    "graphic_2d:librender_service_client",
124    "graphic_2d:window_animation",
125    "hilog:libhilog",
126    "hisysevent:libhisysevent",
127    "image_framework:image_native",
128    "init:libbegetutil",
129    "input:libmmi-client",
130    "libxml2:libxml2",
131    "samgr:samgr_proxy",
132    "safwk:system_ability_fwk",
133    "window_manager:libdm",
134    "window_manager:libwm",
135  ]
136}
137
138ohos_unittest("DragClientTest") {
139  sanitize = {
140    integer_overflow = true
141    ubsan = true
142    boundary_sanitize = true
143    cfi = true
144    cfi_cross_dso = true
145    debug = false
146    blocklist = "./../../ipc_blocklist.txt"
147  }
148
149  branch_protector_ret = "pac_ret"
150  module_out_path = module_output_path
151  include_dirs = [
152    "include",
153    "${device_status_root_path}/libs/interface",
154    "${device_status_service_path}/communication/service/include",
155  ]
156
157  defines = []
158
159  sources = [ "src/drag_client_test.cpp" ]
160
161  cflags = [ "-Dprivate=public" ]
162
163  deps = [
164    "${device_status_interfaces_path}/innerkits:devicestatus_client",
165    "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
166    "${device_status_root_path}/intention/drag/client:intention_drag_client",
167    "${device_status_root_path}/intention/drag/server:intention_drag_server",
168    "${device_status_root_path}/intention/ipc/socket:intention_socket_connection",
169    "${device_status_root_path}/intention/prototype:intention_prototype",
170    "${device_status_root_path}/services:devicestatus_static_service",
171    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
172    "${device_status_utils_path}:devicestatus_util",
173  ]
174  external_deps = [
175    "ability_base:want",
176    "ability_runtime:app_manager",
177    "access_token:libaccesstoken_sdk",
178    "access_token:libnativetoken_shared",
179    "access_token:libtokensetproc_shared",
180    "bundle_framework:appexecfwk_core",
181    "cJSON:cjson",
182    "c_utils:utils",
183    "common_event_service:cesfwk_innerkits",
184    "data_share:datashare_consumer",
185    "device_manager:devicemanagersdk",
186    "eventhandler:libeventhandler",
187    "graphic_2d:libcomposer",
188    "graphic_2d:librender_service_base",
189    "graphic_2d:librender_service_client",
190    "graphic_2d:window_animation",
191    "hilog:libhilog",
192    "hisysevent:libhisysevent",
193    "image_framework:image_native",
194    "init:libbegetutil",
195    "input:libmmi-client",
196    "libxml2:libxml2",
197    "samgr:samgr_proxy",
198    "safwk:system_ability_fwk",
199    "window_manager:libdm",
200    "window_manager:libwm",
201  ]
202}
203
204group("unittest") {
205  testonly = true
206  deps = [
207    ":DragManagerTest",
208    ":DragServerTest",
209    ":DragClientTest",
210  ]
211}
212