• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/trans_base"
19
20group("transbaseunittest") {
21  testonly = true
22
23  deps = [ ":distributed_input_transbase_test" ]
24}
25
26## UnitTest distributed_input_manager_service_test {{{
27ohos_unittest("distributed_input_transbase_test") {
28  module_out_path = module_out_path
29
30  include_dirs = [
31    "${av_transport_path}/common/include",
32    "${distributedinput_path}/services/source/transport/include",
33    "${distributedinput_path}/services/sink/transport/include",
34    "${distributedinput_path}/services/transportbase/include",
35    "${common_path}/include",
36    "${fwk_interfaces_path}/include",
37    "${fwk_common_path}/log/include",
38    "${fwk_common_path}/utils/include",
39    "${service_common}/include",
40    "${services_source_path}/inputinject/include",
41    "${dfx_utils_path}/include",
42    "${utils_path}/include",
43    "${frameworks_path}/include",
44    "//third_party/json/include",
45    "${distributedinput_path}/inputdevicehandler/include",
46    "${distributedinput_path}/services/state/include",
47    "${common_path}/test/mock",
48    "${ipc_path}/include",
49  ]
50
51  sources = [
52    "${common_path}/test/mock/socket_mock.cpp",
53    "${common_path}/test/mock/softbus_bus_center_mock.cpp",
54    "${distributedinput_path}/services/transportbase/src/distributed_input_transport_base.cpp",
55    "${services_sink_path}/transport/src/distributed_input_sink_switch.cpp",
56    "${services_sink_path}/transport/src/distributed_input_sink_transport.cpp",
57    "${services_source_path}/transport/src/distributed_input_source_transport.cpp",
58    "distributed_input_transbase_test.cpp",
59  ]
60
61  cflags = [
62    "-Wall",
63    "-Werror",
64    "-g3",
65    "-Dprivate=public",
66    "-Dprotected=public",
67  ]
68
69  defines = [
70    "HI_LOG_ENABLE",
71    "DH_LOG_TAG=\"distributedinpututtest\"",
72    "LOG_DOMAIN=0xD004120",
73  ]
74
75  deps = [
76    "${dfx_utils_path}:libdinput_dfx_utils",
77    "${innerkits_path}:libdinput_sdk",
78    "${services_source_path}/inputinject:libdinput_inject",
79    "${utils_path}:libdinput_utils",
80    "//third_party/libevdev:libevdev",
81  ]
82
83  external_deps = [
84    "c_utils:utils",
85    "distributed_hardware_fwk:libdhfwk_sdk",
86    "eventhandler:libeventhandler",
87    "hicollie:libhicollie",
88    "hitrace:hitrace_meter",
89    "ipc:ipc_core",
90  ]
91
92  cflags_cc = [ "-DHILOG_ENABLE" ]
93}
94## UnitTest distributed_input_manager_service_test }}}
95