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_capture_hardware_dependence_test") { 24 sources = [ 25 "../../../common/hdi_common/src/audio_hdi_common.cpp", 26 "src/audio_hdicapture_hardware_dependence_test.cpp", 27 ] 28 29 include_dirs = [ 30 "//drivers/peripheral/audio/interfaces/include", 31 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 32 "//third_party/bounds_checking_function/include", 33 "//drivers/hdf_core/adapter/khdf/liteos/osal/include", 34 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 35 "//drivers/hdf_core/framework/include/utils", 36 "//drivers/hdf_core/framework/include/core", 37 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 38 "//third_party/googletest/googletest/include/gtest", 39 ] 40 deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 41 } 42} else { 43 module_output_path = "drivers_peripheral_audio/audio" 44 45 ohos_systemtest("hdf_audio_hdi_capture_hardware_dependence_test") { 46 module_out_path = module_output_path 47 sources = [ 48 "../../../common/hdi_common/src/audio_hdi_common.cpp", 49 "src/audio_hdicapture_hardware_dependence_test.cpp", 50 ] 51 52 include_dirs = [ 53 "//drivers/peripheral/audio/interfaces/include", 54 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 55 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 56 ] 57 deps = [ 58 "//third_party/googletest:gmock_main", 59 "//third_party/googletest:gtest_main", 60 ] 61 external_deps = [ 62 "c_utils:utils", 63 "hdf_core:libhdf_utils", 64 ] 65 defines = [] 66 if (enable_audio_adm_passthrough) { 67 deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 68 defines += [ "AUDIO_ADM_SO" ] 69 } 70 if (enable_audio_adm_service) { 71 deps += 72 [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] 73 defines += [ "AUDIO_ADM_SERVICE" ] 74 } 75 if ("${product_name}" == "rk3568") { 76 defines += [ "PRODUCT_RK3568" ] 77 } 78 if (defined(drivers_peripheral_audio_alsa_lib) && 79 drivers_peripheral_audio_alsa_lib == true) { 80 defines += [ "ALSA_LIB_MODE" ] 81 } 82 if (!drivers_peripheral_audio_rich_device) { 83 defines += [ "FEATURE_SMALL_DEVICE" ] 84 } 85 } 86} 87