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