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_reliability_test########################### 25 unittest("hdf_audio_hdi_render_reliability_test") { 26 sources = [ 27 "../../common/hdi_common/src/audio_hdi_common.cpp", 28 "src/audio_hdirender_reliability_test.cpp", 29 ] 30 31 include_dirs = [ 32 "//drivers/peripheral/audio/interfaces/include", 33 "//drivers/peripheral/audio/hal/hdi_passthrough/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/hdireliability/include", 53 ] 54 cflags = [ 55 "-Wall", 56 "-Wextra", 57 "-Werror", 58 "-fsigned-char", 59 "-fno-common", 60 "-fno-strict-aliasing", 61 "-std=c++11", 62 ] 63 64 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 65 } 66 67 ###########################end########################### 68 ###########################hdf_audio_hdi_capture_reliability_test########################### 69 unittest("hdf_audio_hdi_capture_reliability_test") { 70 sources = [ 71 "../../common/hdi_common/src/audio_hdi_common.cpp", 72 "src/audio_hdicapture_reliability_test.cpp", 73 ] 74 75 include_dirs = [ 76 "//drivers/peripheral/audio/interfaces/include", 77 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 78 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 79 "//drivers/framework/include/core", 80 "//drivers/framework/include/utils", 81 "//drivers/framework/include/osal", 82 "//drivers/framework/ability/sbuf/include", 83 "//drivers/framework/utils/include", 84 "//drivers/framework/include", 85 "//drivers/framework/core/sec/include", 86 "//drivers/framework/core/shared/include", 87 "//drivers/framework/core/host/include", 88 "//drivers/framework/core/manager/include", 89 "//drivers/framework/core/common/include/host/", 90 "//third_party/bounds_checking_function/include", 91 "//drivers/adapter/khdf/liteos/osal/include", 92 "//drivers/adapter/uhdf2/shared/include", 93 "//drivers/adapter/uhdf2/include/hdi/", 94 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 95 "//third_party/googletest/googletest/include/gtest", 96 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 97 ] 98 99 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 100 } 101 102 ###########################end########################### 103 ###########################hdf_audio_hdi_capture_control_reliability_test########################### 104 unittest("hdf_audio_hdi_capture_control_reliability_test") { 105 sources = [ 106 "../../common/hdi_common/src/audio_hdi_common.cpp", 107 "src/audio_hdicapture_control_reliability_test.cpp", 108 ] 109 110 include_dirs = [ 111 "//drivers/peripheral/audio/interfaces/include", 112 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 113 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 114 "//drivers/framework/include/core", 115 "//drivers/framework/include/utils", 116 "//drivers/framework/include/osal", 117 "//drivers/framework/ability/sbuf/include", 118 "//drivers/framework/utils/include", 119 "//drivers/framework/include", 120 "//drivers/framework/core/sec/include", 121 "//drivers/framework/core/shared/include", 122 "//drivers/framework/core/host/include", 123 "//drivers/framework/core/manager/include", 124 "//drivers/framework/core/common/include/host/", 125 "//third_party/bounds_checking_function/include", 126 "//drivers/adapter/khdf/liteos/osal/include", 127 "//drivers/adapter/uhdf2/shared/include", 128 "//drivers/adapter/uhdf2/include/hdi/", 129 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 130 "//third_party/googletest/googletest/include/gtest", 131 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 132 ] 133 134 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 135 } 136 137 ###########################end########################### 138 ###########################hdf_audio_hdi_render_control_reliability_test########################### 139 unittest("hdf_audio_hdi_render_control_reliability_test") { 140 sources = [ 141 "../../common/hdi_common/src/audio_hdi_common.cpp", 142 "src/audio_hdirender_control_reliability_test.cpp", 143 ] 144 145 include_dirs = [ 146 "//drivers/peripheral/audio/interfaces/include", 147 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 148 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 149 "//drivers/framework/include/core", 150 "//drivers/framework/include/utils", 151 "//drivers/framework/include/osal", 152 "//drivers/framework/ability/sbuf/include", 153 "//drivers/framework/utils/include", 154 "//drivers/framework/include", 155 "//drivers/framework/core/sec/include", 156 "//drivers/framework/core/shared/include", 157 "//drivers/framework/core/host/include", 158 "//drivers/framework/core/manager/include", 159 "//drivers/framework/core/common/include/host/", 160 "//third_party/bounds_checking_function/include", 161 "//drivers/adapter/khdf/liteos/osal/include", 162 "//drivers/adapter/uhdf2/shared/include", 163 "//drivers/adapter/uhdf2/include/hdi/", 164 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 165 "//third_party/googletest/googletest/include/gtest", 166 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 167 ] 168 169 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 170 } 171} else { 172 ###########################systemtest############################## 173 module_output_path = "hdf/audio" 174 175 ###########################hdf_audio_hdi_render_reliability_test########################### 176 ohos_systemtest("hdf_audio_hdi_render_reliability_test") { 177 module_out_path = module_output_path 178 sources = [ 179 "../../common/hdi_common/src/audio_hdi_common.cpp", 180 "src/audio_hdirender_reliability_test.cpp", 181 ] 182 183 include_dirs = [ 184 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 185 "//drivers/peripheral/audio/interfaces/include", 186 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 187 "//drivers/adapter/uhdf2/include/hdi", 188 "//drivers/adapter/uhdf2/shared/include", 189 "//drivers/framework/include/core", 190 "//drivers/framework/include/utils", 191 "//drivers/framework/include/osal", 192 "//drivers/framework/include", 193 "//third_party/bounds_checking_function/include", 194 "//utils/native/base/include", 195 "//drivers/framework/ability/sbuf/include", 196 "//drivers/framework/utils/include", 197 "//drivers/framework/ability/sbuf/include", 198 "//drivers/adapter/uhdf2/osal/include", 199 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 200 "//third_party/googletest/googletest/include/gtest", 201 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 202 ] 203 deps = [ 204 "//third_party/googletest:gmock_main", 205 "//third_party/googletest:gtest_main", 206 "//utils/native/base:utils", 207 ] 208 cflags = [ 209 "-Wall", 210 "-Wextra", 211 "-Werror", 212 "-fsigned-char", 213 "-fno-common", 214 "-fno-strict-aliasing", 215 ] 216 defines = [] 217 if (enable_audio_adm_so) { 218 defines += [ "AUDIO_ADM_SO" ] 219 } 220 if (enable_audio_mpi_so) { 221 defines += [ "AUDIO_MPI_SO" ] 222 } 223 if (enable_audio_adm_service) { 224 defines += [ "AUDIO_ADM_SERVICE" ] 225 } 226 if (enable_audio_mpi_service) { 227 defines += [ "AUDIO_MPI_SERVICE" ] 228 } 229 } 230 231 ###########################end########################### 232 ###########################hdf_audio_hdi_capture_reliability_test########################### 233 ohos_systemtest("hdf_audio_hdi_capture_reliability_test") { 234 module_out_path = module_output_path 235 sources = [ 236 "../../common/hdi_common/src/audio_hdi_common.cpp", 237 "src/audio_hdicapture_reliability_test.cpp", 238 ] 239 240 include_dirs = [ 241 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 242 "//drivers/peripheral/audio/interfaces/include", 243 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 244 "//drivers/adapter/uhdf2/include/hdi", 245 "//drivers/adapter/uhdf2/shared/include", 246 "//drivers/framework/include/core", 247 "//drivers/framework/include/utils", 248 "//drivers/framework/include/osal", 249 "//drivers/framework/include", 250 "//third_party/bounds_checking_function/include", 251 "//utils/native/base/include", 252 "//drivers/framework/ability/sbuf/include", 253 "//drivers/framework/utils/include", 254 "//drivers/framework/ability/sbuf/include", 255 "//drivers/adapter/uhdf2/osal/include", 256 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 257 "//third_party/googletest/googletest/include/gtest", 258 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 259 ] 260 deps = [ 261 "//third_party/googletest:gmock_main", 262 "//third_party/googletest:gtest_main", 263 "//utils/native/base:utils", 264 ] 265 cflags = [ 266 "-Wall", 267 "-Wextra", 268 "-Werror", 269 "-fsigned-char", 270 "-fno-common", 271 "-fno-strict-aliasing", 272 ] 273 defines = [] 274 if (enable_audio_adm_so) { 275 defines += [ "AUDIO_ADM_SO" ] 276 } 277 if (enable_audio_mpi_so) { 278 defines += [ "AUDIO_MPI_SO" ] 279 } 280 if (enable_audio_adm_service) { 281 defines += [ "AUDIO_ADM_SERVICE" ] 282 } 283 if (enable_audio_mpi_service) { 284 defines += [ "AUDIO_MPI_SERVICE" ] 285 } 286 } 287 288 ###########################end########################### 289 ###########################hdf_audio_hdi_capture_control_reliability_test########################### 290 ohos_systemtest("hdf_audio_hdi_capture_control_reliability_test") { 291 module_out_path = module_output_path 292 sources = [ 293 "../../common/hdi_common/src/audio_hdi_common.cpp", 294 "src/audio_hdicapture_control_reliability_test.cpp", 295 ] 296 297 include_dirs = [ 298 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 299 "//drivers/peripheral/audio/interfaces/include", 300 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 301 "//drivers/adapter/uhdf2/include/hdi", 302 "//drivers/adapter/uhdf2/shared/include", 303 "//drivers/framework/include/core", 304 "//drivers/framework/include/utils", 305 "//drivers/framework/include/osal", 306 "//drivers/framework/include", 307 "//third_party/bounds_checking_function/include", 308 "//utils/native/base/include", 309 "//drivers/framework/ability/sbuf/include", 310 "//drivers/framework/utils/include", 311 "//drivers/framework/ability/sbuf/include", 312 "//drivers/adapter/uhdf2/osal/include", 313 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 314 "//third_party/googletest/googletest/include/gtest", 315 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 316 ] 317 deps = [ 318 "//third_party/googletest:gmock_main", 319 "//third_party/googletest:gtest_main", 320 "//utils/native/base:utils", 321 ] 322 cflags = [ 323 "-Wall", 324 "-Wextra", 325 "-Werror", 326 "-fsigned-char", 327 "-fno-common", 328 "-fno-strict-aliasing", 329 ] 330 defines = [] 331 if (enable_audio_adm_so) { 332 defines += [ "AUDIO_ADM_SO" ] 333 } 334 if (enable_audio_mpi_so) { 335 defines += [ "AUDIO_MPI_SO" ] 336 } 337 if (enable_audio_adm_service) { 338 defines += [ "AUDIO_ADM_SERVICE" ] 339 } 340 if (enable_audio_mpi_service) { 341 defines += [ "AUDIO_MPI_SERVICE" ] 342 } 343 } 344 345 ###########################end########################### 346 ###########################hdf_audio_hdi_render_control_reliability_test########################### 347 ohos_systemtest("hdf_audio_hdi_render_control_reliability_test") { 348 module_out_path = module_output_path 349 sources = [ 350 "../../common/hdi_common/src/audio_hdi_common.cpp", 351 "src/audio_hdirender_control_reliability_test.cpp", 352 ] 353 354 include_dirs = [ 355 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 356 "//drivers/peripheral/audio/interfaces/include", 357 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 358 "//drivers/adapter/uhdf2/include/hdi", 359 "//drivers/adapter/uhdf2/shared/include", 360 "//drivers/framework/include/core", 361 "//drivers/framework/include/utils", 362 "//drivers/framework/include/osal", 363 "//drivers/framework/include", 364 "//third_party/bounds_checking_function/include", 365 "//utils/native/base/include", 366 "//drivers/framework/ability/sbuf/include", 367 "//drivers/framework/utils/include", 368 "//drivers/framework/ability/sbuf/include", 369 "//drivers/adapter/uhdf2/osal/include", 370 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 371 "//third_party/googletest/googletest/include/gtest", 372 "//drivers/peripheral/audio/test/systemtest/hdi/hdireliability/include", 373 ] 374 deps = [ 375 "//third_party/googletest:gmock_main", 376 "//third_party/googletest:gtest_main", 377 "//utils/native/base:utils", 378 ] 379 cflags = [ 380 "-Wall", 381 "-Wextra", 382 "-Werror", 383 "-fsigned-char", 384 "-fno-common", 385 "-fno-strict-aliasing", 386 ] 387 defines = [] 388 if (enable_audio_adm_so) { 389 defines += [ "AUDIO_ADM_SO" ] 390 } 391 if (enable_audio_mpi_so) { 392 defines += [ "AUDIO_MPI_SO" ] 393 } 394 if (enable_audio_adm_service) { 395 defines += [ "AUDIO_ADM_SERVICE" ] 396 } 397 if (enable_audio_mpi_service) { 398 defines += [ "AUDIO_MPI_SERVICE" ] 399 } 400 } 401} 402###########################end########################### 403