1# Copyright (c) 2022 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 = "player_framework/media_player" 19MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/" 20 21##############################fuzztest########################################## 22ohos_fuzztest("PlayerFileFuzzTest") { 23 module_out_path = module_output_path 24 fuzz_config_file = 25 "$MEDIA_ROOT_DIR/test/fuzztest/player_fuzztest/playerfile_fuzzer" 26 resource_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/resource/ohos_test.xml" 27 28 include_dirs = [ 29 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 30 "$MEDIA_ROOT_DIR/services/utils/include", 31 "//graphic/graphic_2d/interfaces/innerkits/surface", 32 "//foundation/window/window_manager/interfaces/innerkits/wm", 33 "$MEDIA_ROOT_DIR/test/fuzztest/common/", 34 ] 35 cflags = [ 36 "-g", 37 "-O0", 38 "-Wno-unused-variable", 39 "-fno-omit-frame-pointer", 40 ] 41 if (multimedia_player_framework_support_player) { 42 sources = [ 43 "$MEDIA_ROOT_DIR/test/fuzztest/common/test_player.cpp", 44 "playerfile_fuzzer.cpp", 45 ] 46 } 47 deps = [ 48 "//foundation/graphic/graphic_2d:libsurface", 49 "//foundation/graphic/graphic_2d/frameworks/surface:surface", 50 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 51 "//foundation/window/window_manager/wm:libwm", 52 ] 53 external_deps = [ 54 "hiviewdfx_hilog_native:libhilog", 55 "ipc:ipc_core", 56 "multimedia_player_framework:media_client", 57 ] 58} 59 60############################################################################### 61 62