1# Copyright (c) 2025 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("FingersenseWrapperTest") { 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 } 29 30 defines = input_default_defines 31 defines += [ "OHOS_BUILD_ENABLE_FINGERSENSE" ] 32 33 configs = [ 34 "${mmi_path}:coverage_flags", 35 "${mmi_path}/service:libmmi_server_config", 36 "${mmi_path}/service/filter:mmi_event_filter_config", 37 "${mmi_path}/common/anco/comm:mmi_anco_channel_config", 38 ] 39 40 cflags = [ 41 "-Dprivate=public", 42 "-Dprotected=public", 43 ] 44 45 include_dirs = [ 46 "${mmi_path}/service/fingerprint_event_processor/include", 47 "${mmi_path}/service/event_handler/include", 48 "${mmi_path}/util/common/include", 49 "${mmi_path}/test/facility/event_monitor_handler_interface/include", 50 "${mmi_path}/test/facility/mock/include", 51 "${mmi_path}/util/network/include", 52 "${mmi_path}/service/monitor/include/event_monitor_handler.h", 53 "${mmi_path}/service/monitor/include/event_pre_monitor_handler.h", 54 "${mmi_path}/util/common/include/input_event_data_transformation.h", 55 "${mmi_path}/test/unittest/standalone/include/", 56 "${mmi_path}/interfaces/native/innerkits/proxy/include", 57 "${mmi_path}/interfaces/native/innerkits/event/include", 58 "${mmi_path}/service/nap_process/include", 59 "${mmi_path}/util/socket/include", 60 "$root_out_dir/diff_libinput_mmi/export_include", 61 ] 62 63 sources = [ 64 "${mmi_path}/frameworks/proxy/events/src/input_event.cpp", 65 "${mmi_path}/frameworks/proxy/events/src/pointer_event.cpp", 66 "${mmi_path}/service/event_handler/src/input_event_handler.cpp", 67 "${mmi_path}/service/fingerprint_event_processor/src/fingerprint_event_processor.cpp", 68 "${mmi_path}/service/monitor/src/event_monitor_handler.cpp", 69 "${mmi_path}/service/monitor/src/event_pre_monitor_handler.cpp", 70 "${mmi_path}/service/subscriber/src/input_active_subscriber_handler.cpp", 71 "${mmi_path}/util/common/src/input_event_data_transformation.cpp", 72 "${mmi_path}/util/network/src/stream_buffer.cpp", 73 "src/fingersense_wrapper_test.cpp", 74 ] 75 76 deps = [ 77 "${mmi_path}/frameworks/proxy:libmmi-client", 78 "${mmi_path}/service:libmmi-server", 79 "${mmi_path}/test/facility/mock:mmi_mock_sources", 80 "${mmi_path}/util:libmmi-util", 81 ] 82 83 external_deps = [ 84 "ability_base:want", 85 "ability_runtime:ability_manager", 86 "cJSON:cjson", 87 "c_utils:utils", 88 "config_policy:configpolicy_util", 89 "data_share:datashare_consumer", 90 "ffrt:libffrt", 91 "googletest:gmock_main", 92 "googletest:gtest_main", 93 "hilog:libhilog", 94 "hisysevent:libhisysevent", 95 "image_framework:image_native", 96 "init:libbeget_proxy", 97 "init:libbegetutil", 98 "ipc:ipc_core", 99 "preferences:native_preferences", 100 "safwk:system_ability_fwk", 101 "samgr:samgr_proxy", 102 ] 103 104 if (security_component_enable) { 105 external_deps += [ "security_component_manager:libsecurity_component_sdk" ] 106 } 107 108 if (resource_schedule_service_enabled) { 109 external_deps += [ "resource_schedule_service:ressched_client" ] 110 } 111} 112