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