• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("avbuffer_unit_test") {
20  testonly = true
21  deps = [
22    ":avbuffer_capi_unit_test",
23    ":avbuffer_inner_unit_test",
24  ]
25}
26
27avbuffer_unittest_cflags = [
28  "-std=c++17",
29  "-fno-rtti",
30  "-fexceptions",
31  "-Wall",
32  "-fno-common",
33  "-fstack-protector-strong",
34  "-Wshadow",
35  "-FPIC",
36  "-FS",
37  "-O2",
38  "-D_FORTIFY_SOURCE=2",
39  "-fvisibility=hidden",
40  "-Wformat=2",
41  "-Wdate-time",
42  "-Wextra",
43  "-Wimplicit-fallthrough",
44  "-Wsign-compare",
45  "-Dprivate=public",
46  "-Dprotected=public",
47]
48
49#################################################################################################################videodec
50ohos_unittest("avbuffer_inner_unit_test") {
51  module_out_path = module_output_path
52  include_dirs = [
53    "./",
54    "./inner",
55  ]
56
57  defines = [
58    "HST_ANY_WITH_NO_RTTI",
59    "MEDIA_OHOS",
60  ]
61
62  sources = [
63    "./avbuffer_framework_unit_test.cpp",
64    "./avbuffer_func_unit_test.cpp",
65    "./avbuffer_unit_test.cpp",
66  ]
67
68  cflags = avbuffer_unittest_cflags
69
70  public_deps = [ "../common:media_foundation_inner_unit_test" ]
71
72  external_deps = [
73    "c_utils:utils",
74    "graphic_surface:surface",
75    "graphic_surface:sync_fence",
76    "hilog:libhilog",
77    "ipc:ipc_core",
78    "memory_utils:libdmabufheap",
79  ]
80}
81
82#################################################################################################################videodec
83ohos_unittest("avbuffer_capi_unit_test") {
84  module_out_path = module_output_path
85  include_dirs = [
86    "./",
87    "./capi",
88    "$histreamer_root_dir/interface/kits/c",
89  ]
90
91  defines = [
92    "AVBUFFER_CAPI_UNIT_TEST",
93    "MEDIA_OHOS",
94  ]
95
96  sources = [
97    "./avbuffer_framework_unit_test.cpp",
98    "./avbuffer_unit_test.cpp",
99  ]
100
101  cflags = avbuffer_unittest_cflags
102
103  public_deps = [ "../common:media_foundation_capi_unit_test" ]
104
105  external_deps = [
106    "c_utils:utils",
107    "graphic_surface:surface",
108    "graphic_surface:sync_fence",
109    "hilog:libhilog",
110    "ipc:ipc_core",
111    "memory_utils:libdmabufheap",
112  ]
113}
114