1f857971dSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
2f857971dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3f857971dSopenharmony_ci# you may not use this file except in compliance with the License.
4f857971dSopenharmony_ci# You may obtain a copy of the License at
5f857971dSopenharmony_ci#
6f857971dSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7f857971dSopenharmony_ci#
8f857971dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9f857971dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10f857971dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11f857971dSopenharmony_ci# See the License for the specific language governing permissions and
12f857971dSopenharmony_ci# limitations under the License.
13f857971dSopenharmony_ci
14f857971dSopenharmony_ciimport("//build/test.gni")
15f857971dSopenharmony_ciimport("../../../../device_status.gni")
16f857971dSopenharmony_ci
17f857971dSopenharmony_cimodule_output_path = "${device_status_part_name}/devicestatussrv"
18f857971dSopenharmony_ci
19f857971dSopenharmony_ciohos_unittest("DragManagerTest") {
20f857971dSopenharmony_ci  sanitize = {
21f857971dSopenharmony_ci    integer_overflow = true
22f857971dSopenharmony_ci    ubsan = true
23f857971dSopenharmony_ci    boundary_sanitize = true
24f857971dSopenharmony_ci    cfi = true
25f857971dSopenharmony_ci    cfi_cross_dso = true
26f857971dSopenharmony_ci    debug = false
27f857971dSopenharmony_ci  }
28f857971dSopenharmony_ci
29f857971dSopenharmony_ci  branch_protector_ret = "pac_ret"
30f857971dSopenharmony_ci  module_out_path = module_output_path
31f857971dSopenharmony_ci  include_dirs = [ "include" ]
32f857971dSopenharmony_ci
33f857971dSopenharmony_ci  defines = []
34f857971dSopenharmony_ci
35f857971dSopenharmony_ci  sources = [ "src/drag_manager_test.cpp" ]
36f857971dSopenharmony_ci
37f857971dSopenharmony_ci  configs = []
38f857971dSopenharmony_ci
39f857971dSopenharmony_ci  deps = [
40f857971dSopenharmony_ci    "${device_status_interfaces_path}/innerkits:devicestatus_client",
41f857971dSopenharmony_ci    "${device_status_root_path}/intention/cooperate/client:intention_cooperate_client",
42f857971dSopenharmony_ci    "${device_status_root_path}/intention/data:intention_data",
43f857971dSopenharmony_ci    "${device_status_root_path}/intention/drag/client:intention_drag_client",
44f857971dSopenharmony_ci    "${device_status_root_path}/intention/drag/data:intention_drag_data",
45f857971dSopenharmony_ci    "${device_status_root_path}/intention/ipc/socket:intention_socket_connection",
46f857971dSopenharmony_ci    "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_client",
47f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype:intention_prototype",
48f857971dSopenharmony_ci    "${device_status_utils_path}:devicestatus_util",
49f857971dSopenharmony_ci  ]
50f857971dSopenharmony_ci  external_deps = [
51f857971dSopenharmony_ci    "c_utils:utils",
52f857971dSopenharmony_ci    "graphic_2d:librender_service_client",
53f857971dSopenharmony_ci    "hilog:libhilog",
54f857971dSopenharmony_ci    "image_framework:image_native",
55f857971dSopenharmony_ci    "input:libmmi-client",
56f857971dSopenharmony_ci    "window_manager:libdm",
57f857971dSopenharmony_ci  ]
58f857971dSopenharmony_ci}
59f857971dSopenharmony_ci
60f857971dSopenharmony_ciohos_unittest("DragServerTest") {
61f857971dSopenharmony_ci  sanitize = {
62f857971dSopenharmony_ci    integer_overflow = true
63f857971dSopenharmony_ci    ubsan = true
64f857971dSopenharmony_ci    boundary_sanitize = true
65f857971dSopenharmony_ci    cfi = true
66f857971dSopenharmony_ci    cfi_cross_dso = true
67f857971dSopenharmony_ci    debug = false
68f857971dSopenharmony_ci  }
69f857971dSopenharmony_ci
70f857971dSopenharmony_ci  branch_protector_ret = "pac_ret"
71f857971dSopenharmony_ci  module_out_path = module_output_path
72f857971dSopenharmony_ci  include_dirs = [
73f857971dSopenharmony_ci    "include",
74f857971dSopenharmony_ci    "${device_status_root_path}/libs/interface",
75f857971dSopenharmony_ci    "${device_status_service_path}/communication/service/include",
76f857971dSopenharmony_ci  ]
77f857971dSopenharmony_ci
78f857971dSopenharmony_ci  defines = []
79f857971dSopenharmony_ci
80f857971dSopenharmony_ci  sources = [ "src/drag_server_test.cpp" ]
81f857971dSopenharmony_ci
82f857971dSopenharmony_ci  cflags = [ "-Dprivate=public" ]
83f857971dSopenharmony_ci
84f857971dSopenharmony_ci  deps = [
85f857971dSopenharmony_ci    "${device_status_interfaces_path}/innerkits:devicestatus_client",
86f857971dSopenharmony_ci    "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
87f857971dSopenharmony_ci    "${device_status_root_path}/intention/data:intention_data",
88f857971dSopenharmony_ci    "${device_status_root_path}/intention/drag/client:intention_drag_client",
89f857971dSopenharmony_ci    "${device_status_root_path}/intention/drag/data:intention_drag_data",
90f857971dSopenharmony_ci    "${device_status_root_path}/intention/drag/server:intention_drag_server",
91f857971dSopenharmony_ci    "${device_status_root_path}/intention/ipc/socket:intention_socket_connection",
92f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype:intention_prototype",
93f857971dSopenharmony_ci    "${device_status_root_path}/services:devicestatus_static_service",
94f857971dSopenharmony_ci    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
95f857971dSopenharmony_ci    "${device_status_utils_path}:devicestatus_util",
96f857971dSopenharmony_ci  ]
97f857971dSopenharmony_ci  external_deps = [
98f857971dSopenharmony_ci    "ability_base:want",
99f857971dSopenharmony_ci    "ability_runtime:app_manager",
100f857971dSopenharmony_ci    "access_token:libaccesstoken_sdk",
101f857971dSopenharmony_ci    "access_token:libnativetoken_shared",
102f857971dSopenharmony_ci    "access_token:libtokensetproc_shared",
103f857971dSopenharmony_ci    "cJSON:cjson",
104f857971dSopenharmony_ci    "c_utils:utils",
105f857971dSopenharmony_ci    "device_manager:devicemanagersdk",
106f857971dSopenharmony_ci    "graphic_2d:libcomposer",
107f857971dSopenharmony_ci    "graphic_2d:librender_service_base",
108f857971dSopenharmony_ci    "graphic_2d:librender_service_client",
109f857971dSopenharmony_ci    "graphic_2d:window_animation",
110f857971dSopenharmony_ci    "hilog:libhilog",
111f857971dSopenharmony_ci    "hisysevent:libhisysevent",
112f857971dSopenharmony_ci    "image_framework:image_native",
113f857971dSopenharmony_ci    "init:libbegetutil",
114f857971dSopenharmony_ci    "input:libmmi-client",
115f857971dSopenharmony_ci    "samgr:samgr_proxy",
116f857971dSopenharmony_ci    "window_manager:libdm",
117f857971dSopenharmony_ci    "window_manager:libwm",
118f857971dSopenharmony_ci  ]
119f857971dSopenharmony_ci}
120f857971dSopenharmony_ci
121f857971dSopenharmony_cigroup("unittest") {
122f857971dSopenharmony_ci  testonly = true
123f857971dSopenharmony_ci  deps = [
124f857971dSopenharmony_ci    ":DragManagerTest",
125f857971dSopenharmony_ci    ":DragServerTest",
126f857971dSopenharmony_ci  ]
127f857971dSopenharmony_ci}
128