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    "${interfaces_path}/inner_kits/native_cpp/audio_sink/include",
38    "${interfaces_path}/inner_kits/native_cpp/audio_source/include",
39    "${innerkits_path}/native_cpp/audio_source/include",
40    "${innerkits_path}/native_cpp/audio_sink/include",
41    "${services_path}/common/audioparam",
42    "${services_path}/common/audiodata/include",
43    "${services_path}/common/audioeventcallback",
44    "${services_path}/audiomanager/managersource/include",
45  ]
46}
47
48## UnitTest daudio_dfx_test
49ohos_unittest("DAudioDfxTest") {
50  module_out_path = module_out_path
51
52  cflags = [
53    "-g",
54    "-O0",
55    "-Wno-unused-variable",
56    "-fno-omit-frame-pointer",
57    "-Dprivate=public",
58    "-Dprotected=public",
59  ]
60
61  sources = [
62    "${common_path}/dfx_utils/test/unittest/src/daudio_hidumper_test.cpp",
63    "${common_path}/dfx_utils/test/unittest/src/daudio_hitrace_test.cpp",
64  ]
65  configs = [ ":module_private_config" ]
66
67  deps = [
68    "${services_path}/audiomanager/servicesource:distributed_audio_source",
69    "${services_path}/common:distributed_audio_utils",
70  ]
71
72  external_deps = [
73    "audio_framework:audio_capturer",
74    "audio_framework:audio_client",
75    "audio_framework:audio_renderer",
76    "cJSON:cjson",
77    "c_utils:utils",
78    "distributed_hardware_fwk:distributedhardwareutils",
79    "drivers_interface_distributed_audio:libdaudio_proxy_1.0",
80    "dsoftbus:softbus_client",
81    "googletest:gmock",
82    "hisysevent:libhisysevent",
83    "hitrace:hitrace_meter",
84    "ipc:ipc_core",
85    "samgr:samgr_proxy",
86  ]
87}
88
89group("daudio_dfx_test") {
90  testonly = true
91  deps = [ ":DAudioDfxTest" ]
92}
93