1# Copyright (c) 2021-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("../../../camera.gni") 15camera_test_path = "//drivers/peripheral/camera/test/hdi/" 16 17import("//build/ohos.gni") 18import("//build/test.gni") 19import("../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 20 21module_output_path = "drivers_peripheral_camera/drivers_peripheral_camera" 22 23config("camhdi_host_config") { 24 visibility = [ ":*" ] 25 cflags_cc = [ 26 "-DGST_DISABLE_DEPRECATED", 27 "-DHAVE_CONFIG_H", 28 "-DCOLORSPACE=\"videoconvert\"", 29 ] 30} 31 32ohos_fuzztest("defferred_delivery_image_fuzztest") { 33 testonly = true 34 module_out_path = module_output_path 35 fuzz_config_file = "$camera_path/../../test/fuzztest/defferred_delivery_image" 36 sources = [ 37 "../common/src/common.cpp", 38 "./defferred_delivery_image_fuzzer.cpp", 39 ] 40 41 include_dirs = [ 42 # common includes 43 "../common/include", 44 "$camera_test_path/v1_1/include", 45 "$camera_path/../../../display/interfaces/include", 46 "$camera_path/../../../display/hdi_service/gralloc/include", 47 "$camera_path/../../interfaces/include", 48 "$camera_path/include", 49 ] 50 51 cflags = [ 52 "-g", 53 "-O0", 54 "-Wno-unused-variable", 55 "-fno-omit-frame-pointer", 56 ] 57 58 if (is_standard_system) { 59 external_deps = [ 60 "c_utils:utils", 61 "hdf_core:libhdf_host", 62 "hdf_core:libhdf_ipc_adapter", 63 "hdf_core:libhdf_utils", 64 "hdf_core:libhdi", 65 "hilog:libhilog", 66 "ipc:ipc_single", 67 ] 68 } else { 69 external_deps = [ "hilog:libhilog" ] 70 } 71 72 external_deps += [ 73 "drivers_interface_camera:libbuffer_handle_sequenceable_1.0", 74 "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", 75 "drivers_interface_camera:libcamera_proxy_1.2", 76 "drivers_interface_camera:libmap_data_sequenceable_1.0", 77 "drivers_interface_camera:metadata", 78 "graphic_surface:surface", 79 "samgr:samgr_proxy", 80 ] 81 public_configs = [ ":camhdi_host_config" ] 82} 83 84group("fuzztest") { 85 testonly = true 86 deps = [] 87 deps += [ 88 # dep file 89 ":defferred_delivery_image_fuzztest", 90 ] 91} 92