1# Copyright (c) 2022 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/hdf_core/adapter/uhdf2/uhdf.gni") 19} 20import("//drivers/peripheral/audio/audio.gni") 21 22if (defined(ohos_lite)) { 23 moduletest("hdf_audio_hdi_render_attr_advance_test") { 24 sources = [ 25 "../../../common/hdi_common/src/audio_hdi_common.cpp", 26 "src/audio_hdirender_attr_test.cpp", 27 ] 28 29 include_dirs = [ 30 "//drivers/peripheral/audio/interfaces/include", 31 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 32 "//drivers/hdf_core/framework/include/core", 33 "//drivers/hdf_core/framework/include/utils", 34 "//drivers/hdf_core/framework/include/osal", 35 "//drivers/hdf_core/framework/utils/include", 36 "//drivers/hdf_core/framework/include", 37 "//drivers/hdf_core/framework/core/sec/include", 38 "//drivers/hdf_core/framework/core/shared/include", 39 "//drivers/hdf_core/framework/core/host/include", 40 "//drivers/hdf_core/framework/core/manager/include", 41 "//drivers/hdf_core/framework/core/common/include/host/", 42 "//third_party/bounds_checking_function/include", 43 "//drivers/hdf_core/adapter/khdf/liteos/osal/include", 44 "//drivers/hdf_core/adapter/uhdf2/shared/include", 45 "//drivers/hdf_core/adapter/uhdf2/include/hdi/", 46 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 47 "//third_party/googletest/googletest/include/gtest", 48 ] 49 deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 50 } 51 moduletest("hdf_audio_hdi_render_scene_advance_test") { 52 sources = [ 53 "../../../common/hdi_common/src/audio_hdi_common.cpp", 54 "src/audio_hdirender_scene_test.cpp", 55 ] 56 57 include_dirs = [ 58 "//drivers/peripheral/audio/interfaces/include", 59 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 60 "//drivers/hdf_core/framework/include/core", 61 "//drivers/hdf_core/framework/include/utils", 62 "//drivers/hdf_core/framework/include/osal", 63 "//drivers/hdf_core/framework/utils/include", 64 "//drivers/hdf_core/framework/include", 65 "//drivers/hdf_core/framework/core/sec/include", 66 "//drivers/hdf_core/framework/core/shared/include", 67 "//drivers/hdf_core/framework/core/host/include", 68 "//drivers/hdf_core/framework/core/manager/include", 69 "//drivers/hdf_core/framework/core/common/include/host/", 70 "//third_party/bounds_checking_function/include", 71 "//drivers/hdf_core/adapter/khdf/liteos/osal/include", 72 "//drivers/hdf_core/adapter/uhdf2/shared/include", 73 "//drivers/hdf_core/adapter/uhdf2/include/hdi/", 74 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 75 "//third_party/googletest/googletest/include/gtest", 76 ] 77 deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 78 } 79 moduletest("hdf_audio_hdi_render_advance_test") { 80 sources = [ 81 "../../../common/hdi_common/src/audio_hdi_common.cpp", 82 "src/audio_hdirender_test.cpp", 83 ] 84 85 include_dirs = [ 86 "//drivers/peripheral/audio/interfaces/include", 87 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 88 "//drivers/hdf_core/framework/include/core", 89 "//drivers/hdf_core/framework/include/utils", 90 "//drivers/hdf_core/framework/include/osal", 91 "//drivers/hdf_core/framework/utils/include", 92 "//drivers/hdf_core/framework/include", 93 "//drivers/hdf_core/framework/core/sec/include", 94 "//drivers/hdf_core/framework/core/shared/include", 95 "//drivers/hdf_core/framework/core/host/include", 96 "//drivers/hdf_core/framework/core/manager/include", 97 "//drivers/hdf_core/framework/core/common/include/host/", 98 "//third_party/bounds_checking_function/include", 99 "//drivers/hdf_core/adapter/khdf/liteos/osal/include", 100 "//drivers/hdf_core/adapter/uhdf2/shared/include", 101 "//drivers/hdf_core/adapter/uhdf2/include/hdi/", 102 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 103 "//third_party/googletest/googletest/include/gtest", 104 ] 105 deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 106 } 107} else { 108 module_output_path = "drivers_peripheral_audio/audio" 109 110 ohos_systemtest("hdf_audio_hdi_render_attr_advance_test") { 111 module_out_path = module_output_path 112 resource_config_file = 113 "//drivers/peripheral/audio/test/resource/ohos_test.xml" 114 sources = [ 115 "../../../common/hdi_common/src/audio_hdi_common.cpp", 116 "src/audio_hdirender_attr_test.cpp", 117 ] 118 119 include_dirs = [ 120 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 121 "//drivers/peripheral/audio/interfaces/include", 122 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 123 "//drivers/hdf_core/adapter/uhdf2/shared/include", 124 "//drivers/hdf_core/framework/include/core", 125 "//drivers/hdf_core/framework/include/utils", 126 "//drivers/hdf_core/framework/include/osal", 127 "//drivers/hdf_core/framework/include", 128 "//third_party/bounds_checking_function/include", 129 "//drivers/hdf_core/framework/utils/include", 130 "//drivers/hdf_core/adapter/uhdf2/osal/include", 131 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 132 "//third_party/googletest/googletest/include/gtest", 133 ] 134 135 deps = [ 136 "//third_party/googletest:gmock_main", 137 "//third_party/googletest:gtest_main", 138 ] 139 defines = [] 140 if (enable_audio_adm_passthrough) { 141 deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 142 defines += [ "AUDIO_ADM_SO" ] 143 } 144 if (enable_audio_adm_service) { 145 deps += 146 [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] 147 defines += [ "AUDIO_ADM_SERVICE" ] 148 } 149 } 150 ohos_systemtest("hdf_audio_hdi_render_scene_advance_test") { 151 module_out_path = module_output_path 152 resource_config_file = 153 "//drivers/peripheral/audio/test/resource/ohos_test.xml" 154 sources = [ 155 "../../../common/hdi_common/src/audio_hdi_common.cpp", 156 "src/audio_hdirender_scene_test.cpp", 157 ] 158 159 include_dirs = [ 160 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 161 "//drivers/peripheral/audio/interfaces/include", 162 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 163 "//drivers/hdf_core/adapter/uhdf2/shared/include", 164 "//drivers/hdf_core/framework/include/core", 165 "//drivers/hdf_core/framework/include/utils", 166 "//drivers/hdf_core/framework/include/osal", 167 "//drivers/hdf_core/framework/include", 168 "//third_party/bounds_checking_function/include", 169 "//drivers/hdf_core/framework/utils/include", 170 "//drivers/hdf_core/adapter/uhdf2/osal/include", 171 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 172 "//third_party/googletest/googletest/include/gtest", 173 ] 174 175 deps = [ 176 "//third_party/googletest:gmock_main", 177 "//third_party/googletest:gtest_main", 178 ] 179 defines = [] 180 if (enable_audio_adm_passthrough) { 181 deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 182 defines += [ "AUDIO_ADM_SO" ] 183 } 184 if (enable_audio_adm_service) { 185 deps += 186 [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] 187 defines += [ "AUDIO_ADM_SERVICE" ] 188 } 189 } 190 191 ohos_systemtest("hdf_audio_hdi_render_advance_test") { 192 module_out_path = module_output_path 193 resource_config_file = 194 "//drivers/peripheral/audio/test/resource/ohos_test.xml" 195 sources = [ 196 "../../../common/hdi_common/src/audio_hdi_common.cpp", 197 "src/audio_hdirender_test.cpp", 198 ] 199 200 include_dirs = [ 201 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 202 "//drivers/peripheral/audio/interfaces/include", 203 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 204 "//drivers/hdf_core/adapter/uhdf2/shared/include", 205 "//drivers/hdf_core/framework/include/core", 206 "//drivers/hdf_core/framework/include/utils", 207 "//drivers/hdf_core/framework/include/osal", 208 "//drivers/hdf_core/framework/include", 209 "//third_party/bounds_checking_function/include", 210 "//drivers/hdf_core/framework/utils/include", 211 "//drivers/hdf_core/adapter/uhdf2/osal/include", 212 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 213 "//third_party/googletest/googletest/include/gtest", 214 ] 215 216 deps = [ 217 "//third_party/googletest:gmock_main", 218 "//third_party/googletest:gtest_main", 219 ] 220 defines = [] 221 if (enable_audio_adm_passthrough) { 222 deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 223 defines += [ "AUDIO_ADM_SO" ] 224 } 225 if (enable_audio_adm_service) { 226 deps += 227 [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] 228 defines += [ "AUDIO_ADM_SERVICE" ] 229 } 230 if ("${product_name}" == "rk3568") { 231 defines += [ "PRODUCT_RK3568" ] 232 } 233 } 234} 235