11d3ffd26Sopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
21d3ffd26Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
31d3ffd26Sopenharmony_ci# you may not use this file except in compliance with the License.
41d3ffd26Sopenharmony_ci# You may obtain a copy of the License at
51d3ffd26Sopenharmony_ci#
61d3ffd26Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
71d3ffd26Sopenharmony_ci#
81d3ffd26Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
91d3ffd26Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
101d3ffd26Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111d3ffd26Sopenharmony_ci# See the License for the specific language governing permissions and
121d3ffd26Sopenharmony_ci# limitations under the License.
131d3ffd26Sopenharmony_ci
141d3ffd26Sopenharmony_ciimport("//build/config/features.gni")
151d3ffd26Sopenharmony_ciimport("//build/test.gni")
161d3ffd26Sopenharmony_ciimport("./../../../multimedia_camera_framework.gni")
171d3ffd26Sopenharmony_ci
181d3ffd26Sopenharmony_ciohos_fuzztest("CaptureSessionFuzzTest") {
191d3ffd26Sopenharmony_ci  module_out_path = "camera_framework/camera_framework"
201d3ffd26Sopenharmony_ci  fuzz_config_file = "../capturesession_fuzzer"
211d3ffd26Sopenharmony_ci
221d3ffd26Sopenharmony_ci  include_dirs = [
231d3ffd26Sopenharmony_ci    "${driver_disply_path}/interfaces/include",
241d3ffd26Sopenharmony_ci    "${graphic_surface_path}/surface/include",
251d3ffd26Sopenharmony_ci    "${multimedia_camera_framework_path}/services/camera_service/include",
261d3ffd26Sopenharmony_ci    "${multimedia_camera_framework_path}/services/camera_service/binder/base/include",
271d3ffd26Sopenharmony_ci    "${multimedia_camera_framework_path}/services/camera_service/binder/client/include",
281d3ffd26Sopenharmony_ci    "${multimedia_camera_framework_path}/services/camera_service/binder/server/include",
291d3ffd26Sopenharmony_ci    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include",
301d3ffd26Sopenharmony_ci    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include/output/",
311d3ffd26Sopenharmony_ci    "${window_manager_path}/interfaces/innerkits/dm",
321d3ffd26Sopenharmony_ci    "${base_security_path}/interfaces/innerkits/accesstoken/include",
331d3ffd26Sopenharmony_ci    "${driver_peripheral_path}/interfaces/include",
341d3ffd26Sopenharmony_ci    "${driver_peripheral_path}/interfaces/hdi_ipc",
351d3ffd26Sopenharmony_ci    "${driver_peripheral_path}/interfaces/hdi_ipc/utils/include",
361d3ffd26Sopenharmony_ci    "${driver_peripheral_path}/interfaces/hdi_ipc/callback/device/include",
371d3ffd26Sopenharmony_ci    "${driver_peripheral_path}/interfaces/hdi_ipc/callback/operator/include",
381d3ffd26Sopenharmony_ci    "${driver_peripheral_path}/interfaces/hdi_ipc/callback/host/include",
391d3ffd26Sopenharmony_ci    "${base_security_path}/interfaces/innerkits/token_setproc/include",
401d3ffd26Sopenharmony_ci    "${system_safwk_path}/native/include",
411d3ffd26Sopenharmony_ci    "${driver_disply_path}/interfaces/include",
421d3ffd26Sopenharmony_ci  ]
431d3ffd26Sopenharmony_ci
441d3ffd26Sopenharmony_ci  cflags = [
451d3ffd26Sopenharmony_ci    "-g",
461d3ffd26Sopenharmony_ci    "-O0",
471d3ffd26Sopenharmony_ci    "-Wno-unused-variable",
481d3ffd26Sopenharmony_ci    "-fno-omit-frame-pointer",
491d3ffd26Sopenharmony_ci  ]
501d3ffd26Sopenharmony_ci
511d3ffd26Sopenharmony_ci  sources = [ "capture_session_fuzzer.cpp" ]
521d3ffd26Sopenharmony_ci
531d3ffd26Sopenharmony_ci  deps = [ "../../../frameworks/native/camera:camera_framework" ]
541d3ffd26Sopenharmony_ci  external_deps = [
551d3ffd26Sopenharmony_ci    "ability_base:want",
561d3ffd26Sopenharmony_ci    "access_token:libaccesstoken_sdk",
571d3ffd26Sopenharmony_ci    "access_token:libnativetoken",
581d3ffd26Sopenharmony_ci    "access_token:libprivacy_sdk",
591d3ffd26Sopenharmony_ci    "access_token:libtoken_setproc",
601d3ffd26Sopenharmony_ci    "bundle_framework:appexecfwk_base",
611d3ffd26Sopenharmony_ci    "bundle_framework:appexecfwk_core",
621d3ffd26Sopenharmony_ci    "c_utils:utils",
631d3ffd26Sopenharmony_ci    "drivers_interface_camera:libbuffer_handle_sequenceable_1.0",
641d3ffd26Sopenharmony_ci    "drivers_interface_camera:libcamera_proxy_1.0",
651d3ffd26Sopenharmony_ci    "drivers_interface_camera:libcamera_proxy_1.1",
661d3ffd26Sopenharmony_ci    "drivers_interface_camera:libmap_data_sequenceable_1.0",
671d3ffd26Sopenharmony_ci    "drivers_interface_camera:metadata",
681d3ffd26Sopenharmony_ci    "drivers_peripheral_display:hdi_gralloc_client",
691d3ffd26Sopenharmony_ci    "graphic_2d:librender_service_client",
701d3ffd26Sopenharmony_ci    "graphic_surface:surface",
711d3ffd26Sopenharmony_ci    "hdf_core:libhdi",
721d3ffd26Sopenharmony_ci    "hicollie:libhicollie",
731d3ffd26Sopenharmony_ci    "hilog:libhilog",
741d3ffd26Sopenharmony_ci    "hisysevent:libhisysevent",
751d3ffd26Sopenharmony_ci    "hitrace:hitrace_meter",
761d3ffd26Sopenharmony_ci    "ipc:ipc_core",
771d3ffd26Sopenharmony_ci    "ipc:ipc_single",
781d3ffd26Sopenharmony_ci    "safwk:system_ability_fwk",
791d3ffd26Sopenharmony_ci    "samgr:samgr_proxy",
801d3ffd26Sopenharmony_ci    "window_manager:libdm",
811d3ffd26Sopenharmony_ci  ]
821d3ffd26Sopenharmony_ci}
831d3ffd26Sopenharmony_ci
841d3ffd26Sopenharmony_cigroup("fuzztest") {
851d3ffd26Sopenharmony_ci  testonly = true
861d3ffd26Sopenharmony_ci  deps = [ ":CaptureSessionFuzzTest" ]
871d3ffd26Sopenharmony_ci}
88