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("../../../vdi_base/usb_camera/camera_usb.gni") 15 16import("//build/test.gni") 17import("../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 18 19module_output_path = "drivers_peripheral_camera/camera" 20 21config("camera_ut_test_config") { 22 visibility = [ ":*" ] 23 24 cflags_cc = [] 25 26 ldflags = [ "--coverage" ] 27} 28ohos_unittest("camera_usb_test_ut") { 29 testonly = true 30 module_out_path = module_output_path 31 sources = [ 32 "$usb_hal_test_path/ut/v4l2/stream_customer.cpp", 33 "$usb_hal_test_path/ut/v4l2/usb_camera_test_mult.cpp", 34 "./test_camera_base.cpp", 35 "./usb_camera_test.cpp", 36 ] 37 38 include_dirs = [ 39 # common includes 40 "$third_path/googletest/googletest/include", 41 "$camera_path_usb/../../../display/interfaces/include", 42 "$camera_path_usb/../../../display/hdi_service/gralloc/include", 43 44 # camera common includes 45 "$camera_path_vdi/include", 46 "$camera_path_usb/../../interfaces/include", 47 "$camera_path_usb/../../interfaces/hdi_ipc", 48 "$camera_path_vdi/utils/event", 49 "$camera_path_usb/../../interfaces/hdi_ipc/utils/include", 50 "$camera_path_usb/../../interfaces/hdi_ipc/callback/host/include", 51 "$camera_path_usb/../../interfaces/hdi_ipc/callback/device/include", 52 "$camera_path_usb/../../interfaces/hdi_ipc/callback/operator/include", 53 "$camera_path_vdi_test/common/callback/include", 54 "$camera_path_vdi_test/ut/v4l2", 55 56 # device manager includes 57 "$camera_path_vdi/device_manager/include", 58 59 # buffer manager includes 60 "$camera_path_usb/buffer_manager/include", 61 "$camera_path_usb/buffer_manager/src/buffer_adapter/standard", 62 63 # pipeline core includes 64 "$camera_path_vdi/pipeline_core", 65 "$camera_path_vdi/pipeline_core/host_stream/include", 66 "$camera_path_vdi/pipeline_core/utils", 67 "$camera_path_vdi/pipeline_core/nodes/include", 68 "$camera_path_vdi/pipeline_core/nodes/src/node_base", 69 "$camera_path_vdi/pipeline_core/nodes/src/sink_node", 70 "$camera_path_vdi/pipeline_core/nodes/src/sensor_node", 71 "$camera_path_vdi/pipeline_core/nodes/src/merge_node", 72 "$camera_path_vdi/pipeline_core/nodes/src/dummy_node", 73 "$camera_path_vdi/pipeline_core/pipeline_impl/include", 74 "$camera_path_vdi/pipeline_core/pipeline_impl/src", 75 "$camera_path_vdi/pipeline_core/include", 76 "$camera_path_vdi/pipeline_core/pipeline_impl/src/builder", 77 "$camera_path_vdi/pipeline_core/pipeline_impl/src/dispatcher", 78 "$camera_path_vdi/pipeline_core/pipeline_impl/src/parser", 79 "$camera_path_vdi/pipeline_core/pipeline_impl/src/strategy", 80 "$camera_path_vdi/pipeline_core/pipeline_impl/src/strategy/config", 81 "$camera_path_vdi/pipeline_core/ipp/include", 82 83 # vdi impl includes 84 "camera_path_vdi/../v4l2", 85 "camera_path_vdi/../v4l2/include", 86 "camera_path_vdi/../v4l2/include/camera_host", 87 "camera_path_vdi/../v4l2/include/camera_device", 88 "camera_path_vdi/../v4l2/include/stream_operator", 89 "camera_path_vdi/../v4l2/include/offline_stream_operator", 90 "camera_path_vdi/../v4l2/src/stream_operator/stream_tunnel/standard", 91 92 # metadata manager includes 93 "$camera_path_vdi/metadata_manager/include", 94 ] 95 96 deps = [ 97 "$camera_path_usb/buffer_manager:usb_camera_buffer_manager", 98 "$camera_path_usb/device_manager:usb_camera_device_manager", 99 "$camera_path_usb/pipeline_core:usb_camera_pipeline_core", 100 "$camera_path_usb/vdi_impl:camera_daemon_static", 101 "$third_path/googletest:gmock_main", 102 "$third_path/googletest:gtest", 103 "$third_path/googletest:gtest_main", 104 ] 105 106 external_deps = [ 107 "c_utils:utils", 108 "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", 109 "drivers_interface_camera:libcamera_proxy_1.0", 110 "drivers_interface_camera:libcamera_stub_1.0", 111 "drivers_interface_camera:metadata", 112 "graphic_chipsetsdk:surface", 113 "hdf_core:libhdf_utils", 114 "hilog:libhilog", 115 "ipc:ipc_single", 116 "samgr:samgr_proxy", 117 ] 118 119 public_configs = [ ":camera_ut_test_config" ] 120} 121