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}/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 } 28 29 branch_protector_ret = "pac_ret" 30 module_out_path = module_output_path 31 include_dirs = [ "include" ] 32 33 defines = [] 34 35 sources = [ "src/drag_manager_test.cpp" ] 36 37 configs = [] 38 39 deps = [ 40 "${device_status_interfaces_path}/innerkits:devicestatus_client", 41 "${device_status_root_path}/intention/cooperate/client:intention_cooperate_client", 42 "${device_status_root_path}/intention/data:intention_data", 43 "${device_status_root_path}/intention/drag/client:intention_drag_client", 44 "${device_status_root_path}/intention/drag/data:intention_drag_data", 45 "${device_status_root_path}/intention/ipc/socket:intention_socket_connection", 46 "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_client", 47 "${device_status_root_path}/intention/prototype:intention_prototype", 48 "${device_status_utils_path}:devicestatus_util", 49 ] 50 external_deps = [ 51 "c_utils:utils", 52 "graphic_2d:librender_service_client", 53 "hilog:libhilog", 54 "image_framework:image_native", 55 "input:libmmi-client", 56 "window_manager:libdm", 57 ] 58} 59 60ohos_unittest("DragServerTest") { 61 sanitize = { 62 integer_overflow = true 63 ubsan = true 64 boundary_sanitize = true 65 cfi = true 66 cfi_cross_dso = true 67 debug = false 68 } 69 70 branch_protector_ret = "pac_ret" 71 module_out_path = module_output_path 72 include_dirs = [ 73 "include", 74 "${device_status_root_path}/libs/interface", 75 "${device_status_service_path}/communication/service/include", 76 ] 77 78 defines = [] 79 80 sources = [ "src/drag_server_test.cpp" ] 81 82 cflags = [ "-Dprivate=public" ] 83 84 deps = [ 85 "${device_status_interfaces_path}/innerkits:devicestatus_client", 86 "${device_status_root_path}/intention/data:intention_data", 87 "${device_status_root_path}/intention/drag/client:intention_drag_client", 88 "${device_status_root_path}/intention/drag/data:intention_drag_data", 89 "${device_status_root_path}/intention/drag/server:intention_drag_server", 90 "${device_status_root_path}/intention/ipc/socket:intention_socket_connection", 91 "${device_status_root_path}/intention/prototype:intention_prototype", 92 "${device_status_root_path}/services:devicestatus_static_service", 93 "${device_status_root_path}/utils/ipc:devicestatus_ipc", 94 "${device_status_utils_path}:devicestatus_util", 95 ] 96 external_deps = [ 97 "ability_base:want", 98 "ability_runtime:app_manager", 99 "access_token:libaccesstoken_sdk", 100 "access_token:libnativetoken_shared", 101 "access_token:libtokensetproc_shared", 102 "cJSON:cjson", 103 "c_utils:utils", 104 "device_manager:devicemanagersdk", 105 "graphic_2d:libcomposer", 106 "graphic_2d:librender_service_base", 107 "graphic_2d:librender_service_client", 108 "graphic_2d:window_animation", 109 "hilog:libhilog", 110 "hisysevent:libhisysevent", 111 "image_framework:image_native", 112 "init:libbegetutil", 113 "input:libmmi-client", 114 "samgr:samgr_proxy", 115 "window_manager:libdm", 116 "window_manager:libwm", 117 ] 118} 119 120group("unittest") { 121 testonly = true 122 deps = [ 123 ":DragManagerTest", 124 ":DragServerTest", 125 ] 126} 127