1# Copyright (c) 2022 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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16import("//drivers/peripheral/audio/audio.gni") 17import("//test/xts/tools/build/suite.gni") 18 19import("//build/ohos.gni") 20import("//build/test.gni") 21import("//drivers/peripheral/camera/hal/camera.gni") 22 23module_output_path = "hats/camera" 24 25config("cameraTest_config") { 26 visibility = [ ":*" ] 27} 28 29ohos_moduletest_suite("HatsHdfCameraTest") { 30 testonly = true 31 module_out_path = module_output_path 32 sources = [ 33 "./src/camera_ability_test.cpp", 34 "./src/camera_capture_test.cpp", 35 "./src/camera_fps_test.cpp", 36 "./src/camera_preview_test.cpp", 37 "./src/camera_stabili_test.cpp", 38 "./src/camera_video_test.cpp", 39 "./src/double_preview_test.cpp", 40 "./src/hdfcamera_facedetect.cpp", 41 "./src/open_camera_test.cpp", 42 "./src/stream_customer.cpp", 43 "./src/test_display.cpp", 44 ] 45 46 include_dirs = [ 47 "//third_party/googletest/googletest/include/gtest", 48 "./include", 49 "$camera_path/../interfaces/include", 50 "$camera_path/../interfaces/hdi_ipc", 51 "$camera_path/../interfaces/hdi_ipc/utils/include", 52 "$camera_path/../interfaces/hdi_ipc/callback/host/include", 53 "$camera_path/../interfaces/hdi_ipc/callback/device/include", 54 "$camera_path/../interfaces/hdi_ipc/callback/operator/include", 55 "$camera_path/include", 56 "$camera_path/hdi_impl", 57 "$camera_path/hdi_impl/include", 58 "$camera_path/hdi_impl/include/camera_host", 59 "$camera_path/hdi_impl/include/camera_device", 60 "$camera_path/hdi_impl/include/stream_operator", 61 "$camera_path/hdi_impl/include/offline_stream_operator", 62 "$camera_path/hdi_impl/src/stream_operator/stream_tunnel/standard", 63 "$camera_path/device_manager/include/", 64 "$camera_path/device_manager/include/v4l2", 65 "$camera_path/utils/event", 66 "//drivers/peripheral/camera/interfaces/metadata/include", 67 "//drivers/peripheral/display/interfaces/include", 68 "//drivers/peripheral/display/hdi_service/gralloc/include", 69 "//drivers/peripheral/base", 70 "//base/hiviewdfx/interfaces/innerkits/libhilog/include", 71 72 #producer 73 "//commonlibrary/c_utils/base/include", 74 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", 75 "$camera_path/pipeline_core/utils", 76 "$camera_path/pipeline_core/include", 77 "$camera_path/pipeline_core/host_stream/include", 78 "$camera_path/pipeline_core/nodes/include", 79 "$camera_path/pipeline_core/nodes/src/node_base", 80 "$camera_path/pipeline_core/nodes/src/dummy_node", 81 "$camera_path/pipeline_core/pipeline_impl/src/strategy/config", 82 "$camera_path/pipeline_core/pipeline_impl/include", 83 "$camera_path/pipeline_core/pipeline_impl/src", 84 "$camera_path/pipeline_core/pipeline_impl/src/builder", 85 "$camera_path/pipeline_core/pipeline_impl/src/dispatcher", 86 "$camera_path/pipeline_core/pipeline_impl/src/parser", 87 "$camera_path/pipeline_core/pipeline_impl/src/strategy", 88 "$camera_path/pipeline_core/ipp/include", 89 90 # hcs parser 91 "//system/core/include/cutils", 92 ] 93 94 deps = [ 95 "$camera_path/buffer_manager:camera_buffer_manager", 96 "$camera_path/device_manager:camera_device_manager", 97 "$camera_path/hdi_impl:camera_host_service_1.0", 98 "$camera_path/pipeline_core:camera_pipeline_core", 99 "//drivers/interface/camera/v1_0:libcamera_proxy_1.0", 100 "//drivers/peripheral/camera/interfaces/metadata:metadata", 101 "//third_party/googletest:gmock", 102 "//third_party/googletest:gmock_main", 103 "//third_party/googletest:gtest", 104 "//third_party/googletest:gtest_main", 105 ] 106 107 if (is_standard_system) { 108 external_deps = [ 109 "c_utils:utils", 110 "graphic_chipsetsdk:surface", 111 "hdf_core:libhdf_host", 112 "hdf_core:libhdf_ipc_adapter", 113 "hdf_core:libhdf_utils", 114 "hdf_core:libhdi", 115 "hiviewdfx_hilog_native:libhilog", 116 "ipc:ipc_single", 117 ] 118 } else { 119 external_deps = [ "hilog:libhilog" ] 120 } 121 122 external_deps += [ 123 "init:libbegetutil", 124 "ipc:ipc_single", 125 "samgr:samgr_proxy", 126 ] 127 128 public_configs = [ ":cameraTest_config" ] 129 subsystem_name = "hdf" 130 part_name = "drivers_peripheral_camera" 131} 132 133group("hdi") { 134 if (!defined(ohos_lite)) { 135 testonly = true 136 } 137 deps = [ ":HatsHdfCameraTest" ] 138} 139