# Copyright (c) 2022 - 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos_var.gni") import("//test/xts/tools/build/suite.gni") import("//build/ohos.gni") import("//build/test.gni") import("//drivers/peripheral/camera/camera.gni") import("//drivers/peripheral/display/display_config.gni") if (defined(ohos_lite)) { import("//device/board/hisilicon/hispark_taurus/device.gni") } else { import("//vendor/$product_company/$product_name/product.gni") } module_output_path = "hats/camera" config("cameraTest_config") { visibility = [ ":*" ] } ohos_moduletest_suite("HatsHdfCameraTest") { testonly = true defines = [] defines += display_defines module_out_path = module_output_path sources = [ "./src/camera_ability_test.cpp", "./src/camera_capture_test.cpp", "./src/camera_fps_test.cpp", "./src/camera_preview_test.cpp", "./src/camera_stabili_test.cpp", "./src/camera_vendor_tag_test.cpp", "./src/camera_video_test.cpp", "./src/double_preview_test.cpp", "./src/hdfcamera_facedetect.cpp", "./src/open_camera_test.cpp", "./src/stream_customer.cpp", "./src/test_display.cpp", "./src/usb_camera_test.cpp", "./src/usb_camera_test_mult.cpp", ] include_dirs = [ "//third_party/googletest/googletest/include/gtest", "./include", "$camera_path/../../interfaces/include", "$camera_path/../../interfaces/hdi_ipc", "$camera_path/../../interfaces/hdi_ipc/utils/include", "$camera_path/../../test/common/callback/include", "$camera_path/include", "$camera_path/../../hdi_service/v1_0/include", "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard", "$camera_path/device_manager/include/", "$camera_path/device_manager/include/v4l2", "$camera_path/utils/event", #producer "$camera_path/pipeline_core/utils", "$camera_path/pipeline_core/include", "$camera_path/pipeline_core/host_stream/include", "$camera_path/pipeline_core/nodes/include", "$camera_path/pipeline_core/nodes/src/node_base", "$camera_path/pipeline_core/nodes/src/dummy_node", "$camera_path/pipeline_core/pipeline_impl/src/strategy/config", "$camera_path/pipeline_core/pipeline_impl/include", "$camera_path/pipeline_core/pipeline_impl/src", "$camera_path/pipeline_core/pipeline_impl/src/builder", "$camera_path/pipeline_core/pipeline_impl/src/dispatcher", "$camera_path/pipeline_core/pipeline_impl/src/parser", "$camera_path/pipeline_core/pipeline_impl/src/strategy", "$camera_path/pipeline_core/ipp/include", # metadata manager includes "$camera_path/metadata_manager/include", ] deps = [ "$board_camera_path/device_manager:camera_device_manager", "$board_camera_path/pipeline_core:camera_pipeline_core", "$camera_path/../../hdi_service/v1_0:camera_host_service_1.0_static", "//third_party/googletest:gmock", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "drivers_peripheral_camera:peripheral_camera_buffer_manager", "drivers_peripheral_camera:peripheral_camera_device_manager", "drivers_peripheral_camera:peripheral_camera_pipeline_core", "graphic_surface:surface", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hilog:libhilog", "ipc:ipc_single", ] } else { external_deps = [ "hilog:libhilog" ] } external_deps += [ "drivers_interface_camera:libcamera_proxy_1.0", "drivers_interface_camera:metadata", "drivers_interface_display:libdisplay_composer_proxy_1.0", "init:libbegetutil", "ipc:ipc_single", "samgr:samgr_proxy", ] public_configs = [ ":cameraTest_config" ] subsystem_name = "xts" part_name = "hats" } group("hdi") { if (!defined(ohos_lite)) { testonly = true } deps = [ ":HatsHdfCameraTest" ] }