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_lib_render_test########################### 25 unittest("hdf_audio_lib_render_test") { 26 sources = [ 27 "../../common/hdi_common/src/audio_hdi_common.cpp", 28 "../../common/lib_common/src/audio_lib_common.cpp", 29 "src/audio_librender_test.cpp", 30 ] 31 32 include_dirs = [ 33 "//drivers/peripheral/audio/supportlibs/adm_adapter/include", 34 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 35 "//drivers/peripheral/audio/interfaces/include", 36 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 37 "//drivers/framework/include/core", 38 "//drivers/framework/include/utils", 39 "//drivers/framework/include/osal", 40 "//drivers/framework/utils/include", 41 "//drivers/framework/include", 42 "//drivers/framework/core/sec/include", 43 "//drivers/framework/core/shared/include", 44 "//drivers/framework/core/host/include", 45 "//drivers/framework/core/manager/include", 46 "//drivers/framework/core/common/include/host/", 47 "//third_party/bounds_checking_function/include", 48 "//drivers/adapter/khdf/liteos/osal/include", 49 "//drivers/adapter/uhdf2/shared/include", 50 "//drivers/adapter/uhdf2/include/hdi/", 51 "//drivers/peripheral/audio/test/systemtest/common/lib_common/include", 52 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 53 "//drivers/peripheral/audio/test/systemtest/adm_interface_lib/render/include", 54 "//third_party/googletest/googletest/include/gtest", 55 ] 56 cflags = [ 57 "-Wall", 58 "-Wextra", 59 "-Werror", 60 "-fsigned-char", 61 "-fno-common", 62 "-fno-strict-aliasing", 63 "-std=c++11", 64 ] 65 66 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 67 } 68} else { 69 module_output_path = "audio_device_driver/audio" 70 71 ###########################hdf_audio_lib_render_test########################### 72 ohos_systemtest("hdf_audio_lib_render_test") { 73 module_out_path = module_output_path 74 sources = [ 75 "../../common/hdi_common/src/audio_hdi_common.cpp", 76 "../../common/lib_common/src/audio_lib_common.cpp", 77 "src/audio_librender_test.cpp", 78 ] 79 80 include_dirs = [ 81 "//drivers/peripheral/audio/supportlibs/adm_adapter/include", 82 "//drivers/peripheral/audio/interfaces/include", 83 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 84 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 85 "//third_party/bounds_checking_function/include", 86 "//drivers/peripheral/audio/test/systemtest/common/lib_common/include", 87 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 88 "//drivers/peripheral/audio/test/systemtest/adm_interface_lib/render/include", 89 "//third_party/googletest/googletest/include/gtest", 90 ] 91 cflags = [ 92 "-Wall", 93 "-Wextra", 94 "-Werror", 95 "-fsigned-char", 96 "-fno-common", 97 "-fno-strict-aliasing", 98 ] 99 deps = [ 100 "//third_party/googletest:gmock_main", 101 "//third_party/googletest:gtest_main", 102 ] 103 external_deps = [ 104 "device_driver_framework:libhdf_utils", 105 "utils_base:utils", 106 ] 107 defines = [] 108 if (enable_audio_adm_so) { 109 defines += [ "AUDIO_ADM_SO" ] 110 } 111 if (enable_audio_mpi_so) { 112 defines += [ "AUDIO_MPI_SO" ] 113 } 114 if (enable_audio_adm_service) { 115 defines += [ "AUDIO_ADM_SERVICE" ] 116 } 117 if (enable_audio_mpi_service) { 118 defines += [ "AUDIO_MPI_SERVICE" ] 119 } 120 } 121} 122###########################end########################### 123