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_trans" 19 20group("sinktransunittest") { 21 testonly = true 22 23 deps = [ ":distributed_input_sinktrans_test" ] 24} 25 26## UnitTest distributed_input_manager_service_test {{{ 27ohos_unittest("distributed_input_sinktrans_test") { 28 module_out_path = module_out_path 29 30 include_dirs = [ 31 "${av_transport_path}/common/include", 32 "${services_sink_path}/transport/include", 33 "${distributedinput_path}/services/transportbase/include", 34 "${common_path}/include", 35 "${fwk_common_path}/log/include", 36 "${fwk_common_path}/utils/include", 37 "${frameworks_path}/include", 38 "${fwk_interfaces_path}/include", 39 "${service_common}/include", 40 "//third_party/json/include", 41 "${dfx_utils_path}/include", 42 "${utils_path}/include", 43 "${common_path}/test/mock", 44 "${services_sink_path}/sinkmanager/include", 45 "${fwk_interfaces_path}/include/ipc", 46 "${innerkits_path}/include", 47 "${innerkits_path}/src", 48 "${ipc_path}/include", 49 "${ipc_path}/src", 50 "${services_sink_path}/inputcollector/include", 51 "${services_source_path}/inputinject/include", 52 "${distributedinput_path}/inputdevicehandler/include", 53 "${distributedinput_path}/services/state/include", 54 ] 55 56 sources = [ 57 "${common_path}/test/mock/session_mock.cpp", 58 "${common_path}/test/mock/softbus_bus_center_mock.cpp", 59 "${distributedinput_path}/services/transportbase/src/distributed_input_transport_base.cpp", 60 "${services_sink_path}/sinkmanager/src/distributed_input_sink_manager.cpp", 61 "${services_sink_path}/transport/src/distributed_input_sink_switch.cpp", 62 "${services_sink_path}/transport/src/distributed_input_sink_transport.cpp", 63 "distributed_input_sinktrans_test.cpp", 64 ] 65 66 cflags = [ 67 "-Wall", 68 "-Werror", 69 "-g3", 70 "-Dprivate=public", 71 "-Dprotected=public", 72 ] 73 74 defines = [ 75 "HI_LOG_ENABLE", 76 "DH_LOG_TAG=\"distributedinpututtest\"", 77 "LOG_DOMAIN=0xD004100", 78 "COMPILE_TEST_MODE", 79 ] 80 81 deps = [ 82 "${dfx_utils_path}:libdinput_dfx_utils", 83 "${distributedinput_path}/services/state:libdinput_state", 84 "${services_sink_path}/inputcollector:libdinput_collector", 85 "${services_sink_path}/sinkmanager:libdinput_sink", 86 "${utils_path}:libdinput_utils", 87 "//third_party/libevdev:libevdev", 88 ] 89 90 external_deps = [ 91 "c_utils:utils", 92 "distributed_hardware_fwk:libdhfwk_sdk", 93 "eventhandler:libeventhandler", 94 "graphic_2d:surface", 95 "hisysevent:libhisysevent", 96 "hitrace:hitrace_meter", 97 "ipc:ipc_core", 98 "safwk:system_ability_fwk", 99 "samgr:samgr_proxy", 100 "window_manager:libdm", 101 ] 102 103 cflags_cc = [ "-DHILOG_ENABLE" ] 104} 105## UnitTest distributed_input_manager_service_test }}} 106