1# Copyright (c) 2021 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.gni") 15import("//build/test.gni") 16import("//drivers/adapter/uhdf2/uhdf.gni") 17import("../../camera.gni") 18 19module_output_path = "hdf/camera_test" 20 21config("cameraTest_config") { 22 visibility = [ ":*" ] 23} 24 25ohos_unittest("camera_case_unittest") { 26 testonly = true 27 module_out_path = module_output_path 28 sources = [ 29 "./src/adapter_test.cpp", 30 "./src/buffer_manager_test.cpp", 31 "./src/camera_3a_test.cpp", 32 "./src/capture_test.cpp", 33 "./src/common.cpp", 34 "./src/device_manager_test.cpp", 35 "./src/dfx_test.cpp", 36 "./src/flashlight_test.cpp", 37 "./src/hdi_callback_test.cpp", 38 "./src/hdi_device_test.cpp", 39 "./src/hdi_host_test.cpp", 40 "./src/hdi_stream_test.cpp", 41 "./src/offline_stream_test.cpp", 42 "./src/open_camera_test.cpp", 43 "./src/performance_func_test.cpp", 44 "./src/performance_hdi_test.cpp", 45 "./src/pipeline_test.cpp", 46 "./src/preview_test.cpp", 47 "./src/resolution_test.cpp", 48 "./src/stability_test.cpp", 49 "./src/video_test.cpp", 50 ] 51 52 include_dirs = [ 53 "//third_party/googletest/googletest/include/gtest", 54 "./include", 55 "$camera_path/../interfaces/include", 56 "$camera_path/../interfaces/include/client", 57 "$camera_path/../interfaces/include/callback/host", 58 "$camera_path/../interfaces/include/callback/device", 59 "$camera_path/../interfaces/include/callback/operator", 60 "$camera_path/include", 61 "$camera_path/hdi_impl", 62 "$camera_path/hdi_impl/include", 63 "$camera_path/hdi_impl/include/camera_host", 64 "$camera_path/hdi_impl/include/camera_device", 65 "$camera_path/hdi_impl/include/stream_operator", 66 "$camera_path/hdi_impl/include/offline_stream_operator", 67 "$camera_path/device_manager/include/", 68 "$camera_path/device_manager/include/mpi", 69 "//base/hiviewdfx/interfaces/innerkits/libhilog/include", 70 "//base/startup/syspara_lite/adapter/native/syspara/include", 71 "$camera_path/utils/event", 72 "//foundation/multimedia/camera_standard/frameworks/innerkitsimpl/metadata/include", 73 74 #producer 75 "//utils/native/base/include", 76 "//foundation/communication/ipc/ipc/native/src/core/include", 77 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 78 "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", 79 "$camera_path/pipeline_core/utils", 80 "$camera_path/pipeline_core/include", 81 "$camera_path/pipeline_core/host_stream/include", 82 "$camera_path/pipeline_core/nodes/include", 83 "$camera_path/pipeline_core/nodes/src/node_base", 84 "$camera_path/pipeline_core/nodes/src/dummy_node", 85 "$camera_path/pipeline_core/pipeline_impl/src/strategy/config", 86 "$camera_path/pipeline_core/pipeline_impl/include", 87 "$camera_path/pipeline_core/pipeline_impl/src", 88 "$camera_path/pipeline_core/pipeline_impl/src/builder", 89 "$camera_path/pipeline_core/pipeline_impl/src/dispatcher", 90 "$camera_path/pipeline_core/pipeline_impl/src/parser", 91 "$camera_path/pipeline_core/pipeline_impl/src/strategy", 92 "$camera_path/pipeline_core/ipp/include", 93 94 # HCS文件解析需要 95 "//drivers/framework/include/config", 96 "//drivers/framework/include/osal", 97 "//drivers/framework/include/utils", 98 "//drivers/adapter/uhdf2/include/config", 99 "//drivers/adapter/uhdf2/osal/include", 100 "//drivers/framework/ability/config/hcs_parser/include", 101 "//system/core/include/cutils", 102 "$hdf_framework_path/ability/sbuf/include", 103 "$hdf_uhdf_path/manager/include", 104 "$hdf_uhdf_path/include/hdi", 105 ] 106 107 deps = [ 108 "$camera_path/../interfaces/include/client:libcamera_client", 109 "$camera_path/buffer_manager:camera_buffer_manager", 110 "$camera_path/device_manager:camera_device_manager", 111 "$camera_path/hdi_impl:camera_hdi_impl", 112 "$camera_path/pipeline_core:camera_pipeline_core", 113 "$hdf_uhdf_path/config:libhdf_hcs", 114 "$hdf_uhdf_path/hdi:libhdi", 115 "$hdf_uhdf_path/osal:libhdf_utils", 116 "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", 117 "//foundation/graphic/standard:libsurface", 118 "//foundation/multimedia/camera_standard/frameworks/innerkitsimpl/metadata:metadata", 119 "//third_party/googletest:gmock", 120 "//third_party/googletest:gmock_main", 121 "//third_party/googletest:gtest", 122 "//third_party/googletest:gtest_main", 123 "//utils/native/base:utils", 124 ] 125 126 if (is_standard_system) { 127 external_deps = [ 128 "hiviewdfx_hilog_native:libhilog", 129 "ipc:ipc_core", 130 ] 131 } else { 132 external_deps = [ "hilog:libhilog" ] 133 } 134 135 external_deps += [ 136 "ipc:ipc_core", 137 "samgr_L2:samgr_proxy", 138 "startup_l2:syspara", 139 ] 140 141 public_configs = [ ":cameraTest_config" ] 142} 143