1# Copyright (c) 2020-2021 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 14import("//build/test.gni") 15import("//foundation/multimedia/av_codec/config.gni") 16 17MEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 18module_output_path = "av_codec/moduletest" 19 20ohos_unittest("audio_encoder_module_test") { 21 sanitize = av_codec_test_sanitize 22 module_out_path = module_output_path 23 sources = [ 24 "Avbuffer/src/avcodec_audio_avbuffer_encoder_demo.cpp", 25 "Avbuffer/src/common_tool.cpp", 26 "Avbuffer/src/fuzz_test.cpp", 27 "Avbuffer/src/null_check_test.cpp", 28 "Avbuffer/src/param_check_test.cpp", 29 "Avbuffer/src/status_check_test.cpp", 30 "Common/src/AudioEncoderDemoCommon.cpp", 31 "InnerAPI/InnerInterfaceDependCheckTest.cpp", 32 "InnerAPI/InnerParamCheckTest.cpp", 33 "NativeAPI/NativeInterfaceDependCheckTest.cpp", 34 "NativeAPI/NativeNullCheckTest.cpp", 35 "NativeAPI/NativeParamCheckTest.cpp", 36 ] 37 38 include_dirs = [ 39 "Avbuffer/include", 40 "Common/include", 41 "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer", 42 "$MEDIA_ROOT_DIR/interfaces/kits/c", 43 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 44 "$MEDIA_ROOT_DIR/services/services/factory", 45 "$MEDIA_ROOT_DIR/services/engine/plugin/common", 46 "$MEDIA_ROOT_DIR/services/engine/plugin/core", 47 "$MEDIA_ROOT_DIR/services/engine/plugin/interface", 48 "$MEDIA_ROOT_DIR/frameworks/native/capi/common", 49 "$MEDIA_ROOT_DIR/services/dfx/include", 50 "$MEDIA_ROOT_DIR/services/engine/base/include", 51 "$MEDIA_ROOT_DIR/services/engine/codec/include/video", 52 "$MEDIA_ROOT_DIR/services/engine/common/include", 53 "$MEDIA_ROOT_DIR/services/engine/source/hst_releated", 54 "$MEDIA_ROOT_DIR/services/services/factory", 55 "$MEDIA_ROOT_DIR/services/utils/include", 56 "$MEDIA_ROOT_DIR/test/nativedemo/include", 57 ] 58 59 cflags = [ 60 "-Wall", 61 "-fno-rtti", 62 "-fno-exceptions", 63 "-fno-common", 64 "-fstack-protector-strong", 65 "-Wshadow", 66 "-FPIC", 67 "-FS", 68 "-O2", 69 "-D_FORTIFY_SOURCE=2", 70 "-fvisibility=hidden", 71 "-Wformat=2", 72 "-Wdate-time", 73 "-Werror", 74 "-Wextra", 75 "-Wimplicit-fallthrough", 76 "-Wsign-compare", 77 "-Wunused-parameter", 78 "-Wno-deprecated-declarations", 79 ] 80 81 deps = [ 82 "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client", 83 "$MEDIA_ROOT_DIR/interfaces/kits/c:capi_packages", 84 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avmuxer", 85 "$MEDIA_ROOT_DIR/services/services:av_codec_service", 86 ] 87 88 external_deps = [ 89 "bounds_checking_function:libsec_static", 90 "c_utils:utils", 91 "ffmpeg:libohosffmpeg", 92 "hilog:libhilog", 93 "ipc:ipc_core", 94 "media_foundation:media_foundation", 95 "media_foundation:native_media_core", 96 ] 97 98 resource_config_file = 99 "$MEDIA_ROOT_DIR/test/moduletest/resources/ohos_test.xml" 100} 101