1# Copyright (c) 2024 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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/multimedia/player_framework/config.gni") 18MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/" 19 20##############################fuzztest########################################## 21ohos_fuzztest("TranscoderServiceStubFuzzTest") { 22 module_out_path = "$MODULE_OUTPUT_PATH/transcoder" 23 fuzz_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/transcoder_fuzztest/transcoderservicestub_fuzzer" 24 resource_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/resource/ohos_test.xml" 25 26 include_dirs = [ 27 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 28 "$MEDIA_ROOT_DIR/services/utils/include", 29 "$MEDIA_ROOT_DIR/test/fuzztest/common/", 30 "$MEDIA_PLAYER_GRAPHIC/interfaces/innerkits/surface", 31 "../../../../services/services/transcoder/ipc", 32 "../../../../services/services/sa_media/ipc", 33 "../../../../services/services/sa_media/server", 34 "../../../../../media_foundation/interface/inner_api", 35 "../../../../../media_foundation/interface/inner_api/common", 36 ] 37 cflags = [ 38 "-std=c++17", 39 "-fno-rtti", 40 "-fno-exceptions", 41 "-Wall", 42 "-fno-common", 43 "-fstack-protector-strong", 44 "-Wshadow", 45 "-FPIC", 46 "-FS", 47 "-O2", 48 "-D_FORTIFY_SOURCE=2", 49 "-fvisibility=hidden", 50 "-Wformat=2", 51 "-Wfloat-equal", 52 "-Wdate-time", 53 "-Werror", 54 "-Wextra", 55 "-Wimplicit-fallthrough", 56 "-Wsign-compare", 57 "-Wunused-parameter", 58 ] 59 if (player_framework_support_transcoder) { 60 sources = [ 61 "../../../../test/fuzztest/common/stub_common.cpp", 62 "transcoderservicestub_fuzzer.cpp", 63 ] 64 } 65 deps = [ 66 "../../../../services/services:media_service", 67 "../../../../services/utils:media_service_utils", 68 ] 69 external_deps = [ 70 "c_utils:utils", 71 "graphic_surface:surface", 72 "hilog:libhilog", 73 "ipc:ipc_single", 74 "safwk:system_ability_fwk", 75 "samgr:samgr_proxy", 76 ] 77 78 part_name = "player_framework" 79} 80