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 = "multimodalinput/mmi_unit_out"
19
20ohos_unittest("FingerprintEventProcessorTest") {
21  module_out_path = module_output_path
22
23  defines = input_default_defines
24  defines += [ "OHOS_BUILD_ENABLE_FINGERPRINT" ]
25
26  configs = [
27    "${mmi_path}:coverage_flags",
28    "${mmi_path}/service:libmmi_server_config",
29  ]
30
31  cflags = [
32    "-Dprivate=public",
33    "-Dprotected=public",
34  ]
35
36  include_dirs = [
37    "${mmi_path}/service/fingerprint_event_processor/include",
38    "${mmi_path}/service/event_handler/include",
39    "${mmi_path}/util/common/include",
40    "${mmi_path}/test/facility/event_monitor_handler_interface/include",
41    "${mmi_path}/test/facility/mock/include",
42    "${mmi_path}/util/network/include",
43    "${mmi_path}/service/monitor/include/event_monitor_handler.h",
44    "${mmi_path}/util/common/include/input_event_data_transformation.h",
45    "${mmi_path}/test/unittest/standalone/include/",
46    "${mmi_path}/interfaces/native/innerkits/proxy/include",
47    "${mmi_path}/interfaces/native/innerkits/event/include",
48    "${mmi_path}/service/nap_process/include",
49    "${mmi_path}/util/socket/include",
50  ]
51
52  sources = [
53    "${mmi_path}/frameworks/proxy/events/src/pointer_event.cpp",
54    "${mmi_path}/service/event_handler/src/input_event_handler.cpp",
55    "${mmi_path}/service/fingerprint_event_processor/src/fingerprint_event_processor.cpp",
56    "${mmi_path}/service/monitor/src/event_monitor_handler.cpp",
57    "${mmi_path}/util/common/src/input_event_data_transformation.cpp",
58    "${mmi_path}/util/network/src/stream_buffer.cpp",
59    "src/fingerprint_event_processor_test.cpp",
60  ]
61
62  deps = [
63    "${mmi_path}/frameworks/proxy:libmmi-client",
64    "${mmi_path}/service:libmmi-server",
65    "${mmi_path}/test/facility/mock:mmi_mock_sources",
66    "${mmi_path}/util:libmmi-util",
67    "//third_party/googletest:gmock_main",
68    "//third_party/googletest:gtest_main",
69  ]
70
71  external_deps = [
72    "ability_base:want",
73    "ability_runtime:ability_manager",
74    "c_utils:utils",
75    "config_policy:configpolicy_util",
76    "data_share:datashare_consumer",
77    "ffrt:libffrt",
78    "hilog:libhilog",
79    "image_framework:image_native",
80    "init:libbeget_proxy",
81    "init:libbegetutil",
82    "libinput:libinput-third-mmi",
83    "preferences:native_preferences",
84    "safwk:system_ability_fwk",
85    "samgr:samgr_proxy",
86    "security_component_manager:libsecurity_component_sdk",
87  ]
88
89  if (enable_player_framework) {
90    external_deps += [ "player_framework:media_client" ]
91  }
92  if (resource_schedule_service_enabled) {
93    external_deps += [ "resource_schedule_service:ressched_client" ]
94  }
95}
96