150a07fd2Sopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
250a07fd2Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
350a07fd2Sopenharmony_ci# you may not use this file except in compliance with the License.
450a07fd2Sopenharmony_ci# You may obtain a copy of the License at
550a07fd2Sopenharmony_ci#
650a07fd2Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
750a07fd2Sopenharmony_ci#
850a07fd2Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
950a07fd2Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1050a07fd2Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1150a07fd2Sopenharmony_ci# See the License for the specific language governing permissions and
1250a07fd2Sopenharmony_ci# limitations under the License.
1350a07fd2Sopenharmony_ci
1450a07fd2Sopenharmony_ciimport("//build/ohos.gni")
1550a07fd2Sopenharmony_ciimport("//build/ohos_var.gni")
1650a07fd2Sopenharmony_ciimport("//build/test.gni")
1750a07fd2Sopenharmony_ciimport("../../../../distributedaudio.gni")
1850a07fd2Sopenharmony_ci
1950a07fd2Sopenharmony_cimodule_out_path = "distributed_audio/common/dfx_utils_test"
2050a07fd2Sopenharmony_ci
2150a07fd2Sopenharmony_ciconfig("module_private_config") {
2250a07fd2Sopenharmony_ci  visibility = [ ":*" ]
2350a07fd2Sopenharmony_ci
2450a07fd2Sopenharmony_ci  include_dirs = [
2550a07fd2Sopenharmony_ci    "include",
2650a07fd2Sopenharmony_ci    "${audio_control_path}/controlsource/include",
2750a07fd2Sopenharmony_ci    "${audio_hdi_proxy_path}/include",
2850a07fd2Sopenharmony_ci    "${audio_processor_path}/interface",
2950a07fd2Sopenharmony_ci    "${audio_transport_path}/decodetransport/include",
3050a07fd2Sopenharmony_ci    "${audio_transport_path}/encodetransport/include",
3150a07fd2Sopenharmony_ci    "${audio_transport_path}/interface",
3250a07fd2Sopenharmony_ci    "${audio_transport_path}/receiverengine/include",
3350a07fd2Sopenharmony_ci    "${audio_transport_path}/senderengine/include",
3450a07fd2Sopenharmony_ci    "${common_path}/include",
3550a07fd2Sopenharmony_ci    "${common_path}/dfx_utils/include",
3650a07fd2Sopenharmony_ci    "${distributedaudio_path}/audiohandler/include",
3750a07fd2Sopenharmony_ci    "${interfaces_path}/inner_kits/native_cpp/audio_sink/include",
3850a07fd2Sopenharmony_ci    "${interfaces_path}/inner_kits/native_cpp/audio_source/include",
3950a07fd2Sopenharmony_ci    "${innerkits_path}/native_cpp/audio_source/include",
4050a07fd2Sopenharmony_ci    "${innerkits_path}/native_cpp/audio_sink/include",
4150a07fd2Sopenharmony_ci    "${services_path}/common/audioparam",
4250a07fd2Sopenharmony_ci    "${services_path}/common/audiodata/include",
4350a07fd2Sopenharmony_ci    "${services_path}/common/audioeventcallback",
4450a07fd2Sopenharmony_ci    "${services_path}/audiomanager/managersource/include",
4550a07fd2Sopenharmony_ci  ]
4650a07fd2Sopenharmony_ci}
4750a07fd2Sopenharmony_ci
4850a07fd2Sopenharmony_ci## UnitTest daudio_dfx_test
4950a07fd2Sopenharmony_ciohos_unittest("DAudioDfxTest") {
5050a07fd2Sopenharmony_ci  module_out_path = module_out_path
5150a07fd2Sopenharmony_ci
5250a07fd2Sopenharmony_ci  cflags = [
5350a07fd2Sopenharmony_ci    "-g",
5450a07fd2Sopenharmony_ci    "-O0",
5550a07fd2Sopenharmony_ci    "-Wno-unused-variable",
5650a07fd2Sopenharmony_ci    "-fno-omit-frame-pointer",
5750a07fd2Sopenharmony_ci    "-Dprivate=public",
5850a07fd2Sopenharmony_ci    "-Dprotected=public",
5950a07fd2Sopenharmony_ci  ]
6050a07fd2Sopenharmony_ci
6150a07fd2Sopenharmony_ci  sources = [
6250a07fd2Sopenharmony_ci    "${common_path}/dfx_utils/test/unittest/src/daudio_hidumper_test.cpp",
6350a07fd2Sopenharmony_ci    "${common_path}/dfx_utils/test/unittest/src/daudio_hitrace_test.cpp",
6450a07fd2Sopenharmony_ci  ]
6550a07fd2Sopenharmony_ci  configs = [ ":module_private_config" ]
6650a07fd2Sopenharmony_ci
6750a07fd2Sopenharmony_ci  deps = [
6850a07fd2Sopenharmony_ci    "${services_path}/audiomanager/servicesource:distributed_audio_source",
6950a07fd2Sopenharmony_ci    "${services_path}/common:distributed_audio_utils",
7050a07fd2Sopenharmony_ci  ]
7150a07fd2Sopenharmony_ci
7250a07fd2Sopenharmony_ci  external_deps = [
7350a07fd2Sopenharmony_ci    "audio_framework:audio_capturer",
7450a07fd2Sopenharmony_ci    "audio_framework:audio_client",
7550a07fd2Sopenharmony_ci    "audio_framework:audio_renderer",
7650a07fd2Sopenharmony_ci    "cJSON:cjson",
7750a07fd2Sopenharmony_ci    "c_utils:utils",
7850a07fd2Sopenharmony_ci    "distributed_hardware_fwk:distributedhardwareutils",
7950a07fd2Sopenharmony_ci    "drivers_interface_distributed_audio:libdaudio_proxy_1.0",
8050a07fd2Sopenharmony_ci    "dsoftbus:softbus_client",
8150a07fd2Sopenharmony_ci    "googletest:gmock",
8250a07fd2Sopenharmony_ci    "hisysevent:libhisysevent",
8350a07fd2Sopenharmony_ci    "hitrace:hitrace_meter",
8450a07fd2Sopenharmony_ci    "ipc:ipc_core",
8550a07fd2Sopenharmony_ci    "samgr:samgr_proxy",
8650a07fd2Sopenharmony_ci  ]
8750a07fd2Sopenharmony_ci}
8850a07fd2Sopenharmony_ci
8950a07fd2Sopenharmony_cigroup("daudio_dfx_test") {
9050a07fd2Sopenharmony_ci  testonly = true
9150a07fd2Sopenharmony_ci  deps = [ ":DAudioDfxTest" ]
9250a07fd2Sopenharmony_ci}
93