1# Copyright (c) 2023-2024 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 14import("//build/test.gni") 15import("//drivers/peripheral/audio/audio.gni") 16import("//drivers/peripheral/display/display_config.gni") 17import("//test/xts/tools/build/suite.gni") 18 19module_output_path = "hats/audio" 20 21ohos_moduletest_suite("HatsHdfAudioBenchmarkTest") { 22 module_out_path = module_output_path 23 24 include_dirs = [] 25 defines = [] 26 defines += display_defines 27 28 sources = [ 29 "adapter/audio_adapter_benchmarktest.cpp", 30 "capture/audio_capture_benchmarktest.cpp", 31 "manager/audio_manager_benchmarktest.cpp", 32 "render/audio_render_benchmarktest.cpp", 33 "render/audio_render_mmap_benchmarktest.cpp", 34 ] 35 36 if (drivers_peripheral_audio_feature_offload) { 37 sources += [ "render/audio_render_offload_benchmarktest.cpp" ] 38 } 39 40 cflags = [ 41 "-Wall", 42 "-Wextra", 43 "-Werror", 44 "-fsigned-char", 45 "-fno-common", 46 "-fno-strict-aliasing", 47 ] 48 49 deps = [ 50 "//third_party/benchmark", 51 "//third_party/bounds_checking_function:libsec_shared", 52 "//third_party/googletest:gtest_main", 53 ] 54 55 if (is_standard_system) { 56 external_deps = [ 57 "c_utils:utils", 58 "drivers_interface_audio:audio_idl_headers", 59 "drivers_interface_audio:libaudio_proxy_4.0", 60 "hdf_core:libhdf_utils", 61 "hilog:libhilog", 62 ] 63 } else { 64 external_deps = [ "hilog:libhilog" ] 65 } 66 external_deps += [ "ipc:ipc_single" ] 67 68 subsystem_name = "xts" 69 part_name = "hats" 70} 71