• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2024 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("//build/ohos_var.gni")
16import("//build/test.gni")
17import("//drivers/peripheral/camera/camera.gni")
18import("//test/xts/tools/build/suite.gni")
19
20if (defined(ohos_lite)) {
21  import("//device/board/hisilicon/hispark_taurus/device.gni")
22} else {
23  import("//vendor/$product_company/$product_name/product.gni")
24}
25
26module_output_path = "hats/camera"
27
28config("cameraTest_config") {
29  visibility = [ ":*" ]
30}
31
32ohos_moduletest_suite("HatsHdfCameraPipelineTest") {
33  testonly = true
34  module_out_path = module_output_path
35  sources = [
36    "./pipeline_core_test.cpp",
37    "./stream_pipeline_builder_test.cpp",
38    "./stream_pipeline_dispatcher_test.cpp",
39    "./stream_pipeline_strategy_test.cpp",
40  ]
41
42  include_dirs = [
43    "//third_party/googletest/googletest/include/gtest",
44    "./include",
45    "$camera_path/../interfaces",
46    "$camera_path/../../interfaces/include",
47    "$camera_path/../../interfaces/hdi_ipc",
48    "$camera_path/../../interfaces/hdi_ipc/utils/include",
49    "$camera_path/../../test/common/callback/include",
50    "$camera_path/include",
51    "$camera_path/../../hdi_service/v1_0/include",
52    "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard",
53    "$camera_path/device_manager/include/",
54    "$camera_path/device_manager/include/v4l2",
55    "$camera_path/utils/event",
56
57    #producer
58    "$camera_path/pipeline_core/utils",
59    "$camera_path/pipeline_core/include",
60    "$camera_path/pipeline_core/host_stream/include",
61    "$camera_path/pipeline_core/nodes/include",
62    "$camera_path/pipeline_core/nodes/src/node_base",
63    "$camera_path/pipeline_core/nodes/src/dummy_node",
64    "$camera_path/pipeline_core/pipeline_impl/src/strategy/config",
65    "$camera_path/pipeline_core/pipeline_impl/include",
66    "$camera_path/pipeline_core/pipeline_impl/src",
67    "$camera_path/pipeline_core/pipeline_impl/src/builder",
68    "$camera_path/pipeline_core/pipeline_impl/src/dispatcher",
69    "$camera_path/pipeline_core/pipeline_impl/src/parser",
70    "$camera_path/pipeline_core/pipeline_impl/src/strategy",
71    "$camera_path/pipeline_core/ipp/include",
72  ]
73
74  deps = [
75    "$board_camera_path/device_manager:camera_device_manager",
76    "$board_camera_path/pipeline_core:camera_pipeline_core",
77    "$camera_path/../../hdi_service/v1_0:camera_host_service_1.0_static",
78    "//third_party/googletest:gmock",
79    "//third_party/googletest:gmock_main",
80    "//third_party/googletest:gtest",
81    "//third_party/googletest:gtest_main",
82  ]
83
84  if (is_standard_system) {
85    external_deps = [
86      "c_utils:utils",
87      "drivers_peripheral_camera:peripheral_camera_buffer_manager",
88      "drivers_peripheral_camera:peripheral_camera_device_manager",
89      "drivers_peripheral_camera:peripheral_camera_pipeline_core",
90      "graphic_surface:surface",
91      "hdf_core:libhdf_host",
92      "hdf_core:libhdf_ipc_adapter",
93      "hdf_core:libhdf_utils",
94      "hdf_core:libhdi",
95      "hilog:libhilog",
96      "ipc:ipc_single",
97    ]
98  } else {
99    external_deps = [ "hilog:libhilog" ]
100  }
101
102  external_deps += [
103    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
104    "drivers_interface_camera:metadata",
105    "init:libbegetutil",
106    "ipc:ipc_single",
107    "samgr:samgr_proxy",
108  ]
109
110  public_configs = [ ":cameraTest_config" ]
111  subsystem_name = "hdf"
112  part_name = "drivers_interface_camera"
113}
114