1# Copyright (c) 2021-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( 16 "//foundation/distributedhardware/distributed_input/distributedinput.gni") 17 18module_out_path = "distributed_input/source_inject" 19 20group("sourceinjectunittest") { 21 testonly = true 22 23 deps = [ ":distributed_input_inner_sourceinject_test" ] 24} 25 26## UnitTest distributed_input_manager_service_test {{{ 27ohos_unittest("distributed_input_inner_sourceinject_test") { 28 module_out_path = module_out_path 29 30 include_dirs = [ 31 "${innerkits_path}/include", 32 "${ipc_path}/include", 33 "${services_source_path}/inputinject/include", 34 "${frameworks_path}/include", 35 "${common_path}/include", 36 "${services_state_path}/include", 37 "${frameworks_path}/include", 38 "${service_common}/include", 39 "${dfx_utils_path}/include", 40 "${utils_path}/include", 41 "${distributedinput_path}/inputdevicehandler/include", 42 "${common_path}/test/mock", 43 ] 44 45 sources = [ 46 "${common_path}/include/input_hub.cpp", 47 "${common_path}/test/mock/socket_mock.cpp", 48 "${common_path}/test/mock/softbus_bus_center_mock.cpp", 49 "${distributedinput_path}/inputdevicehandler/src/distributed_input_handler.cpp", 50 "${services_source_path}/inputinject/src/distributed_input_inject.cpp", 51 "${services_source_path}/inputinject/src/distributed_input_node_manager.cpp", 52 "${services_source_path}/inputinject/src/virtual_device.cpp", 53 "distributed_input_sourceinject_test.cpp", 54 ] 55 56 cflags = [ 57 "-Wall", 58 "-Werror", 59 "-g3", 60 "-Dprivate=public", 61 "-Dprotected=public", 62 ] 63 64 defines = [ 65 "HI_LOG_ENABLE", 66 "DH_LOG_TAG=\"distributedinpututtest\"", 67 "LOG_DOMAIN=0xD004120", 68 ] 69 70 deps = [ 71 "${dfx_utils_path}:libdinput_dfx_utils", 72 "${innerkits_path}:libdinput_sdk", 73 "${utils_path}:libdinput_utils", 74 ] 75 76 external_deps = [ 77 "c_utils:utils", 78 "distributed_hardware_fwk:distributed_av_sender", 79 "distributed_hardware_fwk:distributedhardwareutils", 80 "distributed_hardware_fwk:libdhfwk_sdk", 81 "dsoftbus:softbus_client", 82 "eventhandler:libeventhandler", 83 "hilog:libhilog", 84 "ipc:ipc_core", 85 "json:nlohmann_json_static", 86 "libevdev:libevdev", 87 "openssl:libcrypto_shared", 88 "safwk:system_ability_fwk", 89 "samgr:samgr_proxy", 90 ] 91 92 cflags_cc = [ "-DHILOG_ENABLE" ] 93} 94## UnitTest distributed_input_manager_service_test }}} 95