• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "${common_path}/dfx_utils/test/unittest/src/daudio_radar_test.cpp",
65  ]
66  configs = [ ":module_private_config" ]
67
68  deps = [
69    "${services_path}/audiomanager/servicesource:distributed_audio_source",
70    "${services_path}/common:distributed_audio_utils",
71  ]
72
73  external_deps = [
74    "audio_framework:audio_capturer",
75    "audio_framework:audio_client",
76    "audio_framework:audio_renderer",
77    "cJSON:cjson",
78    "c_utils:utils",
79    "distributed_hardware_fwk:distributedhardwareutils",
80    "drivers_interface_distributed_audio:libdaudio_proxy_1.0",
81    "dsoftbus:softbus_client",
82    "googletest:gmock",
83    "hilog:libhilog",
84    "hisysevent:libhisysevent",
85    "hitrace:hitrace_meter",
86    "ipc:ipc_core",
87    "samgr:samgr_proxy",
88  ]
89}
90
91group("daudio_dfx_test") {
92  testonly = true
93  deps = [ ":DAudioDfxTest" ]
94}
95