1# Copyright (c) 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 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_unit_test") { 21 module_out_path = module_output_path 22 include_dirs = [ 23 "./include", 24 "${multimedia_player_framework_path}/frameworks/native/soundpool", 25 "${multimedia_player_framework_path}/test/unittest/common/include", 26 "${multimedia_player_framework_path}/interfaces/inner_api/native/soundpool/include", 27 ] 28 29 cflags = [ 30 "-Wall", 31 "-Werror", 32 "-Dprivate=public", 33 "-Dprotected=public", 34 ] 35 36 if (player_framework_support_jssoundpool) { 37 sources = [ 38 "src/sound_id_manager_unit_test.cpp", 39 "src/soundpool_mock.cpp", 40 "src/soundpool_unit_test.cpp", 41 "src/soundpool_unit_test_parallel.cpp", 42 "src/stream_id_manager_unit_test.cpp", 43 ] 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_client", 58 "audio_framework:audio_renderer", 59 "audio_framework:audio_renderer", 60 "bundle_framework:appexecfwk_base", 61 "c_utils:utils", 62 "ffrt:libffrt", 63 "ffrt:libffrt", 64 "graphic_surface:surface", 65 "hicollie:libhicollie", 66 "hilog:libhilog", 67 "hilog:libhilog", 68 "hisysevent:libhisysevent", 69 "hitrace:hitrace_meter", 70 "init:libbegetutil", 71 "ipc:ipc_core", 72 "qos_manager:qos", 73 ] 74 75 resource_config_file = "${multimedia_player_framework_path}/test/unittest/resources/ohos_test.xml" 76} 77