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")
15
16hdi_input_base_path = "./../../.."
17module_output_path = "drivers_peripheral_input/input"
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-int-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("input_udriver_unittest") {
47  testonly = true
48  module_out_path = module_output_path
49  install_enable = true
50  sources = [ "./hdi_input_test.cpp" ]
51
52  include_dirs = [
53    "$hdi_input_base_path/interfaces/include",
54    "$hdi_input_base_path/utils/include",
55    "$hdi_input_base_path/udriver/include",
56  ]
57
58  deps = [ "$hdi_input_base_path/udriver:hdi_input_udriver" ]
59
60  if (is_standard_system) {
61    external_deps = [
62      "c_utils:utils",
63      "hdf_core:libhdf_ipc_adapter",
64      "hdf_core:libhdf_utils",
65      "hdf_core:libhdi",
66      "hilog:libhilog",
67    ]
68  } else {
69    external_deps = [ "hilog:libhilog" ]
70  }
71
72  public_configs = [ ":camhdi_impl_utest_config" ]
73}
74