1# Copyright (c) 2021-2023 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 14hdf_audio_path = "./../../../.." 15hdf_audio_test_path = "./../.." 16 17if (defined(ohos_lite)) { 18 import("//build/lite/config/test.gni") 19} else { 20 import("//build/test.gni") 21} 22import("$hdf_audio_path/audio.gni") 23 24if (defined(ohos_lite)) { 25 moduletest("hdf_audio_adm_interface_test") { 26 sources = [ 27 "$hdf_audio_test_path/common/adm_common/src/audio_adm_common.cpp", 28 "$hdf_audio_test_path/common/hdi_common/src/audio_hdi_common.cpp", 29 "src/audio_adm_interface_test.cpp", 30 ] 31 include_dirs = [ 32 "$hdf_audio_path/hal/hdi_passthrough/include", 33 "$hdf_audio_path/interfaces/include", 34 "//third_party/bounds_checking_function/include", 35 "$hdf_audio_test_path/common/adm_common/include", 36 "$hdf_audio_test_path/common/hdi_common/include", 37 "//third_party/googletest/googletest/include/gtest", 38 "$hdf_audio_test_path/adm/audio_adm_interface/include", 39 ] 40 41 public_deps = [ 42 "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", 43 "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", 44 "//third_party/bounds_checking_function:libsec_shared", 45 ] 46 } 47} else { 48 module_output_path = "drivers_peripheral_audio/audio" 49 50 ohos_systemtest("hdf_audio_adm_interface_test") { 51 resource_config_file = "./../../../resource/ohos_test.xml" 52 module_out_path = module_output_path 53 sources = [ 54 "$hdf_audio_test_path/common/adm_common/src/audio_adm_common.cpp", 55 "$hdf_audio_test_path/common/hdi_common/src/audio_hdi_common.cpp", 56 "src/audio_adm_interface_test.cpp", 57 ] 58 59 include_dirs = [ 60 "$hdf_audio_path/hal/hdi_passthrough/include", 61 "$hdf_audio_path/interfaces/include", 62 "//third_party/bounds_checking_function/include", 63 "$hdf_audio_test_path/common/adm_common/include", 64 "$hdf_audio_test_path/common/hdi_common/include", 65 "//third_party/googletest/googletest/include/gtest", 66 "$hdf_audio_test_path/adm/audio_adm_interface/include", 67 ] 68 deps = [ 69 "//third_party/googletest:gmock_main", 70 "//third_party/googletest:gtest_main", 71 ] 72 external_deps = [ 73 "c_utils:utils", 74 "hdf_core:libhdf_utils", 75 ] 76 defines = [] 77 if (enable_audio_adm_passthrough) { 78 defines += [ "AUDIO_ADM_SO" ] 79 } 80 if (enable_audio_adm_service) { 81 defines += [ "AUDIO_ADM_SERVICE" ] 82 } 83 } 84} 85