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/ohos.gni") 15import("//build/test.gni") 16import("../../../multimodalinput_mini.gni") 17 18module_output_path = "input/input" 19 20ohos_unittest("FingerprintEventProcessorTest") { 21 module_out_path = module_output_path 22 23 branch_protector_ret = "pac_ret" 24 sanitize = { 25 cfi = true 26 cfi_cross_dso = true 27 debug = true 28 blocklist = "./ipc_blocklist.txt" 29 } 30 31 defines = input_default_defines 32 defines += [ "OHOS_BUILD_ENABLE_FINGERPRINT" ] 33 34 configs = [ 35 "${mmi_path}:coverage_flags", 36 "${mmi_path}/service:libmmi_server_config", 37 "${mmi_path}/service/filter:mmi_event_filter_config", 38 "${mmi_path}/common/anco/comm:mmi_anco_channel_config", 39 ] 40 41 cflags = [ 42 "-Dprivate=public", 43 "-Dprotected=public", 44 ] 45 46 include_dirs = [ 47 "${mmi_path}/service/fingerprint_event_processor/include", 48 "${mmi_path}/service/event_handler/include", 49 "${mmi_path}/util/common/include", 50 "${mmi_path}/test/facility/event_monitor_handler_interface/include", 51 "${mmi_path}/test/facility/mock/include", 52 "${mmi_path}/util/network/include", 53 "${mmi_path}/service/monitor/include/event_monitor_handler.h", 54 "${mmi_path}/service/monitor/include/event_pre_monitor_handler.h", 55 "${mmi_path}/util/common/include/input_event_data_transformation.h", 56 "${mmi_path}/test/unittest/standalone/include/", 57 "${mmi_path}/interfaces/native/innerkits/proxy/include", 58 "${mmi_path}/interfaces/native/innerkits/event/include", 59 "${mmi_path}/service/nap_process/include", 60 "${mmi_path}/util/socket/include", 61 "$root_out_dir/diff_libinput_mmi/export_include", 62 ] 63 64 sources = [ 65 "${mmi_path}/frameworks/proxy/events/src/input_event.cpp", 66 "${mmi_path}/frameworks/proxy/events/src/pointer_event.cpp", 67 "${mmi_path}/service/event_handler/src/input_event_handler.cpp", 68 "${mmi_path}/service/fingerprint_event_processor/src/fingerprint_event_processor.cpp", 69 "${mmi_path}/service/monitor/src/event_monitor_handler.cpp", 70 "${mmi_path}/service/monitor/src/event_pre_monitor_handler.cpp", 71 "${mmi_path}/service/subscriber/src/input_active_subscriber_handler.cpp", 72 "${mmi_path}/util/common/src/input_event_data_transformation.cpp", 73 "${mmi_path}/util/network/src/stream_buffer.cpp", 74 "src/fingerprint_event_processor_test.cpp", 75 ] 76 77 deps = [ 78 "${mmi_path}/frameworks/proxy:libmmi-client", 79 "${mmi_path}/service:libmmi-server", 80 "${mmi_path}/test/facility/mock:mmi_mock_sources", 81 "${mmi_path}/util:libmmi-util", 82 ] 83 84 external_deps = [ 85 "cJSON:cjson", 86 "ability_base:want", 87 "ability_runtime:ability_manager", 88 "c_utils:utils", 89 "config_policy:configpolicy_util", 90 "data_share:datashare_consumer", 91 "ffrt:libffrt", 92 "googletest:gmock_main", 93 "googletest:gtest_main", 94 "hilog:libhilog", 95 "hisysevent:libhisysevent", 96 "image_framework:image_native", 97 "init:libbeget_proxy", 98 "init:libbegetutil", 99 "ipc:ipc_core", 100 "preferences:native_preferences", 101 "safwk:system_ability_fwk", 102 "samgr:samgr_proxy", 103 ] 104 105 if (security_component_enable) { 106 external_deps += [ "security_component_manager:libsecurity_component_sdk" ] 107 } 108 109 if (resource_schedule_service_enabled) { 110 external_deps += [ "resource_schedule_service:ressched_client" ] 111 } 112} 113 114ohos_unittest("XKeyEventProcessorTest") { 115 module_out_path = module_output_path 116 117 defines = input_default_defines 118 defines += [ "OHOS_BUILD_ENABLE_X_KEY" ] 119 120 configs = [ 121 "${mmi_path}:coverage_flags", 122 "${mmi_path}/service:libmmi_server_config", 123 "${mmi_path}/service/filter:mmi_event_filter_config", 124 "${mmi_path}/common/anco/comm:mmi_anco_channel_config", 125 ] 126 127 cflags = [ 128 "-Dprivate=public", 129 "-Dprotected=public", 130 ] 131 132 include_dirs = [ 133 "${mmi_path}/service/fingerprint_event_processor/include", 134 "${mmi_path}/service/event_handler/include", 135 "${mmi_path}/util/common/include", 136 "${mmi_path}/test/facility/event_monitor_handler_interface/include", 137 "${mmi_path}/test/facility/mock/include", 138 "${mmi_path}/util/network/include", 139 "${mmi_path}/service/monitor/include/event_monitor_handler.h", 140 "${mmi_path}/service/monitor/include/event_pre_monitor_handler.h", 141 "${mmi_path}/util/common/include/input_event_data_transformation.h", 142 "${mmi_path}/test/unittest/standalone/include/", 143 "${mmi_path}/interfaces/native/innerkits/proxy/include", 144 "${mmi_path}/interfaces/native/innerkits/event/include", 145 "${mmi_path}/service/nap_process/include", 146 "${mmi_path}/util/socket/include", 147 "$root_out_dir/diff_libinput_mmi/export_include", 148 ] 149 150 sources = [ 151 "${mmi_path}/frameworks/proxy/events/src/input_event.cpp", 152 "${mmi_path}/frameworks/proxy/events/src/pointer_event.cpp", 153 "${mmi_path}/service/event_handler/src/input_event_handler.cpp", 154 "${mmi_path}/service/fingerprint_event_processor/src/x_key_event_processor.cpp", 155 "${mmi_path}/service/monitor/src/event_monitor_handler.cpp", 156 "${mmi_path}/service/monitor/src/event_pre_monitor_handler.cpp", 157 "${mmi_path}/service/subscriber/src/input_active_subscriber_handler.cpp", 158 "${mmi_path}/util/common/src/input_event_data_transformation.cpp", 159 "${mmi_path}/util/network/src/stream_buffer.cpp", 160 "src/x_key_event_processor_test.cpp", 161 ] 162 163 deps = [ 164 "${mmi_path}/frameworks/proxy:libmmi-client", 165 "${mmi_path}/service:libmmi-server", 166 "${mmi_path}/test/facility/libinput_wrapper:libinput_wrapper_sources", 167 "${mmi_path}/test/facility/mock:mmi_mock_sources", 168 "${mmi_path}/util:libmmi-util", 169 ] 170 171 external_deps = [ 172 "ability_base:want", 173 "ability_runtime:ability_manager", 174 "c_utils:utils", 175 "config_policy:configpolicy_util", 176 "data_share:datashare_consumer", 177 "ffrt:libffrt", 178 "googletest:gmock_main", 179 "googletest:gtest_main", 180 "hilog:libhilog", 181 "hisysevent:libhisysevent", 182 "image_framework:image_native", 183 "init:libbeget_proxy", 184 "init:libbegetutil", 185 "ipc:ipc_core", 186 "preferences:native_preferences", 187 "safwk:system_ability_fwk", 188 "samgr:samgr_proxy", 189 ] 190 191 if (security_component_enable) { 192 external_deps += [ "security_component_manager:libsecurity_component_sdk" ] 193 } 194 195 if (resource_schedule_service_enabled) { 196 external_deps += [ "resource_schedule_service:ressched_client" ] 197 } 198} 199