• 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/adapter/uhdf2/uhdf.gni")
19  import("//drivers/peripheral/audio/audio.gni")
20}
21
22if (defined(ohos_lite)) {
23  ###########################LITEOS##########################################
24  ###########################hdf_audio_hdi_path_route_test###########################
25  unittest("hdf_audio_hdi_path_route_test") {
26    sources = [
27      "../../common/hdi_common/src/audio_hdi_common.cpp",
28      "//drivers/framework/ability/sbuf/src/hdf_sbuf.c",
29      "src/audio_pathroute_test.cpp",
30    ]
31
32    include_dirs = [
33      "//drivers/peripheral/audio/interfaces/include",
34      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
35      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
36      "//drivers/framework/include/core",
37      "//drivers/framework/include/utils",
38      "//drivers/framework/include/osal",
39      "//drivers/framework/ability/sbuf/include",
40      "//drivers/framework/utils/include",
41      "//drivers/framework/include",
42      "//drivers/framework/core/sec/include",
43      "//drivers/framework/core/shared/include",
44      "//drivers/framework/core/host/include",
45      "//drivers/framework/core/manager/include",
46      "//drivers/framework/core/common/include/host/",
47      "//third_party/bounds_checking_function/include",
48      "//drivers/adapter/khdf/liteos/osal/include",
49      "//drivers/adapter/uhdf2/shared/include",
50      "//drivers/adapter/uhdf2/include/hdi/",
51      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
52      "//drivers/peripheral/audio/test/systemtest/audio_function/audio_pathroute/include",
53      "//third_party/googletest/googletest/include/gtest",
54    ]
55    cflags = [
56      "-Wall",
57      "-Wextra",
58      "-Werror",
59      "-fsigned-char",
60      "-fno-common",
61      "-fno-strict-aliasing",
62    ]
63
64    deps = [
65      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
66      "//drivers/adapter/uhdf/manager:hdf_core",
67      "//drivers/adapter/uhdf/posix:hdf_posix_osal",
68      "//third_party/bounds_checking_function:libsec_shared",
69    ]
70  }
71} else {
72  module_output_path = "hdf/audio"
73
74  ###########################hdf_audio_hdi_path_route_test###########################
75  ohos_systemtest("hdf_audio_hdi_path_route_test") {
76    module_out_path = module_output_path
77    sources = [
78      "../../common/hdi_common/src/audio_hdi_common.cpp",
79      "src/audio_pathroute_test.cpp",
80    ]
81
82    include_dirs = [
83      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
84      "//drivers/peripheral/audio/interfaces/include",
85      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
86      "//drivers/adapter/uhdf2/include/hdi",
87      "//drivers/adapter/uhdf2/shared/include",
88      "//drivers/framework/include/core",
89      "//drivers/framework/include/utils",
90      "//drivers/framework/include/osal",
91      "//drivers/framework/include",
92      "//third_party/bounds_checking_function/include",
93      "//drivers/framework/ability/sbuf/include",
94      "//drivers/framework/utils/include",
95      "//drivers/framework/ability/sbuf/include",
96      "//drivers/adapter/uhdf2/osal/include",
97      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
98      "//drivers/peripheral/audio/test/systemtest/audio_function/audio_pathroute/include",
99      "//third_party/googletest/googletest/include/gtest",
100    ]
101    cflags = [
102      "-Wall",
103      "-Wextra",
104      "-Werror",
105      "-fsigned-char",
106      "-fno-common",
107      "-fno-strict-aliasing",
108    ]
109    deps = [
110      "//drivers/adapter/uhdf2/config:libhdf_hcs",
111      "//drivers/adapter/uhdf2/hcs:hdf_default.hcb",
112      "//drivers/adapter/uhdf2/hdi:libhdi",
113      "//drivers/adapter/uhdf2/host:hdf_devhost",
114      "//drivers/adapter/uhdf2/host:libhdf_host",
115      "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter",
116      "//drivers/adapter/uhdf2/manager:hdf_devmgr",
117      "//drivers/adapter/uhdf2/manager:hdf_devmgr.rc",
118      "//drivers/adapter/uhdf2/osal:libhdf_utils",
119      "//third_party/googletest:gmock_main",
120      "//third_party/googletest:gtest_main",
121      "//utils/native/base:utils",
122    ]
123    defines = []
124    if (enable_audio_adm_so) {
125      defines += [ "AUDIO_ADM_SO" ]
126    }
127    if (enable_audio_mpi_so) {
128      defines += [ "AUDIO_MPI_SO" ]
129    }
130    if (enable_audio_adm_service) {
131      defines += [ "AUDIO_ADM_SERVICE" ]
132    }
133    if (enable_audio_mpi_service) {
134      defines += [ "AUDIO_MPI_SERVICE" ]
135    }
136  }
137}
138###########################end###########################
139