1# Copyright (C) 2024 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/media_foundation/config.gni") 16 17module_output_path = "media_foundation/unittest" 18 19group("pipline_unit_test") { 20 testonly = true 21 deps = [ ":pipline_func_unit_test" ] 22} 23 24pipline_unittest_cflags = [ 25 "-std=c++17", 26 "-fno-rtti", 27 "-fexceptions", 28 "-Wall", 29 "-fno-common", 30 "-fstack-protector-strong", 31 "-Wshadow", 32 "-FPIC", 33 "-FS", 34 "-O2", 35 "-D_FORTIFY_SOURCE=2", 36 "-fvisibility=hidden", 37 "-Wformat=2", 38 "-Wdate-time", 39 "-Wextra", 40 "-Wimplicit-fallthrough", 41 "-Wsign-compare", 42 "-Dprivate=public", 43 "-Dprotected=public", 44] 45 46ohos_unittest("pipline_func_unit_test") { 47 module_out_path = module_output_path 48 include_dirs = [ "./" ] 49 50 defines = [ 51 "HST_ANY_WITH_NO_RTTI", 52 "MEDIA_OHOS", 53 ] 54 55 sources = [ "./pipline_func_unit_test.cpp" ] 56 57 cflags = pipline_unittest_cflags 58 59 public_deps = [ 60 "$histreamer_root_dir/src:media_foundation", 61 "../common:media_foundation_inner_unit_test", 62 ] 63 64 external_deps = [ 65 "c_utils:utils", 66 "graphic_surface:surface", 67 "graphic_surface:sync_fence", 68 "hilog:libhilog", 69 "ipc:ipc_core", 70 "memory_utils:libdmabufheap", 71 ] 72} 73