1# Copyright (c) 2022-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/ohos.gni") 15import("//build/ohos_var.gni") 16import("//build/test.gni") 17import("../../../../distributedaudio.gni") 18 19module_out_path = "distributed_audio/common/dfx_utils_test" 20 21config("module_private_config") { 22 visibility = [ ":*" ] 23 24 include_dirs = [ 25 "include", 26 "${audio_control_path}/controlsource/include", 27 "${audio_hdi_proxy_path}/include", 28 "${audio_processor_path}/interface", 29 "${audio_transport_path}/decodetransport/include", 30 "${audio_transport_path}/encodetransport/include", 31 "${audio_transport_path}/interface", 32 "${audio_transport_path}/receiverengine/include", 33 "${audio_transport_path}/senderengine/include", 34 "${common_path}/include", 35 "${common_path}/dfx_utils/include", 36 "${distributedaudio_path}/audiohandler/include", 37 "${driver_audio_path}/include", 38 "${services_path}/hdfaudioclient/include", 39 "${hdf_service_path}/hdi_service/common/include", 40 "${interfaces_path}/inner_kits/native_cpp/audio_sink/include", 41 "${interfaces_path}/inner_kits/native_cpp/audio_source/include", 42 "${innerkits_path}/native_cpp/audio_source/include", 43 "${innerkits_path}/native_cpp/audio_sink/include", 44 "${services_path}/common/audioparam", 45 "${services_path}/common/audiodata/include", 46 "${services_path}/common/audioeventcallback", 47 "${services_path}/audiomanager/managersource/include", 48 "//third_party/json/include", 49 "${fwk_common_path}/utils/include", 50 "${mediastandardfwk_path}/audiocapturer/include", 51 "${mediastandardfwk_path}/audiocommon/include", 52 "${mediastandardfwk_path}/audiorenderer/include", 53 "${mediastandardfwk_path}/audiomanager/include", 54 ] 55} 56 57## UnitTest daudio_dfx_test 58ohos_unittest("DAudioDfxTest") { 59 module_out_path = module_out_path 60 61 sources = 62 [ "${common_path}/dfx_utils/test/unittest/src/daudio_hidumper_test.cpp" ] 63 64 configs = [ ":module_private_config" ] 65 66 deps = [ 67 "${services_path}/audiomanager/servicesource:distributed_audio_source", 68 "${services_path}/common:distributed_audio_utils", 69 "//third_party/googletest:gmock", 70 "//third_party/googletest:gtest_main", 71 ] 72 73 external_deps = [ 74 "audio_framework:audio_capturer", 75 "c_utils:utils", 76 "dsoftbus:softbus_client", 77 "hisysevent:libhisysevent", 78 "hitrace:hitrace_meter", 79 "ipc:ipc_core", 80 "samgr:samgr_proxy", 81 ] 82} 83 84group("daudio_dfx_test") { 85 testonly = true 86 deps = [ ":DAudioDfxTest" ] 87} 88