c89cea3e创建于 2024年11月13日历史提交
# Copyright (c) 2022 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.

#####################hydra-fuzz###################
import("//base/web/webview/web_aafwk.gni")
import("//build/config/features.gni")
import("//build/test.gni")
import("$webview_path/config.gni")

##############################fuzztest##########################################
ohos_fuzztest("AudioDeviceChangeFuzzTest") {
  module_out_path = webview_fuzz_test_path
  fuzz_config_file = "$webview_path/test/fuzztest/ohos_adapter/audio_adapter/audiodevicechange_fuzzer"
  configs = [ "../:audio_adapter_fuzztest_config" ]

  include_dirs = [
    "$webview_path/test/ohos_nweb",
    "$webview_path/ohos_adapter/audio_adapter/include",
    "$webview_path/test/fuzztest",
  ]
  cflags = [
    "-g",
    "-O0",
    "-Wno-unused-variable",
    "-fno-omit-frame-pointer",
  ]
  sources = [ "audiodevicechange_fuzzer.cpp" ]
  deps = [ "$webview_path/ohos_adapter:nweb_ohos_adapter" ]
  external_deps = [
    "ability_base:extractortool",
    "ability_base:want",
    "ability_base:zuri",
    "ability_runtime:ability_manager",
    "ability_runtime:abilitykit_native",
    "ability_runtime:app_context",
    "ability_runtime:app_manager",
    "access_token:libaccesstoken_sdk",
    "app_file_service:fileuri_native",
    "background_task_mgr:bgtaskmgr_innerkits",
    "bundle_framework:appexecfwk_base",
    "bundle_framework:appexecfwk_core",
    "c_utils:utils",
    "certificate_manager:cert_manager_sdk",
    "common_event_service:cesfwk_innerkits",
    "data_share:datashare_common",
    "data_share:datashare_consumer",
    "eventhandler:libeventhandler",
    "file_api:remote_uri_native",
    "graphic_2d:libcomposer",
    "graphic_2d:libnative_image",
    "graphic_2d:librender_service_client",
    "graphic_surface:surface",
    "hilog:libhilog",
    "hisysevent:libhisysevent",
    "hitrace:hitrace_meter",
    "huks:libhukssdk",
    "image_framework:image_native",
    "imf:inputmethod_client",
    "init:libbeget_proxy",
    "init:libbegetutil",
    "input:libmmi-client",
    "ipc:ipc_core",
    "napi:ace_napi",
    "netmanager_base:net_conn_manager_if",
    "pasteboard:pasteboard_client",
    "relational_store:native_rdb",
    "resource_schedule_service:ressched_client",
    "samgr:samgr_proxy",
    "time_service:time_client",
    "window_manager:libdm",
    "window_manager:libdm_ndk",
  ]

  if (webview_audio_enable) {
    external_deps += [
      "audio_framework:audio_client",
      "audio_framework:audio_renderer",
    ]
  }
}