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("HatsHdfCameraTest") { 34 testonly = true 35 module_out_path = module_output_path 36 sources = [ 37 "./src/camera_ability_test.cpp", 38 "./src/camera_capture_test.cpp", 39 "./src/camera_fps_test.cpp", 40 "./src/camera_preview_test.cpp", 41 "./src/camera_stabili_test.cpp", 42 "./src/camera_video_test.cpp", 43 "./src/double_preview_test.cpp", 44 "./src/hdfcamera_facedetect.cpp", 45 "./src/open_camera_test.cpp", 46 "./src/stream_customer.cpp", 47 "./src/test_display.cpp", 48 "./src/usb_camera_test.cpp", 49 ] 50 51 include_dirs = [ 52 "//third_party/googletest/googletest/include/gtest", 53 "./include", 54 "$camera_path/../../interfaces/include", 55 "$camera_path/../../interfaces/hdi_ipc", 56 "$camera_path/../../interfaces/hdi_ipc/utils/include", 57 "$camera_path/../../test/common/callback/include", 58 "$camera_path/include", 59 "$camera_path/../../hdi_service/v1_0/include", 60 "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard", 61 "$camera_path/device_manager/include/", 62 "$camera_path/device_manager/include/v4l2", 63 "$camera_path/utils/event", 64 65 #producer 66 "$camera_path/pipeline_core/utils", 67 "$camera_path/pipeline_core/include", 68 "$camera_path/pipeline_core/host_stream/include", 69 "$camera_path/pipeline_core/nodes/include", 70 "$camera_path/pipeline_core/nodes/src/node_base", 71 "$camera_path/pipeline_core/nodes/src/dummy_node", 72 "$camera_path/pipeline_core/pipeline_impl/src/strategy/config", 73 "$camera_path/pipeline_core/pipeline_impl/include", 74 "$camera_path/pipeline_core/pipeline_impl/src", 75 "$camera_path/pipeline_core/pipeline_impl/src/builder", 76 "$camera_path/pipeline_core/pipeline_impl/src/dispatcher", 77 "$camera_path/pipeline_core/pipeline_impl/src/parser", 78 "$camera_path/pipeline_core/pipeline_impl/src/strategy", 79 "$camera_path/pipeline_core/ipp/include", 80 ] 81 82 deps = [ 83 "$board_camera_path/device_manager:camera_device_manager", 84 "$board_camera_path/pipeline_core:camera_pipeline_core", 85 "$camera_path/../../hdi_service/v1_0:camera_host_service_1.0_static", 86 "$camera_path/buffer_manager:camera_buffer_manager", 87 "//third_party/googletest:gmock", 88 "//third_party/googletest:gmock_main", 89 "//third_party/googletest:gtest", 90 "//third_party/googletest:gtest_main", 91 ] 92 93 if (is_standard_system) { 94 external_deps = [ 95 "c_utils:utils", 96 "graphic_chipsetsdk:surface", 97 "hdf_core:libhdf_host", 98 "hdf_core:libhdf_ipc_adapter", 99 "hdf_core:libhdf_utils", 100 "hdf_core:libhdi", 101 "hilog:libhilog", 102 "ipc:ipc_single", 103 ] 104 } else { 105 external_deps = [ "hilog:libhilog" ] 106 } 107 108 external_deps += [ 109 "drivers_interface_camera:libcamera_proxy_1.0", 110 "drivers_interface_camera:metadata", 111 "init:libbegetutil", 112 "ipc:ipc_single", 113 "samgr:samgr_proxy", 114 ] 115 116 public_configs = [ ":cameraTest_config" ] 117 subsystem_name = "xts" 118 part_name = "hats" 119} 120 121group("hdi") { 122 if (!defined(ohos_lite)) { 123 testonly = true 124 } 125 deps = [ ":HatsHdfCameraTest" ] 126} 127