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