26b03e43创建于 2025年12月23日历史提交
# Copyright (c) 2024 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("//build/config/features.gni")
import("//build/test.gni")
import("//foundation/multimedia/player_framework/config.gni")
MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/"

##############################fuzztest##########################################
ohos_fuzztest("TranscoderStubConcurrentFuzzTest") {
  module_out_path = "$MODULE_OUTPUT_PATH/concurrent/transcoder"
  fuzz_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/transcoder_fuzztest/transcoderstubconcurrent_fuzzer"
  resource_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/resource/ohos_test.xml"

  include_dirs = [
    "$MEDIA_ROOT_DIR/interfaces/inner_api/native",
    "$MEDIA_ROOT_DIR/services/utils/include",
    "$MEDIA_ROOT_DIR/test/fuzztest/common/",
    "../../../../services/services/transcoder/ipc",
    "../../../../services/services/sa_media/ipc",
    "../../../../services/services/sa_media/server",
    "../../../../services/services/sa_media/server_manager",
  ]
  cflags = [
    "-std=c++17",
    "-fno-rtti",
    "-fno-exceptions",
    "-Wall",
    "-fno-common",
    "-fstack-protector-strong",
    "-Wshadow",
    "-FPIC",
    "-FS",
    "-O2",
    "-D_FORTIFY_SOURCE=2",
    "-fvisibility=hidden",
    "-Wformat=2",
    "-Wfloat-equal",
    "-Wdate-time",
    "-Werror",
    "-Wextra",
    "-Wimplicit-fallthrough",
    "-Wsign-compare",
    "-Wunused-parameter",
  ]
  if (player_framework_support_transcoder) {
    sources = [
      "../../../../test/fuzztest/common/stub_common.cpp",
      "transcoderstubconcurrent_fuzzer.cpp",
    ]
  }
  deps = [
    "../../../../services/services:media_service",
    "../../../../services/utils:media_service_utils",
  ]
  external_deps = [
    "c_utils:utils",
    "graphic_surface:surface",
    "hilog:libhilog",
    "ipc:ipc_single",
    "media_foundation:media_foundation",
    "safwk:system_ability_fwk",
    "samgr:samgr_proxy",
  ]

  part_name = "player_framework"
}