1# Copyright (c) 2021-2023 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/sink_handler" 19 20group("unittest") { 21 testonly = true 22 23 deps = [ ":distributed_input_sink_handler_test" ] 24} 25 26## UnitTest distributed_input_manager_service_test {{{ 27ohos_unittest("distributed_input_sink_handler_test") { 28 module_out_path = module_out_path 29 30 include_dirs = [ 31 "${distributedinput_path}/sinkhandler/include", 32 "${innerkits_path}/include", 33 "${innerkits_path}/src", 34 "${ipc_path}/include", 35 "${ipc_path}/src", 36 "${services_sink_path}/sinkmanager/include", 37 "${frameworks_path}/include", 38 "${service_common}/include", 39 "${common_path}/include", 40 "${fwk_common_path}/log/include", 41 "${fwk_common_path}/utils/include", 42 "//third_party/json/include", 43 "${dfx_utils_path}/include", 44 "${fwk_interfaces_path}/include", 45 "${fwk_interfaces_path}/include/ipc", 46 "${services_source_path}/inputinject/include", 47 "${utils_path}/include", 48 ] 49 50 sources = [ 51 "${distributedinput_path}/sinkhandler/src/distributed_input_sink_handler.cpp", 52 "${distributedinput_path}/sinkhandler/src/load_d_input_sink_callback.cpp", 53 "${distributedinput_path}/sinkhandler/test/unittest/mock/mock_distributed_input_client.cpp", 54 "distributed_input_sinkhandler_test.cpp", 55 ] 56 57 cflags = [ 58 "-Wall", 59 "-Werror", 60 "-g3", 61 "-Dprivate=public", 62 "-Dprotected=public", 63 ] 64 65 defines = [ 66 "HI_LOG_ENABLE", 67 "DH_LOG_TAG=\"distributedinpututtest\"", 68 "LOG_DOMAIN=0xD004120", 69 ] 70 71 deps = [ 72 "${dfx_utils_path}:libdinput_dfx_utils", 73 "${innerkits_path}:libdinput_sdk", 74 "${utils_path}:libdinput_utils", 75 ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "eventhandler:libeventhandler", 80 "hisysevent:libhisysevent", 81 "ipc:ipc_core", 82 "samgr:samgr_proxy", 83 ] 84 85 cflags_cc = [ "-DHILOG_ENABLE" ] 86} 87## UnitTest distributed_input_manager_service_test }}} 88