• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/test.gni")
16} else {
17  import("//build/test.gni")
18  import("//drivers/adapter/uhdf2/uhdf.gni")
19  import("//drivers/peripheral/audio/audio.gni")
20}
21
22if (defined(ohos_lite)) {
23  ###########################LITEOS##########################################
24  ###########################hdf_audio_hdi_render_performace_test#####################
25  unittest("hdf_audio_hdi_render_performace_test") {
26    sources = [
27      "../../common/hdi_common/src/audio_hdi_common.cpp",
28      "src/audio_hdirender_performace_test.cpp",
29    ]
30
31    include_dirs = [
32      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
33      "//drivers/peripheral/audio/interfaces/include",
34      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
35      "//drivers/framework/include/core",
36      "//drivers/framework/include/utils",
37      "//drivers/framework/include/osal",
38      "//drivers/framework/ability/sbuf/include",
39      "//drivers/framework/utils/include",
40      "//drivers/framework/include",
41      "//drivers/framework/core/sec/include",
42      "//drivers/framework/core/shared/include",
43      "//drivers/framework/core/host/include",
44      "//drivers/framework/core/manager/include",
45      "//drivers/framework/core/common/include/host/",
46      "//third_party/bounds_checking_function/include",
47      "//drivers/adapter/khdf/liteos/osal/include",
48      "//drivers/adapter/uhdf2/shared/include",
49      "//drivers/adapter/uhdf2/include/hdi/",
50      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
51      "//third_party/googletest/googletest/include/gtest",
52      "//drivers/peripheral/audio/test/systemtest/hdi/hdiperformace/include",
53    ]
54    cflags = [
55      "-Wall",
56      "-Wextra",
57      "-Werror",
58      "-fsigned-char",
59      "-fno-common",
60      "-fno-strict-aliasing",
61    ]
62  }
63
64  ###########################end###########################
65  ###########################hdf_audio_hdi_capture_performace_test#####################
66  unittest("hdf_audio_hdi_capture_performace_test") {
67    sources = [
68      "../../common/hdi_common/src/audio_hdi_common.cpp",
69      "src/audio_hdicapture_performace_test.cpp",
70    ]
71
72    include_dirs = [
73      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
74      "//drivers/peripheral/audio/interfaces/include",
75      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
76      "//drivers/framework/include/core",
77      "//drivers/framework/include/utils",
78      "//drivers/framework/include/osal",
79      "//drivers/framework/ability/sbuf/include",
80      "//drivers/framework/utils/include",
81      "//drivers/framework/include",
82      "//drivers/framework/core/sec/include",
83      "//drivers/framework/core/shared/include",
84      "//drivers/framework/core/host/include",
85      "//drivers/framework/core/manager/include",
86      "//drivers/framework/core/common/include/host/",
87      "//third_party/bounds_checking_function/include",
88      "//drivers/adapter/khdf/liteos/osal/include",
89      "//drivers/adapter/uhdf2/shared/include",
90      "//drivers/adapter/uhdf2/include/hdi/",
91      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
92      "//third_party/googletest/googletest/include/gtest",
93      "//drivers/peripheral/audio/test/systemtest/hdi/hdiperformace/include",
94    ]
95    cflags = [
96      "-Wall",
97      "-Wextra",
98      "-Werror",
99      "-fsigned-char",
100      "-fno-common",
101      "-fno-strict-aliasing",
102    ]
103  }
104} else {
105  ###########################SystemTest##########################################
106  module_output_path = "hdf/audio"
107
108  ###########################hdf_audio_hdi_render_performace_test#####################
109  ohos_systemtest("hdf_audio_hdi_render_performace_test") {
110    module_out_path = module_output_path
111    sources = [
112      "../../common/hdi_common/src/audio_hdi_common.cpp",
113      "src/audio_hdirender_performace_test.cpp",
114    ]
115
116    include_dirs = [
117      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
118      "//drivers/peripheral/audio/interfaces/include",
119      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
120      "//drivers/adapter/uhdf2/include/hdi",
121      "//drivers/adapter/uhdf2/shared/include",
122      "//drivers/framework/include/core",
123      "//drivers/framework/include/utils",
124      "//drivers/framework/include/osal",
125      "//drivers/framework/include",
126      "//third_party/bounds_checking_function/include",
127      "//drivers/framework/ability/sbuf/include",
128      "//drivers/framework/utils/include",
129      "//drivers/framework/ability/sbuf/include",
130      "//drivers/adapter/uhdf2/osal/include",
131      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
132      "//third_party/googletest/googletest/include/gtest",
133      "//drivers/peripheral/audio/test/systemtest/hdi/hdiperformace/include",
134    ]
135    cflags = [
136      "-Wall",
137      "-Wextra",
138      "-Werror",
139      "-fsigned-char",
140      "-fno-common",
141      "-fno-strict-aliasing",
142    ]
143    deps = [
144      "//third_party/googletest:gmock_main",
145      "//third_party/googletest:gtest_main",
146    ]
147    defines = []
148    if (enable_audio_adm_so) {
149      defines += [ "AUDIO_ADM_SO" ]
150    }
151    if (enable_audio_mpi_so) {
152      defines += [ "AUDIO_MPI_SO" ]
153    }
154    if (enable_audio_adm_service) {
155      defines += [ "AUDIO_ADM_SERVICE" ]
156    }
157    if (enable_audio_mpi_service) {
158      defines += [ "AUDIO_MPI_SERVICE" ]
159    }
160  }
161
162  ###########################end###########################
163  ###########################hdf_audio_hdi_capture_performace_test#####################
164  ohos_systemtest("hdf_audio_hdi_capture_performace_test") {
165    module_out_path = module_output_path
166    sources = [
167      "../../common/hdi_common/src/audio_hdi_common.cpp",
168      "src/audio_hdicapture_performace_test.cpp",
169    ]
170
171    include_dirs = [
172      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
173      "//drivers/peripheral/audio/interfaces/include",
174      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
175      "//drivers/adapter/uhdf2/include/hdi",
176      "//drivers/adapter/uhdf2/shared/include",
177      "//drivers/framework/include/core",
178      "//drivers/framework/include/utils",
179      "//drivers/framework/include/osal",
180      "//drivers/framework/include",
181      "//third_party/bounds_checking_function/include",
182      "//drivers/framework/ability/sbuf/include",
183      "//drivers/framework/utils/include",
184      "//drivers/framework/ability/sbuf/include",
185      "//drivers/adapter/uhdf2/osal/include",
186      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
187      "//third_party/googletest/googletest/include/gtest",
188      "//drivers/peripheral/audio/test/systemtest/hdi/hdiperformace/include",
189    ]
190    cflags = [
191      "-Wall",
192      "-Wextra",
193      "-Werror",
194      "-fsigned-char",
195      "-fno-common",
196      "-fno-strict-aliasing",
197    ]
198    deps = [
199      "//third_party/googletest:gmock_main",
200      "//third_party/googletest:gtest_main",
201    ]
202    defines = []
203    if (enable_audio_adm_so) {
204      defines += [ "AUDIO_ADM_SO" ]
205    }
206    if (enable_audio_mpi_so) {
207      defines += [ "AUDIO_MPI_SO" ]
208    }
209    if (enable_audio_adm_service) {
210      defines += [ "AUDIO_ADM_SERVICE" ]
211    }
212    if (enable_audio_mpi_service) {
213      defines += [ "AUDIO_MPI_SERVICE" ]
214    }
215  }
216}
217###########################end###########################
218