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/avmetadata" 19MEDIA_ROOT_DIR = "//foundation/multimedia/player_framework/" 20 21##############################fuzztest########################################## 22ohos_fuzztest("AVmetadataFileFuzzTest") { 23 module_out_path = module_output_path 24 fuzz_config_file = 25 "$MEDIA_ROOT_DIR/test/fuzztest/avmetadata_fuzztest/avmetadatafile_fuzzer" 26 27 resource_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/resource/ohos_test.xml" 28 29 include_dirs = [ 30 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 31 "$MEDIA_ROOT_DIR/services/utils/include", 32 "$MEDIA_ROOT_DIR/test/fuzztest/common/", 33 "//foundation/windowmanager/interfaces/innerkits/wm", 34 "//graphic/graphic_2d/interfaces/innerkits/surface", 35 ] 36 cflags = [ 37 "-std=c++17", 38 "-fno-rtti", 39 "-fno-exceptions", 40 "-Wall", 41 "-fno-common", 42 "-fstack-protector-strong", 43 "-Wshadow", 44 "-FPIC", 45 "-FS", 46 "-O2", 47 "-D_FORTIFY_SOURCE=2", 48 "-fvisibility=hidden", 49 "-Wformat=2", 50 "-Wfloat-equal", 51 "-Wdate-time", 52 "-Werror", 53 "-Wextra", 54 "-Wimplicit-fallthrough", 55 "-Wsign-compare", 56 "-Wunused-parameter", 57 ] 58 if (multimedia_player_framework_support_metadata) { 59 sources = [ 60 "$MEDIA_ROOT_DIR/test/fuzztest/common/aw_common.cpp", 61 "$MEDIA_ROOT_DIR/test/fuzztest/common/test_metadata.cpp", 62 "avmetadatafile_fuzzer.cpp", 63 ] 64 } 65 deps = [ 66 "//foundation/graphic/graphic_2d:libsurface", 67 "//foundation/graphic/graphic_2d/frameworks/surface:surface", 68 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 69 "//foundation/window/window_manager/wm:libwm", 70 ] 71 external_deps = [ 72 "hiviewdfx_hilog_native:libhilog", 73 "ipc:ipc_core", 74 "multimedia_player_framework:media_client", 75 ] 76} 77