• 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_adapter_test#####################
25  unittest("hdf_audio_hdi_adapter_test") {
26    sources = [
27      "../../common/hdi_common/src/audio_hdi_common.cpp",
28      "src/audio_hdiadapter_test.cpp",
29    ]
30
31    include_dirs = [
32      "//drivers/peripheral/audio/interfaces/include",
33      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
34      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
35      "//drivers/framework/include/core",
36      "//drivers/framework/include/utils",
37      "//drivers/framework/include/osal",
38      "//drivers/framework/utils/include",
39      "//drivers/framework/include",
40      "//drivers/framework/core/sec/include",
41      "//drivers/framework/core/shared/include",
42      "//drivers/framework/core/host/include",
43      "//drivers/framework/core/manager/include",
44      "//drivers/framework/core/common/include/host/",
45      "//third_party/bounds_checking_function/include",
46      "//drivers/adapter/khdf/liteos/osal/include",
47      "//drivers/adapter/uhdf2/shared/include",
48      "//drivers/adapter/uhdf2/include/hdi/",
49      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
50      "//third_party/googletest/googletest/include/gtest",
51      "//drivers/peripheral/audio/test/systemtest/hdi/adapter/include",
52    ]
53    cflags = [
54      "-Wall",
55      "-Wextra",
56      "-Werror",
57      "-fsigned-char",
58      "-fno-common",
59      "-fno-strict-aliasing",
60    ]
61  }
62} else {
63  ###########################NOT LITEOS##############################
64  module_output_path = "audio_device_driver/audio"
65
66  ###########################hdf_audio_hdi_adapter_test#####################
67  ohos_systemtest("hdf_audio_hdi_adapter_test") {
68    module_out_path = module_output_path
69    sources = [
70      "../../common/hdi_common/src/audio_hdi_common.cpp",
71      "src/audio_hdiadapter_test.cpp",
72    ]
73
74    include_dirs = [
75      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
76      "//drivers/peripheral/audio/interfaces/include",
77      "//drivers/peripheral/audio/hal/hdi_binder/proxy/include",
78      "//drivers/adapter/uhdf2/include/hdi",
79      "//drivers/adapter/uhdf2/shared/include",
80      "//drivers/adapter/uhdf2/osal/include",
81      "//drivers/framework/include/core",
82      "//drivers/framework/include/utils",
83      "//drivers/framework/include/osal",
84      "//drivers/framework/include",
85      "//drivers/framework/utils/include",
86      "//third_party/bounds_checking_function/include",
87      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
88      "//third_party/googletest/googletest/include/gtest",
89      "//drivers/peripheral/audio/test/systemtest/hdi/adapter/include",
90    ]
91    cflags = [
92      "-Wall",
93      "-Wextra",
94      "-Werror",
95      "-fsigned-char",
96      "-fno-common",
97      "-fno-strict-aliasing",
98    ]
99    deps = [
100      "//third_party/googletest:gmock_main",
101      "//third_party/googletest:gtest_main",
102    ]
103    defines = []
104    if (enable_audio_adm_so) {
105      defines += [ "AUDIO_ADM_SO" ]
106    }
107    if (enable_audio_mpi_so) {
108      defines += [ "AUDIO_MPI_SO" ]
109    }
110    if (enable_audio_adm_service) {
111      defines += [ "AUDIO_ADM_SERVICE" ]
112    }
113    if (enable_audio_mpi_service) {
114      defines += [ "AUDIO_MPI_SERVICE" ]
115    }
116  }
117}
118###########################end###########################
119