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