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 import("//drivers/peripheral/audio/audio.gni") 17} else { 18 import("//build/test.gni") 19 import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 20 import("//drivers/peripheral/audio/audio.gni") 21} 22 23if (defined(ohos_lite)) { 24 ###########################LITEOS########################### 25 ###########################hdf_audio_hdi_manager_test########################### 26 unittest("hdf_audio_hdi_manager_test") { 27 sources = [ "//drivers/peripheral/audio/test/unittest/hdi/passthrough/manager/src/audio_manager_test.cpp" ] 28 29 include_dirs = [ 30 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 31 "//drivers/peripheral/audio/interfaces/include", 32 "//drivers/peripheral/audio/supportlibs/adm_adapter/include", 33 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 34 "//drivers/hdf_core/adapter/uhdf2/shared/include", 35 "//drivers/hdf_core/framework/include/core", 36 "//drivers/hdf_core/framework/include/utils", 37 "//drivers/hdf_core/framework/include/osal", 38 "//drivers/hdf_core/framework/include", 39 "//third_party/bounds_checking_function/include", 40 "//drivers/hdf_core/framework/utils/include", 41 "//drivers/hdf_core/adapter/uhdf2/osal/include", 42 "//third_party/googletest/googletest/include/gtest", 43 ] 44 45 deps = [ 46 "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils", 47 "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio", 48 "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio_common", 49 "//third_party/googletest:gmock_main", 50 "//third_party/googletest:gtest_main", 51 ] 52 } 53} else { 54 ###########################hdf_audio_hdi_manager_test########################### 55 ohos_unittest("hdf_audio_hdi_manager_test") { 56 module_out_path = "hdf/audio" 57 sources = [ "//drivers/peripheral/audio/test/unittest/hdi/passthrough/manager/src/audio_manager_test.cpp" ] 58 59 include_dirs = [ 60 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 61 "//drivers/peripheral/audio/interfaces/include", 62 "//drivers/peripheral/audio/supportlibs/adm_adapter/include", 63 "//third_party/bounds_checking_function/include", 64 "//third_party/googletest/googletest/include/gtest", 65 ] 66 67 deps = [ 68 "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio_common", 69 "//third_party/googletest:gmock_main", 70 "//third_party/googletest:gtest_main", 71 ] 72 if (!drivers_peripheral_audio_user_mode) { 73 deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 74 external_deps = [ 75 "c_utils:utils", 76 "hdf_core:libhdf_utils", 77 ] 78 } else { 79 deps += [ "//device/soc/${product_company}/common/hal/media:hdi_audio" ] 80 } 81 } 82} 83