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"
23camera_include_path = "//drivers/peripheral/camera/test/hdi/"
24
25config("hdf_camera_benchmark_test_config") {
26  visibility = [ ":*" ]
27  cflags_cc = [
28    "-DGST_DISABLE_DEPRECATED",
29    "-DHAVE_CONFIG_H",
30    "-DCOLORSPACE=\"videoconvert\"",
31  ]
32  cflags_cc += [ "-std=c++17" ]
33}
34
35ohos_benchmarktest("hdf_camera_benchmark_test_v1_3") {
36  module_out_path = module_output_path
37
38  sources = [
39    "./src/benchmark_common.cpp",
40    "./src/camera_benchmark_securestream_test.cpp",
41    "./src/camera_benchmark_test.cpp",
42  ]
43
44  include_dirs = [
45    "./include/",
46    "$camera_include_path/v1_3/include/",
47    "//third_party/googletest/googletest/include",
48    "$camera_path/../../../display/interfaces/include",
49    "$camera_path/../../../display/hdi_service/gralloc/include",
50    "$camera_path/../../interfaces/include",
51    "$camera_path/include",
52  ]
53
54  deps = [
55    "//third_party/benchmark",
56    "//third_party/googletest:gmock_main",
57    "//third_party/googletest:gtest",
58    "//third_party/googletest:gtest_main",
59  ]
60
61  if (is_standard_system) {
62    external_deps = [
63      "c_utils:utils",
64      "drivers_interface_camera:libcamera_proxy_1.3",
65      "hdf_core:libhdf_utils",
66      "hilog:libhilog",
67      "ipc:ipc_single",
68    ]
69  } else {
70    external_deps = [ "hilog:libhilog" ]
71  }
72  external_deps += [
73    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
74    "drivers_interface_camera:metadata",
75    "graphic_surface:surface",
76    "samgr:samgr_proxy",
77  ]
78  public_configs = [ ":hdf_camera_benchmark_test_config" ]
79}
80