• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/test.gni")
16  import("//drivers/peripheral/audio/audio.gni")
17} else {
18  import("//build/test.gni")
19  import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
20  import("//drivers/peripheral/audio/audio.gni")
21}
22
23if (defined(ohos_lite)) {
24  ###########################LITEOS###########################
25  ###########################hdf_audio_lib_capture_test###########################
26  unittest("hdf_audio_lib_capture_test") {
27    sources = [ "//drivers/peripheral/audio/test/unittest/supportlibs/interface_lib_capture/src/audio_adm_if_lib_capture_test.cpp" ]
28
29    include_dirs = [
30      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
31      "//drivers/peripheral/audio/interfaces/include",
32      "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
33      "//drivers/peripheral/audio/supportlibs/interfaces/include",
34      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
35      "//drivers/hdf_core/adapter/uhdf2/shared/include",
36      "//drivers/hdf_core/framework/include/core",
37      "//drivers/hdf_core/framework/include/utils",
38      "//drivers/hdf_core/framework/include/osal",
39      "//drivers/hdf_core/framework/include",
40      "//third_party/bounds_checking_function/include",
41      "//drivers/hdf_core/framework/utils/include",
42      "//drivers/hdf_core/adapter/uhdf2/osal/include",
43      "//third_party/googletest/googletest/include/gtest",
44    ]
45
46    deps = [
47      "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils",
48      "//drivers/peripheral/audio/supportlibs:hdi_audio_interface_lib_capture",
49      "//third_party/googletest:gmock_main",
50      "//third_party/googletest:gtest_main",
51    ]
52  }
53} else {
54  ###########################unittest###########################
55  module_output_path = "hdf/audio"
56
57  ###########################hdf_audio_lib_capture_test###########################
58  ohos_unittest("hdf_audio_lib_capture_test") {
59    module_out_path = module_output_path
60    sources = []
61    include_dirs = []
62    if (drivers_peripheral_audio_alsa_lib) {
63      sources += [ "//drivers/peripheral/audio/test/unittest/supportlibs/interface_lib_capture/src/audio_alsa_if_lib_capture_test.cpp" ]
64      include_dirs += [
65        "//drivers/peripheral/audio/supportlibs/alsa_adapter/include",
66        "//third_party/alsa-lib/include",
67      ]
68    } else {
69      sources += [ "//drivers/peripheral/audio/test/unittest/supportlibs/interface_lib_capture/src/audio_adm_if_lib_capture_test.cpp" ]
70      include_dirs +=
71          [ "//drivers/peripheral/audio/supportlibs/adm_adapter/include" ]
72    }
73
74    include_dirs += [
75      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
76      "//drivers/peripheral/audio/interfaces/include",
77      "//drivers/peripheral/audio/supportlibs/interfaces/include",
78      "//third_party/bounds_checking_function/include",
79      "//third_party/googletest/googletest/include/gtest",
80    ]
81
82    deps = [
83      "//drivers/peripheral/audio/supportlibs:hdi_audio_interface_lib_capture",
84      "//third_party/googletest:gmock_main",
85      "//third_party/googletest:gtest_main",
86    ]
87
88    if (is_standard_system) {
89      external_deps = [
90        "c_utils:utils",
91        "hdf_core:libhdf_utils",
92        "hiviewdfx_hilog_native:libhilog",
93      ]
94    }
95  }
96}
97