1# Copyright (c) 2022-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/utils" 19 20group("unittest") { 21 testonly = true 22 23 deps = [ ":distributed_input_utils_test" ] 24} 25 26## UnitTest distributed_input_utils_test {{{ 27ohos_unittest("distributed_input_utils_test") { 28 module_out_path = module_out_path 29 30 include_dirs = [ 31 "${utils_path}/include", 32 "${utils_path}/test/unittest", 33 "${common_path}/include", 34 "${frameworks_path}/include", 35 "${common_path}/test/mock", 36 "${service_common}/include", 37 ] 38 39 sources = [ 40 "${common_path}/test/mock/socket_mock.cpp", 41 "${common_path}/test/mock/softbus_bus_center_mock.cpp", 42 "${distributedinput_path}/utils/src/dinput_context.cpp", 43 "${distributedinput_path}/utils/src/dinput_utils_tool.cpp", 44 "dinput_context_test.cpp", 45 ] 46 47 cflags = [ 48 "-Wall", 49 "-Werror", 50 "-g3", 51 "-Dprivate=public", 52 "-Dprotected=public", 53 ] 54 55 defines = [ 56 "HI_LOG_ENABLE", 57 "DH_LOG_TAG=\"distributedinpututtest\"", 58 "LOG_DOMAIN=0xD004120", 59 ] 60 61 deps = [ "${utils_path}:libdinput_utils" ] 62 63 external_deps = [ 64 "c_utils:utils", 65 "distributed_hardware_fwk:distributed_av_sender", 66 "distributed_hardware_fwk:distributedhardwareutils", 67 "distributed_hardware_fwk:libdhfwk_sdk", 68 "hilog:libhilog", 69 "hisysevent:libhisysevent", 70 "ipc:ipc_core", 71 "json:nlohmann_json_static", 72 "openssl:libcrypto_shared", 73 "samgr:samgr_proxy", 74 ] 75 76 cflags_cc = [ "-DHILOG_ENABLE" ] 77} 78## UnitTest distributed_input_utils_test }}} 79