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_manager_advance_test") { 24 sources = [ 25 "../../../common/hdi_common/src/audio_hdi_common.cpp", 26 "src/audio_hdimanager_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} else { 52 module_output_path = "drivers_peripheral_audio/audio" 53 54 ohos_systemtest("hdf_audio_hdi_manager_advance_test") { 55 module_out_path = module_output_path 56 sources = [ 57 "../../../common/hdi_common/src/audio_hdi_common.cpp", 58 "src/audio_hdimanager_test.cpp", 59 ] 60 61 include_dirs = [ 62 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 63 "//drivers/peripheral/audio/interfaces/include", 64 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 65 "//drivers/hdf_core/adapter/uhdf2/shared/include", 66 "//drivers/hdf_core/adapter/uhdf2/osal/include", 67 "//drivers/hdf_core/framework/include/core", 68 "//drivers/hdf_core/framework/include/utils", 69 "//drivers/hdf_core/framework/include/osal", 70 "//drivers/hdf_core/framework/include", 71 "//drivers/hdf_core/framework/utils/include", 72 "//third_party/bounds_checking_function/include", 73 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 74 "//third_party/googletest/googletest/include/gtest", 75 ] 76 77 deps = [ 78 "//third_party/googletest:gmock_main", 79 "//third_party/googletest:gtest_main", 80 ] 81 82 defines = [] 83 if (enable_audio_adm_passthrough) { 84 deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] 85 defines += [ "AUDIO_ADM_SO" ] 86 } 87 if (enable_audio_adm_service) { 88 deps += 89 [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] 90 defines += [ "AUDIO_ADM_SERVICE" ] 91 } 92 } 93} 94