• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/test.gni")
16import("./../../../../hdf_core/adapter/uhdf2/uhdf.gni")
17import("./../../audio.gni")
18
19module_output_path = "drivers_peripheral_audio/audio"
20
21ohos_benchmarktest("hdf_audio_benchmark_test") {
22  module_out_path = module_output_path
23
24  include_dirs = []
25
26  sources = [
27    "adapter/audio_adapter_benchmarktest.cpp",
28    "capture/audio_capture_benchmarktest.cpp",
29    "capture/audio_capture_mmap_benchmarktest.cpp",
30    "manager/audio_manager_benchmarktest.cpp",
31    "render/audio_render_benchmarktest.cpp",
32    "render/audio_render_mmap_benchmarktest.cpp",
33  ]
34
35  if (drivers_peripheral_audio_feature_effect) {
36    sources += [
37      "effect/audio_effectcontrol_benchmarktest.cpp",
38      "effect/audio_effectmodel_benchmarktest.cpp",
39    ]
40  }
41
42  cflags = [
43    "-Wall",
44    "-Wextra",
45    "-Werror",
46    "-fsigned-char",
47    "-fno-common",
48    "-fno-strict-aliasing",
49  ]
50
51  deps = [
52    "//third_party/benchmark",
53    "//third_party/bounds_checking_function:libsec_shared",
54    "//third_party/googletest:gtest_main",
55  ]
56
57  if (is_standard_system) {
58    external_deps = [
59      "c_utils:utils",
60      "drivers_interface_audio:audio_idl_headers",
61      "drivers_interface_audio:effect_idl_headers",
62      "drivers_interface_audio:libaudio_proxy_2.0",
63      "drivers_interface_audio:libeffect_proxy_1.0",
64      "hdf_core:libhdf_utils",
65      "hilog:libhilog",
66    ]
67  } else {
68    external_deps = [ "hilog:libhilog" ]
69  }
70  external_deps += [ "ipc:ipc_single" ]
71}
72