1da853ecaSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 2da853ecaSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3da853ecaSopenharmony_ci# you may not use this file except in compliance with the License. 4da853ecaSopenharmony_ci# You may obtain a copy of the License at 5da853ecaSopenharmony_ci# 6da853ecaSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7da853ecaSopenharmony_ci# 8da853ecaSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9da853ecaSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10da853ecaSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11da853ecaSopenharmony_ci# See the License for the specific language governing permissions and 12da853ecaSopenharmony_ci# limitations under the License. 13da853ecaSopenharmony_ci 14da853ecaSopenharmony_ci#####################hydra-fuzz################### 15da853ecaSopenharmony_ciimport("//build/config/features.gni") 16da853ecaSopenharmony_ciimport("//build/test.gni") 17da853ecaSopenharmony_ciimport("//foundation/multimedia/av_codec/config.gni") 18da853ecaSopenharmony_cimodule_output_path = "av_codec/av_codec" 19da853ecaSopenharmony_ciMEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 20da853ecaSopenharmony_ci 21da853ecaSopenharmony_ci##############################fuzztest########################################## 22da853ecaSopenharmony_ciohos_fuzztest("AudioencoderFuzzTest") { 23da853ecaSopenharmony_ci module_out_path = module_output_path 24da853ecaSopenharmony_ci fuzz_config_file = "$MEDIA_ROOT_DIR/test/fuzztest/audioencoder_fuzzer" 25da853ecaSopenharmony_ci include_dirs = [ 26da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/test/fuzztest/audioencoder_fuzzer", 27da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer", 28da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c", 29da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 30da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/services/factory", 31da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/plugin/common", 32da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/plugin/core", 33da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/plugin/interface", 34da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/frameworks/native/capi/common", 35da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/dfx/include", 36da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/base/include", 37da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/codec/include/video", 38da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/common/include", 39da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/engine/source/hst_releated", 40da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/services/factory", 41da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/utils/include", 42da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/test/nativedemo/include", 43da853ecaSopenharmony_ci ] 44da853ecaSopenharmony_ci cflags = [ 45da853ecaSopenharmony_ci "-g", 46da853ecaSopenharmony_ci "-O0", 47da853ecaSopenharmony_ci "-Wno-unused-variable", 48da853ecaSopenharmony_ci "-fno-omit-frame-pointer", 49da853ecaSopenharmony_ci ] 50da853ecaSopenharmony_ci sources = [ 51da853ecaSopenharmony_ci "audio_encoder_demo.cpp", 52da853ecaSopenharmony_ci "audioencoder_fuzzer.cpp", 53da853ecaSopenharmony_ci ] 54da853ecaSopenharmony_ci 55da853ecaSopenharmony_ci defines = [] 56da853ecaSopenharmony_ci 57da853ecaSopenharmony_ci if (av_codec_enable_special_codec) { 58da853ecaSopenharmony_ci defines += [ "AV_CODEC_AUDIO_SPECIAL_CAPACITY" ] 59da853ecaSopenharmony_ci } 60da853ecaSopenharmony_ci 61da853ecaSopenharmony_ci external_deps = [ 62da853ecaSopenharmony_ci "c_utils:utils", 63da853ecaSopenharmony_ci "hilog:libhilog", 64da853ecaSopenharmony_ci "ipc:ipc_core", 65da853ecaSopenharmony_ci "media_foundation:media_foundation", 66da853ecaSopenharmony_ci "media_foundation:native_media_core", 67da853ecaSopenharmony_ci "window_manager:libwm", 68da853ecaSopenharmony_ci ] 69da853ecaSopenharmony_ci deps = [ 70da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client", 71da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:capi_packages", 72da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avmuxer", 73da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avsource", 74da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase", 75da853ecaSopenharmony_ci "$MEDIA_ROOT_DIR/services/services:av_codec_service", 76da853ecaSopenharmony_ci ] 77da853ecaSopenharmony_ci} 78da853ecaSopenharmony_ci 79da853ecaSopenharmony_ci############################################################################### 80da853ecaSopenharmony_cigroup("fuzztest") { 81da853ecaSopenharmony_ci testonly = true 82da853ecaSopenharmony_ci deps = [] 83da853ecaSopenharmony_ci deps += [ 84da853ecaSopenharmony_ci # deps file 85da853ecaSopenharmony_ci ":AudioencoderFuzzTest", 86da853ecaSopenharmony_ci ] 87da853ecaSopenharmony_ci} 88da853ecaSopenharmony_ci############################################################################### 89