• 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("../../../../../config.gni")
16module_output_path = "audio_framework/audio_framework_route/audio_utils"
17
18ohos_unittest("audio_utils_unit_test") {
19  module_out_path = module_output_path
20  include_dirs = [
21    "../../include",
22    "../../../../../interfaces/inner_api/native/audiocommon/include/",
23  ]
24
25  cflags = [
26    "-Wall",
27    "-Werror",
28    "-fno-access-control",
29  ]
30
31  external_deps = [
32    "c_utils:utils",
33    "googletest:gmock",
34    "googletest:gtest",
35    "hilog:libhilog",
36    "init:libbegetutil",
37    "ipc:ipc_single",
38  ]
39
40  if (sonic_enable == true) {
41    cflags += [ "-DSONIC_ENABLE" ]
42  }
43
44  if (sonic_enable == true) {
45    external_deps += [ "pulseaudio:sonic" ]
46  }
47
48  sources = [
49    "../../../audioutils/src/audio_channel_blend.cpp",
50    "audio_utils_unit_test.cpp",
51    "audio_utils_second_unit_test.cpp",
52  ]
53
54  deps = [ "../../../audioutils:audio_utils" ]
55}
56
57ohos_unittest("audio_utils_plus_unit_test") {
58  module_out_path = module_output_path
59  include_dirs = [
60    "../../include",
61    "../../../../../interfaces/inner_api/native/audiocommon/include/",
62  ]
63
64  cflags = [
65    "-Wall",
66    "-Werror",
67    "-fno-access-control",
68  ]
69
70  external_deps = [
71    "c_utils:utils",
72    "googletest:gmock",
73    "googletest:gtest",
74    "init:libbegetutil",
75    "ipc:ipc_single",
76  ]
77
78  if (sonic_enable == true) {
79    cflags += [ "-DSONIC_ENABLE" ]
80  }
81
82  if (sonic_enable == true) {
83    external_deps += [ "pulseaudio:sonic" ]
84  }
85
86  sources = [ "audio_utils_plus_unit_test.cpp" ]
87
88  deps = [ "../../../audioutils:audio_utils" ]
89}
90
91ohos_unittest("audio_utils_pro_unit_test") {
92  module_out_path = module_output_path
93  include_dirs = [
94    "../../include",
95    "../../../../../interfaces/inner_api/native/audiocommon/include/",
96  ]
97
98  cflags = [
99    "-Wall",
100    "-Werror",
101    "-fno-access-control",
102  ]
103
104  external_deps = [
105    "c_utils:utils",
106    "init:libbegetutil",
107    "ipc:ipc_single",
108  ]
109
110  if (sonic_enable == true) {
111    cflags += [ "-DSONIC_ENABLE" ]
112  }
113
114  if (sonic_enable == true) {
115    external_deps += [ "pulseaudio:sonic" ]
116  }
117
118  sources = [ "audio_utils_pro_unit_test.cpp" ]
119
120  deps = [ "../../../audioutils:audio_utils" ]
121}
122
123ohos_unittest("audio_speed_unit_test") {
124  module_out_path = module_output_path
125  include_dirs = [
126    "../../include",
127    "../../../../../interfaces/inner_api/native/audiocommon/include/",
128  ]
129
130  cflags = [
131    "-Wall",
132    "-Werror",
133    "-fno-access-control",
134  ]
135
136  external_deps = [
137    "c_utils:utils",
138    "init:libbegetutil",
139    "ipc:ipc_single",
140  ]
141
142  if (sonic_enable == true) {
143    cflags += [ "-DSONIC_ENABLE" ]
144  }
145
146  if (sonic_enable == true) {
147    external_deps += [ "pulseaudio:sonic" ]
148  }
149
150  sources = [ "audio_speed_unit_test.cpp" ]
151
152  deps = [ "../../../audioutils:audio_utils" ]
153}
154