1# Copyright (c) 2023 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") 18module_output_path = "$MODULE_OUTPUT_PATH/media_player" 19 20##############################fuzztest########################################## 21ohos_fuzztest("PlayerStubFuzzTest") { 22 module_out_path = module_output_path 23 fuzz_config_file = 24 "../../../../test/fuzztest/player_fuzztest/playerstub_fuzzer" 25 26 include_dirs = [ 27 "../../../../services/services/player/ipc", 28 "../../../../services/services/sa_media/ipc", 29 "../../../../services/services/sa_media/server", 30 "../../../../test/fuzztest/player_fuzztest", 31 "../../../../interfaces/inner_api/native", 32 "../../../../test/fuzztest/common", 33 "$MEDIA_PLAYER_GRAPHIC/../graphic_surface/surface/include", 34 ] 35 cflags = [ 36 "-std=c++17", 37 "-fno-rtti", 38 "-fno-exceptions", 39 "-Wall", 40 "-fno-common", 41 "-fstack-protector-strong", 42 "-Wshadow", 43 "-FPIC", 44 "-FS", 45 "-O2", 46 "-D_FORTIFY_SOURCE=2", 47 "-fvisibility=hidden", 48 "-Wformat=2", 49 "-Wfloat-equal", 50 "-Wdate-time", 51 "-Werror", 52 "-Wextra", 53 "-Wimplicit-fallthrough", 54 "-Wsign-compare", 55 "-Wunused-parameter", 56 "-DBINDER_IPC_32BIT", 57 ] 58 if (player_framework_support_player) { 59 sources = [ 60 "../../../../test/fuzztest/common/stub_common.cpp", 61 "player_service_proxy_fuzzer.cpp", 62 "playerstub_fuzzer.cpp", 63 ] 64 } 65 deps = [ "../../../../services/services:media_service" ] 66 external_deps = [ 67 "c_utils:utils", 68 "graphic_surface:surface", 69 "hilog:libhilog", 70 "ipc:ipc_single", 71 "player_framework:media_client", 72 "safwk:system_ability_fwk", 73 "samgr:samgr_proxy", 74 ] 75} 76