• 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/inner_kits"
19
20group("unittest") {
21  testonly = true
22
23  deps = [ ":distributed_input_inner_test" ]
24}
25
26## UnitTest distributed_input_inner_test {{{
27ohos_unittest("distributed_input_inner_test") {
28  module_out_path = module_out_path
29
30  include_dirs = [
31    "${av_transport_path}/common/include",
32    "${innerkits_path}/include",
33    "${innerkits_path}/src",
34    "${ipc_path}/include",
35    "${ipc_path}/src",
36    "${distributedinput_path}/services/include",
37    "${frameworks_path}/include",
38    "${common_path}/include",
39    "${fwk_common_path}/log/include",
40    "${fwk_common_path}/utils/include",
41    "//third_party/json/include",
42    "${utils_path}/include",
43    "${fwk_interfaces_path}/include",
44    "${fwk_interfaces_path}/include/ipc",
45    "${frameworks_path}/include",
46  ]
47
48  sources = [
49    "${common_path}/include/white_list_util.cpp",
50    "${innerkits_path}/src/distributed_input_kit.cpp",
51    "${innerkits_path}/test/unittest/mock/mock_distributed_input_client.cpp",
52    "${ipc_path}/src/add_white_list_infos_call_back_proxy.cpp",
53    "${ipc_path}/src/add_white_list_infos_call_back_stub.cpp",
54    "${ipc_path}/src/del_white_list_infos_call_back_proxy.cpp",
55    "${ipc_path}/src/del_white_list_infos_call_back_stub.cpp",
56    "${ipc_path}/src/distributed_input_source_proxy.cpp",
57    "${ipc_path}/src/get_sink_screen_infos_call_back_proxy.cpp",
58    "${ipc_path}/src/get_sink_screen_infos_call_back_stub.cpp",
59    "${ipc_path}/src/input_node_listener_proxy.cpp",
60    "${ipc_path}/src/input_node_listener_stub.cpp",
61    "${ipc_path}/src/prepare_d_input_call_back_proxy.cpp",
62    "${ipc_path}/src/prepare_d_input_call_back_stub.cpp",
63    "${ipc_path}/src/register_d_input_call_back_proxy.cpp",
64    "${ipc_path}/src/register_d_input_call_back_stub.cpp",
65    "${ipc_path}/src/sharing_dhid_listener_proxy.cpp",
66    "${ipc_path}/src/sharing_dhid_listener_stub.cpp",
67    "${ipc_path}/src/simulation_event_listener_proxy.cpp",
68    "${ipc_path}/src/simulation_event_listener_stub.cpp",
69    "${ipc_path}/src/start_d_input_call_back_proxy.cpp",
70    "${ipc_path}/src/start_d_input_call_back_stub.cpp",
71    "${ipc_path}/src/start_stop_d_inputs_call_back_proxy.cpp",
72    "${ipc_path}/src/start_stop_d_inputs_call_back_stub.cpp",
73    "${ipc_path}/src/start_stop_result_call_back_proxy.cpp",
74    "${ipc_path}/src/start_stop_result_call_back_stub.cpp",
75    "${ipc_path}/src/stop_d_input_call_back_proxy.cpp",
76    "${ipc_path}/src/stop_d_input_call_back_stub.cpp",
77    "${ipc_path}/src/unprepare_d_input_call_back_proxy.cpp",
78    "${ipc_path}/src/unprepare_d_input_call_back_stub.cpp",
79    "${ipc_path}/src/unregister_d_input_call_back_proxy.cpp",
80    "${ipc_path}/src/unregister_d_input_call_back_stub.cpp",
81    "distributed_input_inner_test.cpp",
82  ]
83
84  cflags = [
85    "-Wall",
86    "-Werror",
87    "-g3",
88    "-Dprivate=public",
89    "-Dprotected=public",
90  ]
91
92  defines = [
93    "HI_LOG_ENABLE",
94    "DH_LOG_TAG=\"distributedinpututtest\"",
95    "LOG_DOMAIN=0xD004100",
96  ]
97
98  deps = [ "${utils_path}:libdinput_utils" ]
99
100  external_deps = [
101    "c_utils:utils",
102    "config_policy:configpolicy_util",
103    "eventhandler:libeventhandler",
104    "ipc:ipc_core",
105  ]
106
107  cflags_cc = [ "-DHILOG_ENABLE" ]
108}
109## UnitTest distributed_input_manager_service_test }}}
110