• 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_lib_capture_test###########################
25  unittest("hdf_audio_lib_capture_test") {
26    sources = [
27      "../../common/hdi_common/src/audio_hdi_common.cpp",
28      "../../common/lib_common/src/audio_lib_common.cpp",
29      "src/audio_libcapture_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/framework/include/core",
38      "//drivers/framework/include/utils",
39      "//drivers/framework/include/osal",
40      "//drivers/framework/ability/sbuf/include",
41      "//drivers/framework/utils/include",
42      "//drivers/framework/include",
43      "//drivers/framework/core/sec/include",
44      "//drivers/framework/core/shared/include",
45      "//drivers/framework/core/host/include",
46      "//drivers/framework/core/manager/include",
47      "//drivers/framework/core/common/include/host/",
48      "//third_party/bounds_checking_function/include",
49      "//drivers/adapter/khdf/liteos/osal/include",
50      "//drivers/adapter/uhdf2/shared/include",
51      "//drivers/adapter/uhdf2/include/hdi/",
52      "//drivers/peripheral/audio/test/systemtest/common/lib_common/include",
53      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
54      "//drivers/peripheral/audio/test/systemtest/adm_interface_lib/capture/include",
55      "//third_party/googletest/googletest/include/gtest",
56    ]
57    cflags = [
58      "-Wall",
59      "-Wextra",
60      "-Werror",
61      "-fsigned-char",
62      "-fno-common",
63      "-fno-strict-aliasing",
64      "-std=c++11",
65    ]
66
67    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
68  }
69} else {
70  module_output_path = "hdf/audio"
71
72  ###########################hdf_audio_lib_capture_test###########################
73  ohos_systemtest("hdf_audio_lib_capture_test") {
74    module_out_path = module_output_path
75    sources = [
76      "../../common/hdi_common/src/audio_hdi_common.cpp",
77      "../../common/lib_common/src/audio_lib_common.cpp",
78      "src/audio_libcapture_test.cpp",
79    ]
80
81    include_dirs = [
82      "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
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      "//utils/native/base/include",
93      "//third_party/bounds_checking_function/include",
94      "//drivers/framework/ability/sbuf/include",
95      "//drivers/framework/utils/include",
96      "//drivers/framework/ability/sbuf/include",
97      "//drivers/adapter/uhdf2/osal/include",
98      "//drivers/peripheral/audio/test/systemtest/common/lib_common/include",
99      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
100      "//drivers/peripheral/audio/test/systemtest/adm_interface_lib/capture/include",
101      "//third_party/googletest/googletest/include/gtest",
102    ]
103    cflags = [
104      "-Wall",
105      "-Wextra",
106      "-Werror",
107      "-fsigned-char",
108      "-fno-common",
109      "-fno-strict-aliasing",
110    ]
111    deps = [
112      "//third_party/googletest:gmock_main",
113      "//third_party/googletest:gtest_main",
114      "//utils/native/base:utils",
115    ]
116    defines = []
117    if (enable_audio_adm_so) {
118      defines += [ "AUDIO_ADM_SO" ]
119    }
120    if (enable_audio_mpi_so) {
121      defines += [ "AUDIO_MPI_SO" ]
122    }
123    if (enable_audio_adm_service) {
124      defines += [ "AUDIO_ADM_SERVICE" ]
125    }
126    if (enable_audio_mpi_service) {
127      defines += [ "AUDIO_MPI_SERVICE" ]
128    }
129  }
130}
131###########################end###########################
132