1094332d3Sopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd. 2094332d3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3094332d3Sopenharmony_ci# you may not use this file except in compliance with the License. 4094332d3Sopenharmony_ci# You may obtain a copy of the License at 5094332d3Sopenharmony_ci# 6094332d3Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7094332d3Sopenharmony_ci# 8094332d3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9094332d3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10094332d3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11094332d3Sopenharmony_ci# See the License for the specific language governing permissions and 12094332d3Sopenharmony_ci# limitations under the License. 13094332d3Sopenharmony_ci 14094332d3Sopenharmony_cihdf_audio_path = "./../../../../.." 15094332d3Sopenharmony_cihdf_audio_test_path = "./../../.." 16094332d3Sopenharmony_ci 17094332d3Sopenharmony_ciif (defined(ohos_lite)) { 18094332d3Sopenharmony_ci import("//build/lite/config/test.gni") 19094332d3Sopenharmony_ci} else { 20094332d3Sopenharmony_ci import("//build/test.gni") 21094332d3Sopenharmony_ci} 22094332d3Sopenharmony_ciimport("$hdf_audio_path/audio.gni") 23094332d3Sopenharmony_ci 24094332d3Sopenharmony_ciif (defined(ohos_lite)) { 25094332d3Sopenharmony_ci moduletest("hdf_audio_lib_capture_hardwaredependence_test") { 26094332d3Sopenharmony_ci if (defined(enable_liteos_test_bin) && enable_liteos_test_bin == true) { 27094332d3Sopenharmony_ci output_extension = "bin" 28094332d3Sopenharmony_ci output_dir = "$root_out_dir/test/moduletest/hdf" 29094332d3Sopenharmony_ci } 30094332d3Sopenharmony_ci 31094332d3Sopenharmony_ci sources = [ 32094332d3Sopenharmony_ci "$hdf_audio_test_path/common/hdi_common/src/audio_hdi_common.cpp", 33094332d3Sopenharmony_ci "$hdf_audio_test_path/common/lib_common/src/audio_lib_common.cpp", 34094332d3Sopenharmony_ci "src/audio_libcapture_hardwaredependence_test.cpp", 35094332d3Sopenharmony_ci ] 36094332d3Sopenharmony_ci 37094332d3Sopenharmony_ci include_dirs = [ 38094332d3Sopenharmony_ci "$hdf_audio_path/supportlibs/adm_adapter/include", 39094332d3Sopenharmony_ci "$hdf_audio_path/supportlibs/interfaces/include", 40094332d3Sopenharmony_ci "$hdf_audio_path/hal/hdi_passthrough/include", 41094332d3Sopenharmony_ci "$hdf_audio_path/interfaces/include", 42094332d3Sopenharmony_ci "//third_party/bounds_checking_function/include", 43094332d3Sopenharmony_ci "$hdf_audio_test_path/common/lib_common/include", 44094332d3Sopenharmony_ci "$hdf_audio_test_path/common/hdi_common/include", 45094332d3Sopenharmony_ci "$hdf_audio_test_path/supportlibs/hardwaredependence/capture/include", 46094332d3Sopenharmony_ci "//third_party/googletest/googletest/include/gtest", 47094332d3Sopenharmony_ci ] 48094332d3Sopenharmony_ci 49094332d3Sopenharmony_ci public_deps = [ 50094332d3Sopenharmony_ci "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", 51094332d3Sopenharmony_ci "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", 52094332d3Sopenharmony_ci "//third_party/bounds_checking_function:libsec_shared", 53094332d3Sopenharmony_ci ] 54094332d3Sopenharmony_ci } 55094332d3Sopenharmony_ci} else { 56094332d3Sopenharmony_ci module_output_path = "drivers_peripheral_audio/audio" 57094332d3Sopenharmony_ci 58094332d3Sopenharmony_ci ohos_systemtest("hdf_audio_lib_capture_hardwaredependence_test") { 59094332d3Sopenharmony_ci module_out_path = module_output_path 60094332d3Sopenharmony_ci sources = [ 61094332d3Sopenharmony_ci "$hdf_audio_test_path/common/hdi_common/src/audio_hdi_common.cpp", 62094332d3Sopenharmony_ci "$hdf_audio_test_path/common/lib_common/src/audio_lib_common.cpp", 63094332d3Sopenharmony_ci "src/audio_libcapture_hardwaredependence_test.cpp", 64094332d3Sopenharmony_ci ] 65094332d3Sopenharmony_ci 66094332d3Sopenharmony_ci include_dirs = [ 67094332d3Sopenharmony_ci "$hdf_audio_path/supportlibs/adm_adapter/include", 68094332d3Sopenharmony_ci "$hdf_audio_path/supportlibs/interfaces/include", 69094332d3Sopenharmony_ci "$hdf_audio_path/hal/hdi_passthrough/include", 70094332d3Sopenharmony_ci "$hdf_audio_path/interfaces/include", 71094332d3Sopenharmony_ci "$hdf_audio_test_path/common/lib_common/include", 72094332d3Sopenharmony_ci "$hdf_audio_test_path/common/hdi_common/include", 73094332d3Sopenharmony_ci "$hdf_audio_test_path/supportlibs/hardwaredependence/capture/include", 74094332d3Sopenharmony_ci ] 75094332d3Sopenharmony_ci 76094332d3Sopenharmony_ci deps = [ 77094332d3Sopenharmony_ci "//third_party/googletest:gmock_main", 78094332d3Sopenharmony_ci "//third_party/googletest:gtest_main", 79094332d3Sopenharmony_ci ] 80094332d3Sopenharmony_ci external_deps = [ "hdf_core:libhdf_utils" ] 81094332d3Sopenharmony_ci if (enable_c_utils) { 82094332d3Sopenharmony_ci external_deps += [ "c_utils:utils" ] 83094332d3Sopenharmony_ci } 84094332d3Sopenharmony_ci external_deps += [ "bounds_checking_function:libsec_shared" ] 85094332d3Sopenharmony_ci defines = [] 86094332d3Sopenharmony_ci if (enable_audio_adm_passthrough) { 87094332d3Sopenharmony_ci defines += [ "AUDIO_ADM_SO" ] 88094332d3Sopenharmony_ci } 89094332d3Sopenharmony_ci if (enable_audio_adm_service) { 90094332d3Sopenharmony_ci defines += [ "AUDIO_ADM_SERVICE" ] 91094332d3Sopenharmony_ci } 92094332d3Sopenharmony_ci } 93094332d3Sopenharmony_ci} 94