1# Copyright (c) 2022-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_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 "//third_party/googletest:gmock_main", 71 "//third_party/googletest:gtest", 72 "//third_party/googletest:gtest_main", 73 ] 74 75 if (is_standard_system) { 76 external_deps = [ 77 "c_utils:utils", 78 "drivers_peripheral_camera:peripheral_camera_buffer_manager", 79 "drivers_peripheral_camera:peripheral_camera_device_manager", 80 "drivers_peripheral_camera:peripheral_camera_pipeline_core", 81 "graphic_surface:surface", 82 "hdf_core:libhdf_host", 83 "hdf_core:libhdf_ipc_adapter", 84 "hdf_core:libhdf_utils", 85 "hdf_core:libhdi", 86 "hilog:libhilog", 87 "ipc:ipc_single", 88 ] 89 } else { 90 external_deps = [ "hilog:libhilog" ] 91 } 92 93 external_deps += [ 94 "drivers_interface_camera:metadata", 95 "drivers_interface_display:libdisplay_composer_proxy_1.0", 96 "init:libbegetutil", 97 "ipc:ipc_single", 98 "samgr:samgr_proxy", 99 ] 100 101 public_configs = [ ":cameraTest_config" ] 102 subsystem_name = "hdf" 103 part_name = "drivers_interface_camera" 104} 105