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 "../../../../services/services/sa_media/server_manager", 35 "../../../../../media_foundation/interface/inner_api", 36 "../../../../../media_foundation/interface/inner_api/common", 37 ] 38 cflags = [ 39 "-std=c++17", 40 "-fno-rtti", 41 "-fno-exceptions", 42 "-Wall", 43 "-fno-common", 44 "-fstack-protector-strong", 45 "-Wshadow", 46 "-FPIC", 47 "-FS", 48 "-O2", 49 "-D_FORTIFY_SOURCE=2", 50 "-fvisibility=hidden", 51 "-Wformat=2", 52 "-Wfloat-equal", 53 "-Wdate-time", 54 "-Werror", 55 "-Wextra", 56 "-Wimplicit-fallthrough", 57 "-Wsign-compare", 58 "-Wunused-parameter", 59 ] 60 if (player_framework_support_transcoder) { 61 sources = [ 62 "../../../../test/fuzztest/common/stub_common.cpp", 63 "transcoderservicestub_fuzzer.cpp", 64 ] 65 } 66 deps = [ 67 "../../../../services/services:media_service", 68 "../../../../services/utils:media_service_utils", 69 ] 70 external_deps = [ 71 "c_utils:utils", 72 "graphic_surface:surface", 73 "hilog:libhilog", 74 "ipc:ipc_single", 75 "safwk:system_ability_fwk", 76 "samgr:samgr_proxy", 77 ] 78 79 part_name = "player_framework" 80} 81