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} 21 22if (defined(ohos_lite)) { 23 ###########################LITEOS########################################## 24 ###########################hdf_audio_hdi_server_function_test########################### 25 unittest("hdf_audio_hdi_server_function_test") { 26 sources = [ 27 "../../common/hdi_common/src/audio_hdi_common.cpp", 28 "src/audio_server_function_test.cpp", 29 ] 30 31 include_dirs = [ 32 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 33 "//drivers/peripheral/audio/interfaces/include", 34 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 35 "//drivers/adapter/uhdf2/include/hdi", 36 "//drivers/adapter/uhdf2/shared/include", 37 "//drivers/framework/include/core", 38 "//drivers/framework/include/utils", 39 "//drivers/framework/include/osal", 40 "//drivers/framework/include", 41 "//third_party/bounds_checking_function/include", 42 "//drivers/framework/ability/sbuf/include", 43 "//drivers/framework/utils/include", 44 "//drivers/framework/ability/sbuf/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_server/include", 48 "//third_party/googletest/googletest/include/gtest", 49 ] 50 cflags = [ 51 "-Wall", 52 "-Wextra", 53 "-Werror", 54 "-fsigned-char", 55 "-fno-common", 56 "-fno-strict-aliasing", 57 "-std=c++11", 58 ] 59 } 60} else { 61 module_output_path = "hdf/audio" 62 63 ###########################hdf_audio_hdi_server_function_test########################### 64 ohos_systemtest("hdf_audio_hdi_server_function_test") { 65 module_out_path = module_output_path 66 sources = [ 67 "../../common/hdi_common/src/audio_hdi_common.cpp", 68 "src/audio_server_function_test.cpp", 69 ] 70 71 include_dirs = [ 72 "//drivers/peripheral/audio/hal/hdi_passthrough/include", 73 "//drivers/peripheral/audio/interfaces/include", 74 "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", 75 "//drivers/adapter/uhdf2/include/hdi", 76 "//drivers/adapter/uhdf2/shared/include", 77 "//drivers/framework/include/core", 78 "//drivers/framework/include/utils", 79 "//drivers/framework/include/osal", 80 "//drivers/framework/include", 81 "//third_party/bounds_checking_function/include", 82 "//drivers/framework/ability/sbuf/include", 83 "//drivers/framework/utils/include", 84 "//drivers/framework/ability/sbuf/include", 85 "//drivers/adapter/uhdf2/osal/include", 86 "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", 87 "//drivers/peripheral/audio/test/systemtest/audio_function/audio_server/include", 88 "//third_party/googletest/googletest/include/gtest", 89 ] 90 cflags = [ 91 "-Wall", 92 "-Wextra", 93 "-Werror", 94 "-fsigned-char", 95 "-fno-common", 96 "-fno-strict-aliasing", 97 ] 98 deps = [ 99 "//third_party/googletest:gmock_main", 100 "//third_party/googletest:gtest_main", 101 ] 102 defines = [] 103 if (enable_audio_adm_so) { 104 defines += [ "AUDIO_ADM_SO" ] 105 } 106 if (enable_audio_mpi_so) { 107 defines += [ "AUDIO_MPI_SO" ] 108 } 109 if (enable_audio_adm_service) { 110 defines += [ "AUDIO_ADM_SERVICE" ] 111 } 112 if (enable_audio_mpi_service) { 113 defines += [ "AUDIO_MPI_SERVICE" ] 114 } 115 } 116} 117###########################end########################### 118