• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../../../../config.gni")
16
17module_output_path = "av_session/av_session/ndk"
18
19common_deps = [
20  "../../../ohavsession:ohavsession",
21  "../../../session:avsession_client",
22  "../../../../../utils:avsession_utils",
23]
24
25common_external_deps = [
26  "ability_base:want",
27  "ability_base:zuri",
28  "ability_runtime:wantagent_innerkits",
29  "audio_framework:audio_client",
30  "c_utils:utils",
31  "curl:curl_shared",
32  "googletest:gtest",
33  "hilog:libhilog",
34  "image_framework:image",
35  "image_framework:image_native",
36  "input:libmmi-client",
37  "ipc:ipc_single",
38  "samgr:samgr_proxy",
39]
40
41ohos_unittest("OHAVMetadataBuilderTest") {
42  install_enable = true
43  visibility = [ ":*" ]
44
45  sanitize = {
46    cfi = true
47    cfi_cross_dso = true
48    cfi_vcall_icall_only = true
49    debug = false
50  }
51
52  include_dirs = [
53    "../../../../../interfaces/inner_api/native/session/include",
54    "../../../../../interfaces/kits/c",
55    "../../include",
56  ]
57
58  cflags = [
59    "-Wall",
60    "-Werror",
61  ]
62
63  sources = [ "./oh_av_metadata_builder_test.cpp" ]
64
65  deps = common_deps
66
67  external_deps = common_external_deps
68
69  module_out_path = module_output_path
70}
71
72ohos_unittest("OHAVSessionCallbackImplTest") {
73  install_enable = true
74  visibility = [ ":*" ]
75
76  sanitize = {
77    cfi = true
78    cfi_cross_dso = true
79    cfi_vcall_icall_only = true
80    debug = false
81  }
82
83  include_dirs = [
84    "../../../../../interfaces/inner_api/native/session/include",
85    "../../../../../interfaces/kits/c",
86    "../../include",
87  ]
88
89  cflags = [
90    "-Wall",
91    "-Werror",
92    "-fno-access-control",
93  ]
94
95  sources = [ "./oh_av_session_callbackimpl_test.cpp" ]
96
97  deps = common_deps
98
99  external_deps = common_external_deps
100
101  module_out_path = module_output_path
102}
103
104ohos_unittest("OHAVSessionTest") {
105  install_enable = true
106  visibility = [ ":*" ]
107
108  sanitize = {
109    cfi = true
110    cfi_cross_dso = true
111    cfi_vcall_icall_only = true
112    debug = false
113  }
114
115  include_dirs = [
116    "../../../../../interfaces/inner_api/native/session/include",
117    "../../../../../interfaces/kits/c",
118    "../../include",
119  ]
120
121  cflags = [
122    "-Wall",
123    "-Werror",
124    "-fno-access-control",
125  ]
126
127  sources = [ "./oh_av_session_test.cpp" ]
128
129  deps = common_deps
130
131  external_deps = common_external_deps
132
133  module_out_path = module_output_path
134}
135
136group("oh_av_session_unittest") {
137  testonly = true
138  deps = [
139    ":OHAVMetadataBuilderTest",
140    ":OHAVSessionCallbackImplTest",
141    ":OHAVSessionTest",
142  ]
143}
144