• 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_handler"
19
20group("unittest") {
21  testonly = true
22
23  deps = [ ":distributed_input_source_handler_test" ]
24}
25
26## UnitTest distributed_input_manager_service_test {{{
27ohos_unittest("distributed_input_source_handler_test") {
28  module_out_path = module_out_path
29
30  include_dirs = [
31    "${distributedinput_path}/sourcehandler/include",
32    "${innerkits_path}/include",
33    "${innerkits_path}/src",
34    "${ipc_path}/include",
35    "${ipc_path}/src",
36    "${services_source_path}/sourcemanager/include",
37    "${frameworks_path}/include",
38    "${service_common}/include",
39    "${common_path}/include",
40    "${fwk_common_path}/log/include",
41    "${fwk_common_path}/utils/include",
42    "//third_party/json/include",
43    "${dfx_utils_path}/include",
44    "${fwk_interfaces_path}/include",
45    "${fwk_interfaces_path}/include/ipc",
46    "${services_source_path}/inputinject/include",
47    "${distributedinput_path}/services/state/include",
48    "${utils_path}/include",
49  ]
50
51  sources = [
52    "${distributedinput_path}/sourcehandler/src/distributed_input_source_handler.cpp",
53    "${distributedinput_path}/sourcehandler/src/load_d_input_source_callback.cpp",
54    "${distributedinput_path}/sourcehandler/test/unittest/mock/mock_distributed_input_client.cpp",
55    "distributed_input_sourcehandler_test.cpp",
56  ]
57
58  cflags = [
59    "-Wall",
60    "-Werror",
61    "-g3",
62    "-Dprivate=public",
63    "-Dprotected=public",
64  ]
65
66  defines = [
67    "HI_LOG_ENABLE",
68    "DH_LOG_TAG=\"distributedinpututtest\"",
69    "LOG_DOMAIN=0xD004100",
70  ]
71
72  deps = [
73    "${dfx_utils_path}:libdinput_dfx_utils",
74    "${innerkits_path}:libdinput_sdk",
75    "${utils_path}:libdinput_utils",
76    "//third_party/libevdev:libevdev",
77  ]
78
79  external_deps = [
80    "c_utils:utils",
81    "eventhandler:libeventhandler",
82    "hisysevent:libhisysevent",
83    "ipc:ipc_core",
84    "samgr:samgr_proxy",
85  ]
86
87  cflags_cc = [ "-DHILOG_ENABLE" ]
88}
89## UnitTest distributed_input_manager_service_test }}}
90