# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/test.gni") import("//foundation/multimedia/player_framework/config.gni") module_output_path = "$MODULE_OUTPUT_PATH/avcodec" acodec_fuzztest_include_dirs = [ "../../../../../../../foundation/window/window_manager/interfaces/innerkits/wm", "../../../../interfaces/inner_api/native", "../../../../test/unittest/avcodec_test/", "../../../../test/unittest/avcodec_test/native/audiodecoder/", "../../../../test/unittest/avcodec_test/native/audioencoder/", "../../../../test/unittest/avcodec_test/native/avcodec_info/", "../../../../test/unittest/avcodec_test/native/avcodec_list/", "../../../../test/unittest/avcodec_test/native/avformat/", "../../../../test/unittest/avcodec_test/native/avmemory/", "../../../../test/unittest/avcodec_test/native/enum/", "../../../../test/unittest/avcodec_test/native/surface/", "../../../../test/unittest/avcodec_test/native/videodecoder/", "../../../../test/unittest/avcodec_test/native/videoencoder/", "../../../../test/unittest/avcodec_test/acodec_test/", "../../../../test/unittest/avcodec_test/vcodec_test/", "../../../../test/unittest/common/include/", ] acodec_fuzztest_cflags = [ "-std=c++17", "-std=c++17", "-fno-rtti", "-fno-exceptions", "-Wall", "-fno-common", "-fstack-protector-strong", "-Wshadow", "-FPIC", "-FS", "-O2", "-D_FORTIFY_SOURCE=2", "-fvisibility=hidden", "-Wformat=2", "-Wdate-time", "-Werror", "-Wextra", "-Wimplicit-fallthrough", "-Wsign-compare", "-Wunused-parameter", ] ##############################fuzztest########################################## ohos_fuzztest("ACodecConfigureFuzzTest") { module_out_path = module_output_path fuzz_config_file = "../../../../test/fuzztest/avcodec_fuzztest/acodecconfigure_fuzzer" resource_config_file = "../../../../test/fuzztest/resource/ohos_test.xml" include_dirs = acodec_fuzztest_include_dirs include_dirs += [ "../../../../services/utils/include", "../../../../test/fuzztest/common/", "../../../../test/fuzztest/acodecconfigure_fuzzer", ] cflags = acodec_fuzztest_cflags cflags += [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] if (multimedia_player_framework_support_codec) { sources = [ "../../../../test/unittest/avcodec_test/acodec_test/acodec_mock.cpp", "../../../../test/unittest/avcodec_test/native/audiodecoder/audiodec_native_mock.cpp", "../../../../test/unittest/avcodec_test/native/audioencoder/audioenc_native_mock.cpp", "../../../../test/unittest/avcodec_test/native/avcodec_mock_factory.cpp", "../../../../test/unittest/avcodec_test/native/avformat/avformat_native_mock.cpp", "../../../../test/unittest/avcodec_test/native/avmemory/avmemory_native_mock.cpp", "../../../../test/unittest/avcodec_test/native/surface/surface_native_mock.cpp", "../../../../test/unittest/avcodec_test/native/videodecoder/videodec_native_mock.cpp", "../../../../test/unittest/avcodec_test/native/videoencoder/videoenc_native_mock.cpp", "../../../../test/unittest/avcodec_test/vcodec_test/vdec_mock.cpp", "../../../../test/unittest/avcodec_test/vcodec_test/venc_mock.cpp", "acodecconfigure_fuzzer.cpp", ] } deps = [ "../../../../../../../foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", "../../../../../../../foundation/window/window_manager/wm:libwm", ] external_deps = [ "c_utils:utils", "graphic_surface:surface", "hilog:libhilog", "player_framework:media_client", ] } ###############################################################################