• 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} else {
17  import("//build/test.gni")
18  import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
19}
20import("//drivers/peripheral/audio/audio.gni")
21
22if (defined(ohos_lite)) {
23  moduletest("hdf_audio_hdi_render_hardware_dependence_test") {
24    sources = [
25      "../../../common/hdi_common/src/audio_hdi_common.cpp",
26      "src/audio_hdirender_hardware_dependence_test.cpp",
27    ]
28
29    include_dirs = [
30      "//drivers/peripheral/audio/interfaces/include",
31      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
32      "//third_party/bounds_checking_function/include",
33      "//drivers/hdf_core/adapter/khdf/liteos/osal/include",
34      "//drivers/hdf_core/adapter/uhdf2/include/hdi",
35      "//drivers/hdf_core/framework/include/utils",
36      "//drivers/hdf_core/framework/include/core",
37      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
38      "//third_party/googletest/googletest/include/gtest",
39      "//drivers/peripheral/audio/test/systemtest/hdi/hardwaredependence/render/include",
40    ]
41    deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
42  }
43} else {
44  module_output_path = "drivers_peripheral_audio/audio"
45
46  ohos_systemtest("hdf_audio_hdi_render_hardware_dependence_test") {
47    module_out_path = module_output_path
48    resource_config_file =
49        "//drivers/peripheral/audio/test/resource/ohos_test.xml"
50    sources = [
51      "../../../common/hdi_common/src/audio_hdi_common.cpp",
52      "src/audio_hdirender_hardware_dependence_test.cpp",
53    ]
54
55    include_dirs = [
56      "//drivers/peripheral/audio/interfaces/include",
57      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
58      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
59    ]
60    external_deps = [
61      "c_utils:utils",
62      "hdf_core:libhdf_utils",
63    ]
64    deps = [
65      "//third_party/googletest:gmock_main",
66      "//third_party/googletest:gtest_main",
67    ]
68    defines = []
69    if (enable_audio_adm_passthrough) {
70      deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
71      defines += [ "AUDIO_ADM_SO" ]
72    }
73    if (enable_audio_adm_service) {
74      deps +=
75          [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ]
76      defines += [ "AUDIO_ADM_SERVICE" ]
77    }
78    if ("${product_name}" == "rk3568") {
79      defines += [ "PRODUCT_RK3568" ]
80    }
81    if (defined(drivers_peripheral_audio_alsa_lib) &&
82        drivers_peripheral_audio_alsa_lib == true) {
83      defines += [ "ALSA_LIB_MODE" ]
84    }
85    if (!drivers_peripheral_audio_rich_device) {
86      defines += [ "FEATURE_SMALL_DEVICE" ]
87    }
88  }
89}
90