• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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/utils"
19
20group("unittest") {
21  testonly = true
22
23  deps = [ ":distributed_input_utils_test" ]
24}
25
26## UnitTest distributed_input_utils_test {{{
27ohos_unittest("distributed_input_utils_test") {
28  module_out_path = module_out_path
29
30  include_dirs = [
31    "${av_transport_path}/common/include",
32    "${fwk_common_path}/utils/include",
33    "${fwk_common_path}/log/include",
34    "${utils_path}/include",
35    "${utils_path}/test/unittest",
36    "${common_path}/include",
37    "${fwk_interfaces_path}/include",
38    "${fwk_interfaces_path}/include/ipc",
39    "${frameworks_path}/include",
40    "//third_party/json/include",
41    "${common_path}/test/mock",
42    "${service_common}/include",
43  ]
44
45  sources = [
46    "${common_path}/test/mock/softbus_bus_center_mock.cpp",
47    "${distributedinput_path}/utils/src/dinput_context.cpp",
48    "${distributedinput_path}/utils/src/dinput_log.cpp",
49    "${distributedinput_path}/utils/src/dinput_utils_tool.cpp",
50    "dinput_context_test.cpp",
51  ]
52
53  cflags = [
54    "-Wall",
55    "-Werror",
56    "-g3",
57    "-Dprivate=public",
58    "-Dprotected=public",
59  ]
60
61  defines = [
62    "HI_LOG_ENABLE",
63    "DH_LOG_TAG=\"distributedinpututtest\"",
64    "LOG_DOMAIN=0xD004100",
65    "COMPILE_TEST_MODE",
66  ]
67
68  deps = [
69    "${utils_path}:libdinput_utils",
70    "//third_party/openssl:libcrypto_shared",
71  ]
72
73  external_deps = [
74    "c_utils:utils",
75    "distributed_hardware_fwk:libdhfwk_sdk",
76    "hilog:libhilog",
77    "hisysevent:libhisysevent",
78    "ipc:ipc_core",
79    "samgr:samgr_proxy",
80  ]
81
82  cflags_cc = [ "-DHILOG_ENABLE" ]
83}
84## UnitTest distributed_input_utils_test }}}
85