• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/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    "${av_transport_path}/common/include",
32    "${innerkits_path}/include",
33    "${ipc_path}/include",
34    "${services_source_path}/inputinject/include",
35    "${frameworks_path}/include",
36    "${common_path}/include",
37    "${services_state_path}/include",
38    "${frameworks_path}/include",
39    "${fwk_common_path}/log/include",
40    "${fwk_common_path}/utils/include",
41    "${service_common}/include",
42    "//third_party/json/include",
43    "${dfx_utils_path}/include",
44    "${utils_path}/include",
45    "${fwk_interfaces_path}/include",
46    "${fwk_interfaces_path}/include/ipc",
47    "${distributedinput_path}/inputdevicehandler/include",
48    "${common_path}/test/mock",
49  ]
50
51  sources = [
52    "${common_path}/include/input_hub.cpp",
53    "${common_path}/test/mock/socket_mock.cpp",
54    "${common_path}/test/mock/softbus_bus_center_mock.cpp",
55    "${distributedinput_path}/inputdevicehandler/src/distributed_input_handler.cpp",
56    "${services_source_path}/inputinject/src/distributed_input_inject.cpp",
57    "${services_source_path}/inputinject/src/distributed_input_node_manager.cpp",
58    "${services_source_path}/inputinject/src/virtual_device.cpp",
59    "distributed_input_sourceinject_test.cpp",
60  ]
61
62  cflags = [
63    "-Wall",
64    "-Werror",
65    "-g3",
66    "-Dprivate=public",
67    "-Dprotected=public",
68  ]
69
70  defines = [
71    "HI_LOG_ENABLE",
72    "DH_LOG_TAG=\"distributedinpututtest\"",
73    "LOG_DOMAIN=0xD004120",
74  ]
75
76  deps = [
77    "${dfx_utils_path}:libdinput_dfx_utils",
78    "${innerkits_path}:libdinput_sdk",
79    "${utils_path}:libdinput_utils",
80    "//third_party/libevdev:libevdev",
81    "//third_party/openssl:libcrypto_shared",
82  ]
83
84  external_deps = [
85    "c_utils:utils",
86    "dsoftbus:softbus_client",
87    "eventhandler:libeventhandler",
88    "ipc:ipc_core",
89    "safwk:system_ability_fwk",
90    "samgr:samgr_proxy",
91  ]
92
93  cflags_cc = [ "-DHILOG_ENABLE" ]
94}
95## UnitTest distributed_input_manager_service_test }}}
96