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} else { 17 import("//build/test.gni") 18 import("//drivers/adapter/uhdf2/uhdf.gni") 19 import("//drivers/peripheral/audio/audio.gni") 20} 21if (defined(ohos_lite)) { 22 ###########################LITEOS########################################## 23 ###########################hdf_audio_smartpa_test########################### 24 unittest("hdf_audio_smartpa_test") { 25 sources = [ 26 "../../common/adm_common/src/audio_adm_common.cpp", 27 "../../common/hdi_common/src/audio_hdi_common.cpp", 28 "../../common/lib_common/src/audio_lib_common.cpp", 29 "src/audio_smartpa_test.cpp", 30 ] 31 32 include_dirs = [ 33 "//drivers/peripheral/audio/supportlibs/adm_adapter/include", 34 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 35 "//drivers/peripheral/audio/interfaces/include", 36 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 37 "//drivers/adapter/uhdf2/include/hdi", 38 "//drivers/adapter/uhdf2/shared/include", 39 "//drivers/framework/include/core", 40 "//drivers/framework/include/utils", 41 "//drivers/framework/include/osal", 42 "//drivers/framework/include", 43 "//third_party/bounds_checking_function/include", 44 "//drivers/framework/utils/include", 45 "//drivers/adapter/uhdf2/osal/include", 46 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 47 "//drivers/peripheral/audio/test/systemtest/audio_function/audio_smartpa/include", 48 "//drivers/peripheral/audio/test/systemtest/common/lib_common/include", 49 "//drivers/peripheral/audio/test/systemtest/common/adm_common/include", 50 "//drivers/peripheral/audio/test/systemtest/adm_interface_lib/render/include", 51 "//drivers/peripheral/audio/test/systemtest/adm/audio_adm_interface/include", 52 "//third_party/googletest/googletest/include/gtest", 53 ] 54 cflags = [ 55 "-Wall", 56 "-Wextra", 57 "-Werror", 58 "-fsigned-char", 59 "-fno-common", 60 "-fno-strict-aliasing", 61 "-std=c++11", 62 ] 63 64 deps = [ 65 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 66 "//drivers/adapter/uhdf/manager:hdf_core", 67 "//drivers/adapter/uhdf/posix:hdf_posix_osal", 68 "//third_party/bounds_checking_function:libsec_shared", 69 ] 70 } 71} else { 72 module_output_path = "audio_device_driver/audio" 73 74 ###########################systemtest############################## 75 ###########################hdf_audio_smartpa_test########################### 76 ohos_systemtest("hdf_audio_smartpa_test") { 77 module_out_path = module_output_path 78 sources = [ 79 "../../common/adm_common/src/audio_adm_common.cpp", 80 "../../common/hdi_common/src/audio_hdi_common.cpp", 81 "../../common/lib_common/src/audio_lib_common.cpp", 82 "src/audio_smartpa_test.cpp", 83 ] 84 85 include_dirs = [ 86 "//drivers/peripheral/audio/supportlibs/adm_adapter/include", 87 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 88 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 89 "//drivers/peripheral/audio/interfaces/include", 90 "//third_party/bounds_checking_function/include", 91 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 92 "//drivers/peripheral/audio/test/systemtest/audio_function/audio_smartpa/include", 93 "//drivers/peripheral/audio/test/systemtest/common/lib_common/include", 94 "//drivers/peripheral/audio/test/systemtest/common/adm_common/include", 95 "//drivers/peripheral/audio/test/systemtest/adm_interface_lib/render/include", 96 "//drivers/peripheral/audio/test/systemtest/adm/audio_adm_interface/include", 97 "//third_party/googletest/googletest/include/gtest", 98 ] 99 cflags = [ 100 "-Wall", 101 "-Wextra", 102 "-Werror", 103 "-fsigned-char", 104 "-fno-common", 105 "-fno-strict-aliasing", 106 ] 107 deps = [ 108 "//third_party/googletest:gmock_main", 109 "//third_party/googletest:gtest_main", 110 ] 111 external_deps = [ 112 "device_driver_framework:libhdf_host", 113 "device_driver_framework:libhdf_ipc_adapter", 114 "device_driver_framework:libhdf_utils", 115 "device_driver_framework:libhdi", 116 "utils_base:utils", 117 ] 118 defines = [] 119 if (enable_audio_adm_so) { 120 defines += [ "AUDIO_ADM_SO" ] 121 } 122 if (enable_audio_mpi_so) { 123 defines += [ "AUDIO_MPI_SO" ] 124 } 125 if (enable_audio_adm_service) { 126 defines += [ "AUDIO_ADM_SERVICE" ] 127 } 128 if (enable_audio_mpi_service) { 129 defines += [ "AUDIO_MPI_SERVICE" ] 130 } 131 } 132} 133###########################end########################### 134