• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/ohos.gni")
15import("//drivers/adapter/uhdf2/uhdf.gni")
16import("//drivers/peripheral/camera/hal/camera.gni")
17import("//test/xts/tools/build/suite.gni")
18module_output_path = "hdf/camera"
19camera_path = "//drivers/peripheral/camera/hal"
20
21config("cameraTest_config") {
22  visibility = [ ":*" ]
23}
24
25ohos_moduletest_suite("HatsHdfCameraAttrTest") {
26  testonly = true
27  module_out_path = module_output_path
28  sources = [
29    "../common/common.cpp",
30    "./src/camera_3a_test.cpp",
31    "./src/device_manager_test.cpp",
32    "./src/hdi_callback_test.cpp",
33    "./src/hdi_device_test.cpp",
34    "./src/hdi_host_test.cpp",
35    "./src/hdi_stream_test.cpp",
36    "./src/pipeline_test.cpp",
37  ]
38
39  include_dirs = [
40    "//third_party/googletest/googletest/include/gtest",
41    "../include",
42    "$camera_path/../interfaces/include",
43    "$camera_path/../interfaces/hdi_ipc",
44    "$camera_path/../interfaces/hdi_ipc/server/include",
45    "$camera_path/../interfaces/hdi_ipc/utils/include",
46    "$camera_path/../interfaces/hdi_ipc/client/include",
47    "$camera_path/../interfaces/hdi_ipc/callback/host/include",
48    "$camera_path/../interfaces/hdi_ipc/callback/device/include",
49    "$camera_path/../interfaces/hdi_ipc/callback/operator/include",
50    "$camera_path/include",
51    "$camera_path/hdi_impl",
52    "$camera_path/hdi_impl/include",
53    "$camera_path/hdi_impl/include/camera_host",
54    "$camera_path/hdi_impl/include/camera_device",
55    "$camera_path/hdi_impl/include/stream_operator",
56    "$camera_path/hdi_impl/include/offline_stream_operator",
57    "$camera_path/device_manager/include/",
58    "$camera_path/device_manager/include/mpi",
59    "//base/startup/syspara_lite/adapter/native/syspara/include",
60    "$camera_path/utils/event",
61    "//drivers/peripheral/camera/interfaces/metadata/include",
62
63    #producer
64    "//utils/native/base/include",
65    "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include",
66    "$camera_path/pipeline_core/utils",
67    "$camera_path/pipeline_core/include",
68    "$camera_path/pipeline_core/host_stream/include",
69    "$camera_path/pipeline_core/nodes/include",
70    "$camera_path/pipeline_core/nodes/src/node_base",
71    "$camera_path/pipeline_core/nodes/src/dummy_node",
72    "$camera_path/pipeline_core/pipeline_impl/src/strategy/config",
73    "$camera_path/pipeline_core/pipeline_impl/include",
74    "$camera_path/pipeline_core/pipeline_impl/src",
75    "$camera_path/pipeline_core/pipeline_impl/src/builder",
76    "$camera_path/pipeline_core/pipeline_impl/src/dispatcher",
77    "$camera_path/pipeline_core/pipeline_impl/src/parser",
78    "$camera_path/pipeline_core/pipeline_impl/src/strategy",
79    "$camera_path/pipeline_core/ipp/include",
80
81    # hcs parser
82    "//system/core/include/cutils",
83  ]
84
85  deps = [
86    "$camera_path/../interfaces/hdi_ipc/client:libcamera_client",
87    "$camera_path/buffer_manager:camera_buffer_manager",
88    "$camera_path/device_manager:camera_device_manager",
89    "$camera_path/hdi_impl:camera_hdi_impl",
90    "$camera_path/pipeline_core:camera_pipeline_core",
91    "//drivers/peripheral/camera/interfaces/metadata:metadata",
92    "//third_party/googletest:gmock",
93    "//third_party/googletest:gmock_main",
94    "//third_party/googletest:gtest",
95    "//third_party/googletest:gtest_main",
96  ]
97
98  if (is_standard_system) {
99    external_deps = [
100      "device_driver_framework:libhdf_utils",
101      "device_driver_framework:libhdi",
102      "graphic_standard:surface",
103      "hiviewdfx_hilog_native:libhilog",
104      "ipc:ipc_single",
105      "utils_base:utils",
106    ]
107  } else {
108    external_deps = [ "hilog:libhilog" ]
109  }
110
111  external_deps += [
112    "ipc:ipc_single",
113    "samgr_standard:samgr_proxy",
114    "startup_l2:syspara",
115  ]
116
117  public_configs = [ ":cameraTest_config" ]
118}
119