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") 20import("//drivers/peripheral/display/display_config.gni") 21 22if (defined(ohos_lite)) { 23 import("//device/board/hisilicon/hispark_taurus/device.gni") 24} else { 25 import("//vendor/$product_company/$product_name/product.gni") 26} 27 28module_output_path = "hats/camera" 29 30config("cameraTest_config") { 31 visibility = [ ":*" ] 32} 33 34ohos_moduletest_suite("HatsHdfCameraTest") { 35 testonly = true 36 defines = [] 37 defines += display_defines 38 module_out_path = module_output_path 39 sources = [ 40 "./src/camera_ability_test.cpp", 41 "./src/camera_capture_test.cpp", 42 "./src/camera_fps_test.cpp", 43 "./src/camera_preview_test.cpp", 44 "./src/camera_stabili_test.cpp", 45 "./src/camera_vendor_tag_test.cpp", 46 "./src/camera_video_test.cpp", 47 "./src/double_preview_test.cpp", 48 "./src/hdfcamera_facedetect.cpp", 49 "./src/open_camera_test.cpp", 50 "./src/stream_customer.cpp", 51 "./src/test_display.cpp", 52 "./src/usb_camera_test.cpp", 53 "./src/usb_camera_test_mult.cpp", 54 ] 55 56 include_dirs = [ 57 "//third_party/googletest/googletest/include/gtest", 58 "./include", 59 "$camera_path/../../interfaces/include", 60 "$camera_path/../../interfaces/hdi_ipc", 61 "$camera_path/../../interfaces/hdi_ipc/utils/include", 62 "$camera_path/../../test/common/callback/include", 63 "$camera_path/include", 64 "$camera_path/../../hdi_service/v1_0/include", 65 "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard", 66 "$camera_path/device_manager/include/", 67 "$camera_path/device_manager/include/v4l2", 68 "$camera_path/utils/event", 69 70 #producer 71 "$camera_path/pipeline_core/utils", 72 "$camera_path/pipeline_core/include", 73 "$camera_path/pipeline_core/host_stream/include", 74 "$camera_path/pipeline_core/nodes/include", 75 "$camera_path/pipeline_core/nodes/src/node_base", 76 "$camera_path/pipeline_core/nodes/src/dummy_node", 77 "$camera_path/pipeline_core/pipeline_impl/src/strategy/config", 78 "$camera_path/pipeline_core/pipeline_impl/include", 79 "$camera_path/pipeline_core/pipeline_impl/src", 80 "$camera_path/pipeline_core/pipeline_impl/src/builder", 81 "$camera_path/pipeline_core/pipeline_impl/src/dispatcher", 82 "$camera_path/pipeline_core/pipeline_impl/src/parser", 83 "$camera_path/pipeline_core/pipeline_impl/src/strategy", 84 "$camera_path/pipeline_core/ipp/include", 85 86 # metadata manager includes 87 "$camera_path/metadata_manager/include", 88 ] 89 90 deps = [ 91 "$board_camera_path/device_manager:camera_device_manager", 92 "$board_camera_path/pipeline_core:camera_pipeline_core", 93 "$camera_path/../../hdi_service/v1_0:camera_host_service_1.0_static", 94 "//third_party/googletest:gmock", 95 "//third_party/googletest:gmock_main", 96 "//third_party/googletest:gtest", 97 "//third_party/googletest:gtest_main", 98 ] 99 100 if (is_standard_system) { 101 external_deps = [ 102 "c_utils:utils", 103 "drivers_peripheral_camera:peripheral_camera_buffer_manager", 104 "drivers_peripheral_camera:peripheral_camera_device_manager", 105 "drivers_peripheral_camera:peripheral_camera_pipeline_core", 106 "graphic_surface:surface", 107 "hdf_core:libhdf_host", 108 "hdf_core:libhdf_ipc_adapter", 109 "hdf_core:libhdf_utils", 110 "hdf_core:libhdi", 111 "hilog:libhilog", 112 "ipc:ipc_single", 113 ] 114 } else { 115 external_deps = [ "hilog:libhilog" ] 116 } 117 118 external_deps += [ 119 "drivers_interface_camera:libcamera_proxy_1.0", 120 "drivers_interface_camera:metadata", 121 "drivers_interface_display:libdisplay_composer_proxy_1.0", 122 "init:libbegetutil", 123 "ipc:ipc_single", 124 "samgr:samgr_proxy", 125 ] 126 127 public_configs = [ ":cameraTest_config" ] 128 subsystem_name = "xts" 129 part_name = "hats" 130} 131 132group("hdi") { 133 if (!defined(ohos_lite)) { 134 testonly = true 135 } 136 deps = [ ":HatsHdfCameraTest" ] 137} 138