• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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/ohos.gni")
15import("//drivers/hdf_core/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("HatsHdfCameraFunctionTest") {
26  testonly = true
27  module_out_path = module_output_path
28  sources = [
29    "../common/common.cpp",
30    "./src/capture_test.cpp",
31    "./src/open_camera_test.cpp",
32    "./src/preview_test.cpp",
33    "./src/video_test.cpp",
34  ]
35
36  include_dirs = [
37    "//third_party/googletest/googletest/include/gtest",
38    "../include",
39    "$camera_path/../interfaces/include",
40    "$camera_path/../interfaces/hdi_ipc",
41    "$camera_path/../interfaces/hdi_ipc/server/include",
42    "$camera_path/../interfaces/hdi_ipc/utils/include",
43    "$camera_path/../interfaces/hdi_ipc/client/include",
44    "$camera_path/../interfaces/hdi_ipc/callback/host/include",
45    "$camera_path/../interfaces/hdi_ipc/callback/device/include",
46    "$camera_path/../interfaces/hdi_ipc/callback/operator/include",
47    "$camera_path/include",
48    "$camera_path/hdi_impl",
49    "$camera_path/hdi_impl/include",
50    "$camera_path/hdi_impl/include/camera_host",
51    "$camera_path/hdi_impl/include/camera_device",
52    "$camera_path/hdi_impl/include/stream_operator",
53    "$camera_path/hdi_impl/include/offline_stream_operator",
54    "$camera_path/device_manager/include/",
55    "$camera_path/device_manager/include/mpi",
56    "$camera_path/utils/event",
57    "//drivers/peripheral/camera/interfaces/metadata/include",
58
59    #producer
60    "//commonlibrary/c_utils/base/include",
61    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
62    "$camera_path/pipeline_core/utils",
63    "$camera_path/pipeline_core/include",
64    "$camera_path/pipeline_core/host_stream/include",
65    "$camera_path/pipeline_core/nodes/include",
66    "$camera_path/pipeline_core/nodes/src/node_base",
67    "$camera_path/pipeline_core/nodes/src/dummy_node",
68    "$camera_path/pipeline_core/pipeline_impl/src/strategy/config",
69    "$camera_path/pipeline_core/pipeline_impl/include",
70    "$camera_path/pipeline_core/pipeline_impl/src",
71    "$camera_path/pipeline_core/pipeline_impl/src/builder",
72    "$camera_path/pipeline_core/pipeline_impl/src/dispatcher",
73    "$camera_path/pipeline_core/pipeline_impl/src/parser",
74    "$camera_path/pipeline_core/pipeline_impl/src/strategy",
75    "$camera_path/pipeline_core/ipp/include",
76
77    # hcs parser
78    "//system/core/include/cutils",
79  ]
80
81  deps = [
82    "$camera_path/../interfaces/hdi_ipc/client:libcamera_client",
83    "$camera_path/buffer_manager:camera_buffer_manager",
84    "$camera_path/device_manager:camera_device_manager",
85    "$camera_path/hdi_impl:camera_hdi_impl",
86    "$camera_path/pipeline_core:camera_pipeline_core",
87    "//drivers/peripheral/camera/interfaces/metadata:metadata",
88    "//third_party/googletest:gmock",
89    "//third_party/googletest:gmock_main",
90    "//third_party/googletest:gtest",
91    "//third_party/googletest:gtest_main",
92  ]
93
94  if (is_standard_system) {
95    external_deps = [
96      "c_utils:utils",
97      "graphic_standard:surface",
98      "hdf_core:libhdf_utils",
99      "hdf_core:libhdi",
100      "hiviewdfx_hilog_native:libhilog",
101      "ipc:ipc_single",
102    ]
103  } else {
104    external_deps = [ "hilog:libhilog" ]
105  }
106
107  external_deps += [
108    "init:libbegetutil",
109    "ipc:ipc_single",
110    "samgr:samgr_proxy",
111  ]
112
113  public_configs = [ ":cameraTest_config" ]
114}
115