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_attr_test###################### 25 unittest("hdf_audio_hdi_render_attr_test") { 26 sources = [ 27 "../../common/hdi_common/src/audio_hdi_common.cpp", 28 "src/audio_hdirender_attr_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/utils/include", 39 "//drivers/framework/include", 40 "//drivers/framework/core/sec/include", 41 "//drivers/framework/core/shared/include", 42 "//drivers/framework/core/host/include", 43 "//drivers/framework/core/manager/include", 44 "//drivers/framework/core/common/include/host/", 45 "//third_party/bounds_checking_function/include", 46 "//drivers/adapter/khdf/liteos/osal/include", 47 "//drivers/adapter/uhdf2/shared/include", 48 "//drivers/adapter/uhdf2/include/hdi/", 49 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 50 "//third_party/googletest/googletest/include/gtest", 51 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 52 ] 53 cflags = [ 54 "-Wall", 55 "-Wextra", 56 "-Werror", 57 "-fsigned-char", 58 "-fno-common", 59 "-fno-strict-aliasing", 60 ] 61 } 62 63 ###########################end########################### 64 ###########################hdf_audio_hdi_render_control_test###################### 65 unittest("hdf_audio_hdi_render_control_test") { 66 sources = [ 67 "../../common/hdi_common/src/audio_hdi_common.cpp", 68 "src/audio_hdirender_control_test.cpp", 69 ] 70 71 include_dirs = [ 72 "//drivers/peripheral/audio/interfaces/include", 73 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 74 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 75 "//drivers/framework/include/core", 76 "//drivers/framework/include/utils", 77 "//drivers/framework/include/osal", 78 "//drivers/framework/utils/include", 79 "//drivers/framework/include", 80 "//drivers/framework/core/sec/include", 81 "//drivers/framework/core/shared/include", 82 "//drivers/framework/core/host/include", 83 "//drivers/framework/core/manager/include", 84 "//drivers/framework/core/common/include/host/", 85 "//third_party/bounds_checking_function/include", 86 "//drivers/adapter/khdf/liteos/osal/include", 87 "//drivers/adapter/uhdf2/shared/include", 88 "//drivers/adapter/uhdf2/include/hdi/", 89 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 90 "//third_party/googletest/googletest/include/gtest", 91 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 92 ] 93 cflags = [ 94 "-Wall", 95 "-Wextra", 96 "-Werror", 97 "-fsigned-char", 98 "-fno-common", 99 "-fno-strict-aliasing", 100 ] 101 } 102 103 ###########################end########################### 104 ###########################hdf_audio_hdi_render_volume_test###################### 105 unittest("hdf_audio_hdi_render_volume_test") { 106 sources = [ 107 "../../common/hdi_common/src/audio_hdi_common.cpp", 108 "src/audio_hdirender_volume_test.cpp", 109 ] 110 111 include_dirs = [ 112 "//drivers/peripheral/audio/interfaces/include", 113 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 114 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 115 "//drivers/framework/include/core", 116 "//drivers/framework/include/utils", 117 "//drivers/framework/include/osal", 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/render/include", 132 ] 133 cflags = [ 134 "-Wall", 135 "-Wextra", 136 "-Werror", 137 "-fsigned-char", 138 "-fno-common", 139 "-fno-strict-aliasing", 140 ] 141 } 142 143 ###########################end########################### 144 ###########################hdf_audio_hdi_render_scene_test###################### 145 unittest("hdf_audio_hdi_render_scene_test") { 146 sources = [ 147 "../../common/hdi_common/src/audio_hdi_common.cpp", 148 "src/audio_hdirender_scene_test.cpp", 149 ] 150 151 include_dirs = [ 152 "//drivers/peripheral/audio/interfaces/include", 153 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 154 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 155 "//drivers/framework/include/core", 156 "//drivers/framework/include/utils", 157 "//drivers/framework/include/osal", 158 "//drivers/framework/utils/include", 159 "//drivers/framework/include", 160 "//drivers/framework/core/sec/include", 161 "//drivers/framework/core/shared/include", 162 "//drivers/framework/core/host/include", 163 "//drivers/framework/core/manager/include", 164 "//drivers/framework/core/common/include/host/", 165 "//third_party/bounds_checking_function/include", 166 "//drivers/adapter/khdf/liteos/osal/include", 167 "//drivers/adapter/uhdf2/shared/include", 168 "//drivers/adapter/uhdf2/include/hdi/", 169 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 170 "//third_party/googletest/googletest/include/gtest", 171 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 172 ] 173 cflags = [ 174 "-Wall", 175 "-Wextra", 176 "-Werror", 177 "-fsigned-char", 178 "-fno-common", 179 "-fno-strict-aliasing", 180 ] 181 } 182 183 ###########################end########################### 184 ###########################hdf_audio_hdi_render_test###################### 185 unittest("hdf_audio_hdi_render_test") { 186 sources = [ 187 "../../common/hdi_common/src/audio_hdi_common.cpp", 188 "src/audio_hdirender_test.cpp", 189 ] 190 191 include_dirs = [ 192 "//drivers/peripheral/audio/interfaces/include", 193 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 194 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 195 "//drivers/framework/include/core", 196 "//drivers/framework/include/utils", 197 "//drivers/framework/include/osal", 198 "//drivers/framework/utils/include", 199 "//drivers/framework/include", 200 "//drivers/framework/core/sec/include", 201 "//drivers/framework/core/shared/include", 202 "//drivers/framework/core/host/include", 203 "//drivers/framework/core/manager/include", 204 "//drivers/framework/core/common/include/host/", 205 "//third_party/bounds_checking_function/include", 206 "//drivers/adapter/khdf/liteos/osal/include", 207 "//drivers/adapter/uhdf2/shared/include", 208 "//drivers/adapter/uhdf2/include/hdi/", 209 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 210 "//third_party/googletest/googletest/include/gtest", 211 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 212 ] 213 cflags = [ 214 "-Wall", 215 "-Wextra", 216 "-Werror", 217 "-fsigned-char", 218 "-fno-common", 219 "-fno-strict-aliasing", 220 ] 221 } 222} else { 223 ###########################systemtest############################## 224 module_output_path = "audio_device_driver/audio" 225 226 ###########################hdf_audio_hdi_render_attr_test###################### 227 ohos_systemtest("hdf_audio_hdi_render_attr_test") { 228 module_out_path = module_output_path 229 sources = [ 230 "../../common/hdi_common/src/audio_hdi_common.cpp", 231 "src/audio_hdirender_attr_test.cpp", 232 ] 233 234 include_dirs = [ 235 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 236 "//drivers/peripheral/audio/interfaces/include", 237 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 238 "//drivers/adapter/uhdf2/include/hdi", 239 "//drivers/adapter/uhdf2/shared/include", 240 "//drivers/framework/include/core", 241 "//drivers/framework/include/utils", 242 "//drivers/framework/include/osal", 243 "//drivers/framework/include", 244 "//third_party/bounds_checking_function/include", 245 "//drivers/framework/utils/include", 246 "//drivers/adapter/uhdf2/osal/include", 247 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 248 "//third_party/googletest/googletest/include/gtest", 249 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 250 ] 251 cflags = [ 252 "-Wall", 253 "-Wextra", 254 "-Werror", 255 "-fsigned-char", 256 "-fno-common", 257 "-fno-strict-aliasing", 258 ] 259 deps = [ 260 "//third_party/googletest:gmock_main", 261 "//third_party/googletest:gtest_main", 262 ] 263 defines = [] 264 if (enable_audio_adm_so) { 265 defines += [ "AUDIO_ADM_SO" ] 266 } 267 if (enable_audio_mpi_so) { 268 defines += [ "AUDIO_MPI_SO" ] 269 } 270 if (enable_audio_adm_service) { 271 defines += [ "AUDIO_ADM_SERVICE" ] 272 } 273 if (enable_audio_mpi_service) { 274 defines += [ "AUDIO_MPI_SERVICE" ] 275 } 276 } 277 278 ###########################end########################### 279 ###########################hdf_audio_hdi_render_control_test###################### 280 ohos_systemtest("hdf_audio_hdi_render_control_test") { 281 module_out_path = module_output_path 282 sources = [ 283 "../../common/hdi_common/src/audio_hdi_common.cpp", 284 "src/audio_hdirender_control_test.cpp", 285 ] 286 287 include_dirs = [ 288 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 289 "//drivers/peripheral/audio/interfaces/include", 290 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 291 "//drivers/adapter/uhdf2/include/hdi", 292 "//drivers/adapter/uhdf2/shared/include", 293 "//drivers/framework/include/core", 294 "//drivers/framework/include/utils", 295 "//drivers/framework/include/osal", 296 "//drivers/framework/include", 297 "//third_party/bounds_checking_function/include", 298 "//drivers/framework/utils/include", 299 "//drivers/adapter/uhdf2/osal/include", 300 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 301 "//third_party/googletest/googletest/include/gtest", 302 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 303 ] 304 cflags = [ 305 "-Wall", 306 "-Wextra", 307 "-Werror", 308 "-fsigned-char", 309 "-fno-common", 310 "-fno-strict-aliasing", 311 ] 312 deps = [ 313 "//third_party/googletest:gmock_main", 314 "//third_party/googletest:gtest_main", 315 ] 316 defines = [] 317 if (enable_audio_adm_so) { 318 defines += [ "AUDIO_ADM_SO" ] 319 } 320 if (enable_audio_mpi_so) { 321 defines += [ "AUDIO_MPI_SO" ] 322 } 323 if (enable_audio_adm_service) { 324 defines += [ "AUDIO_ADM_SERVICE" ] 325 } 326 if (enable_audio_mpi_service) { 327 defines += [ "AUDIO_MPI_SERVICE" ] 328 } 329 } 330 331 ###########################end########################### 332 ###########################hdf_audio_hdi_render_volume_test###################### 333 ohos_systemtest("hdf_audio_hdi_render_volume_test") { 334 module_out_path = module_output_path 335 sources = [ 336 "../../common/hdi_common/src/audio_hdi_common.cpp", 337 "src/audio_hdirender_volume_test.cpp", 338 ] 339 340 include_dirs = [ 341 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 342 "//drivers/peripheral/audio/interfaces/include", 343 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 344 "//drivers/adapter/uhdf2/include/hdi", 345 "//drivers/adapter/uhdf2/shared/include", 346 "//drivers/framework/include/core", 347 "//drivers/framework/include/utils", 348 "//drivers/framework/include/osal", 349 "//drivers/framework/include", 350 "//third_party/bounds_checking_function/include", 351 "//drivers/framework/utils/include", 352 "//drivers/adapter/uhdf2/osal/include", 353 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 354 "//third_party/googletest/googletest/include/gtest", 355 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 356 ] 357 cflags = [ 358 "-Wall", 359 "-Wextra", 360 "-Werror", 361 "-fsigned-char", 362 "-fno-common", 363 "-fno-strict-aliasing", 364 ] 365 deps = [ 366 "//third_party/googletest:gmock_main", 367 "//third_party/googletest:gtest_main", 368 ] 369 defines = [] 370 if (enable_audio_adm_so) { 371 defines += [ "AUDIO_ADM_SO" ] 372 } 373 if (enable_audio_mpi_so) { 374 defines += [ "AUDIO_MPI_SO" ] 375 } 376 if (enable_audio_adm_service) { 377 defines += [ "AUDIO_ADM_SERVICE" ] 378 } 379 if (enable_audio_mpi_service) { 380 defines += [ "AUDIO_MPI_SERVICE" ] 381 } 382 } 383 384 ###########################end########################### 385 ###########################hdf_audio_hdi_render_scene_test###################### 386 ohos_systemtest("hdf_audio_hdi_render_scene_test") { 387 module_out_path = module_output_path 388 sources = [ 389 "../../common/hdi_common/src/audio_hdi_common.cpp", 390 "src/audio_hdirender_scene_test.cpp", 391 ] 392 393 include_dirs = [ 394 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 395 "//drivers/peripheral/audio/interfaces/include", 396 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 397 "//drivers/adapter/uhdf2/include/hdi", 398 "//drivers/adapter/uhdf2/shared/include", 399 "//drivers/framework/include/core", 400 "//drivers/framework/include/utils", 401 "//drivers/framework/include/osal", 402 "//drivers/framework/include", 403 "//third_party/bounds_checking_function/include", 404 "//drivers/framework/utils/include", 405 "//drivers/adapter/uhdf2/osal/include", 406 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 407 "//third_party/googletest/googletest/include/gtest", 408 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 409 ] 410 cflags = [ 411 "-Wall", 412 "-Wextra", 413 "-Werror", 414 "-fsigned-char", 415 "-fno-common", 416 "-fno-strict-aliasing", 417 ] 418 deps = [ 419 "//third_party/googletest:gmock_main", 420 "//third_party/googletest:gtest_main", 421 ] 422 defines = [] 423 if (enable_audio_adm_so) { 424 defines += [ "AUDIO_ADM_SO" ] 425 } 426 if (enable_audio_mpi_so) { 427 defines += [ "AUDIO_MPI_SO" ] 428 } 429 if (enable_audio_adm_service) { 430 defines += [ "AUDIO_ADM_SERVICE" ] 431 } 432 if (enable_audio_mpi_service) { 433 defines += [ "AUDIO_MPI_SERVICE" ] 434 } 435 } 436 437 ###########################end########################### 438 ###########################hdf_audio_hdi_render_test###################### 439 ohos_systemtest("hdf_audio_hdi_render_test") { 440 module_out_path = module_output_path 441 sources = [ 442 "../../common/hdi_common/src/audio_hdi_common.cpp", 443 "src/audio_hdirender_test.cpp", 444 ] 445 446 include_dirs = [ 447 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 448 "//drivers/peripheral/audio/interfaces/include", 449 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 450 "//drivers/adapter/uhdf2/include/hdi", 451 "//drivers/adapter/uhdf2/shared/include", 452 "//drivers/framework/include/core", 453 "//drivers/framework/include/utils", 454 "//drivers/framework/include/osal", 455 "//drivers/framework/include", 456 "//third_party/bounds_checking_function/include", 457 "//drivers/framework/utils/include", 458 "//drivers/adapter/uhdf2/osal/include", 459 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 460 "//third_party/googletest/googletest/include/gtest", 461 "//drivers/peripheral/audio/test/systemtest/hdi/render/include", 462 ] 463 cflags = [ 464 "-Wall", 465 "-Wextra", 466 "-Werror", 467 "-fsigned-char", 468 "-fno-common", 469 "-fno-strict-aliasing", 470 ] 471 deps = [ 472 "//third_party/googletest:gmock_main", 473 "//third_party/googletest:gtest_main", 474 ] 475 defines = [] 476 if (enable_audio_adm_so) { 477 defines += [ "AUDIO_ADM_SO" ] 478 } 479 if (enable_audio_mpi_so) { 480 defines += [ "AUDIO_MPI_SO" ] 481 } 482 if (enable_audio_adm_service) { 483 defines += [ "AUDIO_ADM_SERVICE" ] 484 } 485 if (enable_audio_mpi_service) { 486 defines += [ "AUDIO_MPI_SERVICE" ] 487 } 488 } 489} 490###########################end########################### 491