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/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/hdiperformace/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_capture_performace_test##################### 65 unittest("hdf_audio_hdi_capture_performace_test") { 66 sources = [ 67 "../../common/hdi_common/src/audio_hdi_common.cpp", 68 "src/audio_hdicapture_performace_test.cpp", 69 ] 70 71 include_dirs = [ 72 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 73 "//drivers/peripheral/audio/interfaces/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/hdiperformace/include", 92 ] 93 cflags = [ 94 "-Wall", 95 "-Wextra", 96 "-Werror", 97 "-fsigned-char", 98 "-fno-common", 99 "-fno-strict-aliasing", 100 ] 101 } 102} else { 103 ###########################SystemTest########################################## 104 module_output_path = "audio_device_driver/audio" 105 106 ###########################hdf_audio_hdi_render_performace_test##################### 107 ohos_systemtest("hdf_audio_hdi_render_performace_test") { 108 module_out_path = module_output_path 109 sources = [ 110 "../../common/hdi_common/src/audio_hdi_common.cpp", 111 "src/audio_hdirender_performace_test.cpp", 112 ] 113 114 include_dirs = [ 115 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 116 "//drivers/peripheral/audio/interfaces/include", 117 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 118 "//drivers/adapter/uhdf2/include/hdi", 119 "//drivers/adapter/uhdf2/shared/include", 120 "//drivers/framework/include/core", 121 "//drivers/framework/include/utils", 122 "//drivers/framework/include/osal", 123 "//drivers/framework/include", 124 "//third_party/bounds_checking_function/include", 125 "//drivers/framework/utils/include", 126 "//drivers/adapter/uhdf2/osal/include", 127 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 128 "//third_party/googletest/googletest/include/gtest", 129 "//drivers/peripheral/audio/test/systemtest/hdi/hdiperformace/include", 130 ] 131 cflags = [ 132 "-Wall", 133 "-Wextra", 134 "-Werror", 135 "-fsigned-char", 136 "-fno-common", 137 "-fno-strict-aliasing", 138 ] 139 deps = [ 140 "//third_party/googletest:gmock_main", 141 "//third_party/googletest:gtest_main", 142 ] 143 defines = [] 144 if (enable_audio_adm_so) { 145 defines += [ "AUDIO_ADM_SO" ] 146 } 147 if (enable_audio_mpi_so) { 148 defines += [ "AUDIO_MPI_SO" ] 149 } 150 if (enable_audio_adm_service) { 151 defines += [ "AUDIO_ADM_SERVICE" ] 152 } 153 if (enable_audio_mpi_service) { 154 defines += [ "AUDIO_MPI_SERVICE" ] 155 } 156 } 157 158 ###########################end########################### 159 ###########################hdf_audio_hdi_capture_performace_test##################### 160 ohos_systemtest("hdf_audio_hdi_capture_performace_test") { 161 module_out_path = module_output_path 162 sources = [ 163 "../../common/hdi_common/src/audio_hdi_common.cpp", 164 "src/audio_hdicapture_performace_test.cpp", 165 ] 166 167 include_dirs = [ 168 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 169 "//drivers/peripheral/audio/interfaces/include", 170 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 171 "//drivers/adapter/uhdf2/include/hdi", 172 "//drivers/adapter/uhdf2/shared/include", 173 "//drivers/framework/include/core", 174 "//drivers/framework/include/utils", 175 "//drivers/framework/include/osal", 176 "//drivers/framework/include", 177 "//third_party/bounds_checking_function/include", 178 "//drivers/framework/utils/include", 179 "//drivers/adapter/uhdf2/osal/include", 180 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 181 "//third_party/googletest/googletest/include/gtest", 182 "//drivers/peripheral/audio/test/systemtest/hdi/hdiperformace/include", 183 ] 184 cflags = [ 185 "-Wall", 186 "-Wextra", 187 "-Werror", 188 "-fsigned-char", 189 "-fno-common", 190 "-fno-strict-aliasing", 191 ] 192 deps = [ 193 "//third_party/googletest:gmock_main", 194 "//third_party/googletest:gtest_main", 195 ] 196 defines = [] 197 if (enable_audio_adm_so) { 198 defines += [ "AUDIO_ADM_SO" ] 199 } 200 if (enable_audio_mpi_so) { 201 defines += [ "AUDIO_MPI_SO" ] 202 } 203 if (enable_audio_adm_service) { 204 defines += [ "AUDIO_ADM_SERVICE" ] 205 } 206 if (enable_audio_mpi_service) { 207 defines += [ "AUDIO_MPI_SERVICE" ] 208 } 209 } 210} 211###########################end########################### 212