1# Copyright (c) 2022-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_var.gni") 15import("//test/xts/tools/build/suite.gni") 16 17import("//build/ohos.gni") 18import("//build/test.gni") 19import("//drivers/peripheral/camera/camera.gni") 20 21if (defined(ohos_lite)) { 22 import("//device/board/hisilicon/hispark_taurus/device.gni") 23} else { 24 import("//vendor/$product_company/$product_name/product.gni") 25} 26 27module_output_path = "hats/camera" 28 29config("cameraTest_config") { 30 visibility = [ ":*" ] 31} 32 33ohos_moduletest_suite("HatsHdfCameraBufferTest") { 34 testonly = true 35 module_out_path = module_output_path 36 sources = [ "./buffer_manager_utest.cpp" ] 37 38 include_dirs = [ 39 # common includes 40 "//third_party/googletest/googletest/include", 41 42 # camera common includes 43 "$camera_path/include", 44 "$camera_path/../../interfaces/include", 45 "$camera_path/../../interfaces/hdi_ipc", 46 "$camera_path/utils/event", 47 "$camera_path/../../interfaces/hdi_ipc/utils/include", 48 "$camera_path/../../interfaces/hdi_ipc/callback/host/include", 49 "$camera_path/../../interfaces/hdi_ipc/callback/device/include", 50 "$camera_path/../../interfaces/hdi_ipc/callback/operator/include", 51 52 # device manager includes 53 "$camera_path/device_manager/include", 54 55 # buffer manager includes 56 "$camera_path/buffer_manager/include", 57 "$camera_path/buffer_manager/src/buffer_adapter/standard", 58 59 # hdi impl includes 60 "$camera_path/../../hdi_service/v1_0/include", 61 62 # vdi impl includes 63 "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard", 64 ] 65 66 deps = [ 67 "$board_camera_path/device_manager:camera_device_manager", 68 "$board_camera_path/pipeline_core:camera_pipeline_core", 69 "$camera_path/../../hdi_service/v1_0:camera_host_service_1.0_static", 70 "$camera_path/buffer_manager:camera_buffer_manager", 71 "//third_party/googletest:gmock_main", 72 "//third_party/googletest:gtest", 73 "//third_party/googletest:gtest_main", 74 ] 75 76 if (is_standard_system) { 77 external_deps = [ 78 "c_utils:utils", 79 "graphic_chipsetsdk:surface", 80 "hdf_core:libhdf_host", 81 "hdf_core:libhdf_ipc_adapter", 82 "hdf_core:libhdf_utils", 83 "hdf_core:libhdi", 84 "hilog:libhilog", 85 "ipc:ipc_single", 86 ] 87 } else { 88 external_deps = [ "hilog:libhilog" ] 89 } 90 91 external_deps += [ 92 "drivers_interface_camera:metadata", 93 "init:libbegetutil", 94 "ipc:ipc_single", 95 "samgr:samgr_proxy", 96 ] 97 98 public_configs = [ ":cameraTest_config" ] 99 subsystem_name = "xts" 100 part_name = "hats" 101} 102