• 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/sink_manager"
19
20group("sinkmanagerunittest") {
21  testonly = true
22
23  deps = [ ":distributed_input_sinkmanager_test" ]
24}
25
26## UnitTest distributed_input_manager_service_test {{{
27ohos_unittest("distributed_input_sinkmanager_test") {
28  module_out_path = module_out_path
29
30  sanitize = {
31    cfi = true
32    cfi_cross_dso = true
33    debug = false
34  }
35
36  include_dirs = [
37    "${av_transport_path}/common/include",
38    "${innerkits_path}/include",
39    "${innerkits_path}/src",
40    "${ipc_path}/include",
41    "${ipc_path}/src",
42    "${distributedinput_path}/services/transportbase/include",
43    "${services_sink_path}/transport/include",
44    "${services_sink_path}/sinkmanager/include",
45    "${frameworks_path}/include",
46    "${common_path}/include",
47    "${services_state_path}/include",
48    "${fwk_common_path}/log/include",
49    "${fwk_common_path}/utils/include",
50    "${service_common}/include",
51    "//third_party/json/include",
52    "${services_sink_path}/inputcollector/include",
53    "${dfx_utils_path}/include",
54    "${utils_path}/include",
55    "${fwk_interfaces_path}/include",
56    "${fwk_interfaces_path}/include/ipc",
57    "${common_path}/test/mock",
58    "${services_sink_path}/sinkmanager/test/sinkmanagerunittest/mock/",
59    "${distributedinput_path}/services/state/include",
60  ]
61
62  sources = [
63    "${common_path}/include/input_hub.cpp",
64    "${common_path}/include/white_list_util.cpp",
65    "${common_path}/test/mock/socket_mock.cpp",
66    "${common_path}/test/mock/softbus_bus_center_mock.cpp",
67    "${ipc_path}/src/distributed_input_sink_stub.cpp",
68    "${ipc_path}/src/get_sink_screen_infos_call_back_stub.cpp",
69    "${ipc_path}/src/sharing_dhid_listener_stub.cpp",
70    "${services_sink_path}/inputcollector/src/distributed_input_collector.cpp",
71    "${services_sink_path}/sinkmanager/src/distributed_input_sink_event_handler.cpp",
72    "${services_sink_path}/sinkmanager/src/distributed_input_sink_manager.cpp",
73    "${services_sink_path}/sinkmanager/test/sinkmanagerunittest/mock/mock_process.cpp",
74    "${services_sink_path}/transport/src/distributed_input_sink_switch.cpp",
75    "${services_sink_path}/transport/src/distributed_input_sink_transport.cpp",
76    "distributed_input_sinkmanager_test.cpp",
77  ]
78
79  cflags = [
80    "-Wall",
81    "-Werror",
82    "-g3",
83    "-Dprivate=public",
84    "-Dprotected=public",
85  ]
86
87  defines = [
88    "HI_LOG_ENABLE",
89    "DH_LOG_TAG=\"distributedinpututtest\"",
90    "LOG_DOMAIN=0xD004120",
91  ]
92
93  deps = [
94    "${dfx_utils_path}:libdinput_dfx_utils",
95    "${distributedinput_path}/services/state:libdinput_sink_state",
96    "${distributedinput_path}/services/transportbase:libdinput_trans_base",
97    "${services_sink_path}/transport:libdinput_sink_trans",
98    "${utils_path}:libdinput_utils",
99    "//third_party/libevdev:libevdev",
100    "//third_party/openssl:libcrypto_shared",
101  ]
102
103  external_deps = [
104    "access_token:libaccesstoken_sdk",
105    "access_token:libnativetoken",
106    "access_token:libtoken_setproc",
107    "c_utils:utils",
108    "config_policy:configpolicy_util",
109    "distributed_hardware_fwk:libdhfwk_sdk",
110    "dsoftbus:softbus_client",
111    "eventhandler:libeventhandler",
112    "graphic_surface:surface",
113    "hicollie:libhicollie",
114    "ipc:ipc_core",
115    "safwk:system_ability_fwk",
116    "samgr:samgr_proxy",
117    "window_manager:libdm",
118  ]
119
120  cflags_cc = [ "-DHILOG_ENABLE" ]
121}
122## UnitTest distributed_input_manager_service_test }}}
123