• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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/test.gni")
16import("../../../../../config.gni")
17
18module_output_path = "audio_framework/audio_framework_engine"
19
20config("audio_engine_private_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "./include",
25    "../../include",
26    "../../../audioutils/include",
27    "../../../hdiadapter_new/include",
28    "../../../../../interfaces/inner_api/native/audiocommon/include",
29    "../../../../../services/audio_engine/manager/include",
30    "../../../../../services/audio_policy/common/include",
31    "../../../../../services/audio_service/common/include",
32    "../../../../../services/audio_service/server/include",
33  ]
34}
35
36ohos_unittest("pro_audio_service_adapter_unit_test") {
37  module_out_path = module_output_path
38  testonly = true
39  cflags = [
40    "-Wall",
41    "-Werror",
42    "-fno-access-control",
43  ]
44  sources = [ "src/pro_audio_service_adapter_unit_test.cpp" ]
45
46  configs = [ ":audio_engine_private_config" ]
47
48  deps = [
49    "../../:pro_audio_service_adapter",
50    "../../../../../services/audio_engine:audio_engine_manager",
51    "../../../audioutils:audio_utils",
52    "../../../hdiadapter_new:hdiadapter_new",
53  ]
54
55  external_deps = [
56    "c_utils:utils",
57    "googletest:gtest",
58    "hilog:libhilog",
59    "hisysevent:libhisysevent",
60    "ipc:ipc_single",
61    "safwk:system_ability_fwk",
62    "samgr:samgr_proxy",
63  ]
64}
65
66ohos_unittest("pulse_audio_service_adapter_impl_unit_test") {
67  module_out_path = module_output_path
68  include_dirs = [
69    "../../include",
70    "../../../../../interfaces/inner_api/native/audiocommon/include/",
71    "../../../../../frameworks/native/audioschedule/include",
72    "../../../../../frameworks/native/audioutils/include",
73    "../../../../../services/audio_service/server/include",
74    "../../../../../services/audio_policy/common/include",
75    "../../../../../services/audio_engine/manager/include",
76  ]
77
78  cflags = [
79    "-Wall",
80    "-Werror",
81    "-fno-access-control",
82  ]
83
84  external_deps = [
85    "c_utils:utils",
86    "googletest:gmock",
87    "googletest:gtest",
88    "hilog:libhilog",
89    "hisysevent:libhisysevent",
90    "ipc:ipc_single",
91    "media_foundation:media_monitor_client",
92    "media_foundation:media_monitor_common",
93    "samgr:samgr_proxy",
94  ]
95
96  sources = [
97    "../../src/audio_service_adapter.cpp",
98    "../../src/pro_audio_service_adapter_impl.cpp",
99    "../../src/pulse_audio_service_adapter_impl.cpp",
100  ]
101  defines = []
102  if (!audio_framework_feature_new_engine_flag) {
103    external_deps += [
104      "pulseaudio:pulse",
105    ]
106
107    sources += [ "pulse_audio_service_adapter_impl_unit_test.cpp"]
108
109    defines += [ "SUPPORT_OLD_ENGINE" ]
110  }
111  deps = [
112    "../../:pro_audio_service_adapter",
113    "../../../../../frameworks/native/audioschedule:audio_schedule",
114    "../../../../../frameworks/native/audioutils:audio_utils",
115    "../../../../../services/audio_engine:audio_engine_manager",
116    "../../../../../services/audio_service:audio_common",
117  ]
118}
119