• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/test.gni")
16
17# NOSORT
18import("../../../camera.gni")
19
20# NOSORT
21import("$hdf_core_path/adapter/uhdf2/uhdf.gni")
22module_output_path = "drivers_peripheral_camera/camera"
23
24config("hdf_camera_benchmark_test_config") {
25  visibility = [ ":*" ]
26  cflags_cc = [
27    "-DGST_DISABLE_DEPRECATED",
28    "-DHAVE_CONFIG_H",
29    "-DCOLORSPACE=\"videoconvert\"",
30  ]
31  cflags_cc += [ "-std=c++17" ]
32}
33
34ohos_benchmarktest("hdf_camera_benchmark_test_v1_3") {
35  module_out_path = module_output_path
36
37  sources = [
38    "$camera_common_path/v1_0/src/hdi_common.cpp",
39    "$camera_common_path/v1_1/src/hdi_common_v1_1.cpp",
40    "$camera_common_path/v1_2/src/hdi_common_v1_2.cpp",
41    "$camera_common_path/v1_3/src/hdi_common_v1_3.cpp",
42    "./src/camera_benchmark_securestream_test.cpp",
43  ]
44
45  include_dirs = [
46    "./include/",
47    "$camera_common_path/v1_0/include",
48    "$camera_common_path/v1_1/include",
49    "$camera_common_path/v1_2/include",
50    "$camera_common_path/v1_3/include",
51    "//third_party/googletest/googletest/include",
52    "$camera_path/../../../display/interfaces/include",
53    "$camera_path/../../../display/hdi_service/gralloc/include",
54    "$camera_path/../../interfaces/include",
55    "$camera_path/include",
56  ]
57
58  deps = [
59    "//third_party/benchmark",
60    "//third_party/googletest:gmock_main",
61    "//third_party/googletest:gtest",
62    "//third_party/googletest:gtest_main",
63  ]
64
65  if (is_standard_system) {
66    external_deps = [
67      "c_utils:utils",
68      "drivers_interface_camera:libcamera_proxy_1.3",
69      "hdf_core:libhdf_utils",
70      "hilog:libhilog",
71      "ipc:ipc_single",
72    ]
73  } else {
74    external_deps = [ "hilog:libhilog" ]
75  }
76  external_deps += [
77    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
78    "drivers_interface_camera:metadata",
79    "graphic_surface:surface",
80    "samgr:samgr_proxy",
81  ]
82  public_configs = [ ":hdf_camera_benchmark_test_config" ]
83}
84