• 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} 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_path_route_test") {
24    sources = [
25      "../../common/hdi_common/src/audio_hdi_common.cpp",
26      "//drivers/hdf_core/framework/utils/src/hdf_sbuf.c",
27      "src/audio_pathroute_test.cpp",
28    ]
29
30    include_dirs = [
31      "//drivers/peripheral/audio/interfaces/include",
32      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
33      "//drivers/hdf_core/framework/include/core",
34      "//drivers/hdf_core/framework/include/utils",
35      "//drivers/hdf_core/framework/include/osal",
36      "//drivers/hdf_core/framework/utils/include",
37      "//drivers/hdf_core/framework/include",
38      "//drivers/hdf_core/framework/core/sec/include",
39      "//drivers/hdf_core/framework/core/shared/include",
40      "//drivers/hdf_core/framework/core/host/include",
41      "//drivers/hdf_core/framework/core/manager/include",
42      "//drivers/hdf_core/framework/core/common/include/host/",
43      "//third_party/bounds_checking_function/include",
44      "//drivers/hdf_core/adapter/khdf/liteos/osal/include",
45      "//drivers/hdf_core/adapter/uhdf2/shared/include",
46      "//drivers/hdf_core/adapter/uhdf2/include/hdi/",
47      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
48      "//drivers/peripheral/audio/test/systemtest/audio_function/audio_pathroute/include",
49      "//third_party/googletest/googletest/include/gtest",
50    ]
51
52    deps = [
53      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
54      "//drivers/hdf_core/adapter/uhdf/manager:hdf_core",
55      "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal",
56      "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio",
57      "//third_party/bounds_checking_function:libsec_shared",
58    ]
59  }
60} else {
61  module_output_path = "drivers_peripheral_audio/audio"
62
63  ohos_systemtest("hdf_audio_hdi_path_route_test") {
64    module_out_path = module_output_path
65    sources = [
66      "../../common/hdi_common/src/audio_hdi_common.cpp",
67      "src/audio_pathroute_test.cpp",
68    ]
69
70    include_dirs = [
71      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
72      "//drivers/peripheral/audio/interfaces/include",
73      "//third_party/bounds_checking_function/include",
74      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
75      "//drivers/peripheral/audio/test/systemtest/audio_function/audio_pathroute/include",
76      "//third_party/googletest/googletest/include/gtest",
77    ]
78    deps = [
79      "//third_party/googletest:gmock_main",
80      "//third_party/googletest:gtest_main",
81    ]
82    external_deps = [
83      "c_utils:utils",
84      "hdf_core:libhdf_utils",
85    ]
86    defines = []
87    if (enable_audio_adm_passthrough) {
88      deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ]
89      defines += [ "AUDIO_ADM_SO" ]
90    }
91    if (enable_audio_adm_service) {
92      deps +=
93          [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ]
94      defines += [ "AUDIO_ADM_SERVICE" ]
95    }
96  }
97}
98