• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//drivers/adapter/uhdf2/uhdf.gni")
16hdi_input_base_path = "//drivers/peripheral/hidl_adapter/input_ipc"
17module_output_path = "hidl_adapter/input_ipc"
18config("camhdi_impl_utest_config") {
19  visibility = [ ":*" ]
20  cflags_cc = [
21    "-Wall",
22    "-Wextra",
23    "-Werror",
24    "-Wno-error",
25    "-DGST_DISABLE_DEPRECATED",
26    "-DHAVE_CONFIG_H",
27    "-DCOLORSPACE=\"videoconvert\"",
28    "-fno-strict-aliasing",
29    "-Wno-sign-compare",
30    "-Wno-builtin-requires-header",
31    "-Wno-unused-variable",
32    "-Wno-unused-label",
33    "-Wno-implicit-function-declaration",
34    "-Wno-format",
35    "-Wno-int32_t-conversion",
36    "-Wno-unused-function",
37    "-Wno-thread-safety-attributes",
38    "-Wno-inconsistent-missing-override",
39    "-fno-rtti",
40    "-fno-exceptions",
41    "-ffunction-sections",
42    "-fdata-sections",
43  ]
44}
45
46ohos_unittest("hdi_input_unittest_neu_ipc") {
47  testonly = true
48  module_out_path = module_output_path
49  install_enable = true
50  sources = [
51    "unittest/utest_input_hdi_base.cpp",
52    "unittest/utest_input_manager_impl.cpp",
53  ]
54
55  include_dirs = [
56    "$hdi_input_base_path/include",
57    "$hdi_input_base_path/client/include",
58    "$hdi_input_base_path/service/include",
59    "$hdi_input_base_path/client/include",
60    "$hdi_input_base_path/test/include",
61    "//third_party/libevdev/include/linux/linux",
62
63    # HCS
64    "//system/core/include/cutils",
65  ]
66
67  deps = [
68    "../client:libinput_client",
69    "//third_party/googletest:gmock_main",
70    "//third_party/googletest:gtest",
71    "//third_party/googletest:gtest_main",
72  ]
73
74  if (is_standard_system) {
75    external_deps = [
76      "device_driver_framework:libhdf_host",
77      "device_driver_framework:libhdf_ipc_adapter",
78      "device_driver_framework:libhdf_utils",
79      "device_driver_framework:libhdi",
80      "graphic_standard:surface",
81      "hiviewdfx_hilog_native:libhilog",
82      "ipc:ipc_single",
83      "utils_base:utils",
84    ]
85  } else {
86    external_deps = [ "hilog:libhilog" ]
87  }
88
89  external_deps += [ "samgr_L2:samgr_proxy" ]
90  public_configs = [ ":camhdi_impl_utest_config" ]
91}
92