• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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_hdi_render_test###########################
26  unittest("hdf_audio_hdi_render_test") {
27    sources = [
28      "//drivers/peripheral/audio/test/unittest/hdi/passthrough/common/src/audio_common_test.cpp",
29      "//drivers/peripheral/audio/test/unittest/hdi/passthrough/render/src/audio_render_test.cpp",
30    ]
31
32    include_dirs = [
33      "//drivers/peripheral/audio/test/unittest/hdi/passthrough/common/include",
34      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
35      "//drivers/peripheral/audio/interfaces/include",
36      "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
37      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
38      "//drivers/hdf_core/adapter/uhdf2/shared/include",
39      "//drivers/hdf_core/framework/include/core",
40      "//drivers/hdf_core/framework/include/utils",
41      "//drivers/hdf_core/framework/include/osal",
42      "//drivers/hdf_core/framework/include",
43      "//third_party/bounds_checking_function/include",
44      "//drivers/hdf_core/framework/utils/include",
45      "//drivers/hdf_core/adapter/uhdf2/osal/include",
46      "//third_party/googletest/googletest/include/gtest",
47    ]
48
49    deps = [
50      "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils",
51      "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio",
52      "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio_common",
53      "//third_party/googletest:gmock_main",
54      "//third_party/googletest:gtest_main",
55    ]
56  }
57} else {
58  ###########################hdf_audio_hdi_render_test###########################
59  ohos_unittest("hdf_audio_hdi_render_test") {
60    module_out_path = "hdf/audio"
61    sources = [
62      "//drivers/peripheral/audio/test/unittest/hdi/passthrough/common/src/audio_common_test.cpp",
63      "//drivers/peripheral/audio/test/unittest/hdi/passthrough/render/src/audio_render_test.cpp",
64    ]
65
66    include_dirs = [
67      "//drivers/peripheral/audio/test/unittest/hdi/passthrough/common/include",
68      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
69      "//drivers/peripheral/audio/interfaces/include",
70      "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
71      "//third_party/bounds_checking_function/include",
72      "//third_party/googletest/googletest/include/gtest",
73    ]
74
75    deps = [
76      "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio_common",
77      "//third_party/googletest:gmock_main",
78      "//third_party/googletest:gtest_main",
79    ]
80
81    if (drivers_peripheral_audio_alsa_lib) {
82      defines = [ "ALSA_LIB_MODE" ]
83    }
84
85    if (!drivers_peripheral_audio_user_mode) {
86      deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
87      external_deps = [
88        "c_utils:utils",
89        "hdf_core:libhdf_utils",
90      ]
91    } else {
92      deps += [ "//device/soc/${product_company}/common/hal/media:hdi_audio" ]
93    }
94  }
95}
96