1# Copyright (c) 2025 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("//foundation/multimedia/player_framework/config.gni") 16import("./../../../multimedia_player_framework_aafwk.gni") 17 18module_output_path = "player_framework/player_framework/soundpool" 19 20ohos_unittest("soundpool_unittest") { 21 module_out_path = module_output_path 22 include_dirs = [ 23 "./", 24 "${multimedia_player_framework_path}/interfaces/inner_api/native/soundpool/include", 25 "${multimedia_player_framework_path}/frameworks/native/soundpool", 26 "${multimedia_player_framework_path}/services/services/engine_intf", 27 "${multimedia_player_framework_path}/test/unittest/common/include", 28 ] 29 30 cflags = [ 31 "-Wall", 32 "-Werror", 33 "-Dprivate=public", 34 "-Dprotected=public", 35 ] 36 37 sources = [ 38 "./audio_renderer_manager_unittest.cpp", 39 "./parallel_stream_manager_test.cpp", 40 "./sound_id_manager_unittest.cpp", 41 "./soundpool_unittest.cpp", 42 "./stream_unittest.cpp", 43 "./cachebuffer_unittest.cpp", 44 ] 45 46 deps = [ 47 "${multimedia_player_framework_path}/frameworks/native/soundpool:soundpool_client", 48 "${multimedia_player_framework_path}/interfaces/inner_api/native:media_client", 49 ] 50 51 external_deps = [ 52 "ability_base:want", 53 "ability_base:zuri", 54 "ability_runtime:ability_manager", 55 "ability_runtime:abilitykit_native", 56 "audio_framework:audio_client", 57 "audio_framework:audio_renderer", 58 "bundle_framework:appexecfwk_base", 59 "c_utils:utils", 60 "ffrt:libffrt", 61 "googletest:gmock", 62 "graphic_surface:surface", 63 "hicollie:libhicollie", 64 "hilog:libhilog", 65 "hisysevent:libhisysevent", 66 "hitrace:hitrace_meter", 67 "init:libbegetutil", 68 "ipc:ipc_core", 69 "qos_manager:qos", 70 ] 71 72 if (player_framework_support_drm) { 73 external_deps += [ "drm_framework:drm_framework" ] 74 } 75 76 resource_config_file = "${multimedia_player_framework_path}/test/unittest/resources/ohos_test.xml" 77} 78