• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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_lib_capture_hardwaredependence_test") {
24    if (defined(enable_liteos_test_bin) && enable_liteos_test_bin == true) {
25      output_extension = "bin"
26      output_dir = "$root_out_dir/test/moduletest/hdf"
27    }
28
29    sources = [
30      "../../../common/hdi_common/src/audio_hdi_common.cpp",
31      "../../../common/lib_common/src/audio_lib_common.cpp",
32      "src/audio_libcapture_hardwaredependence_test.cpp",
33    ]
34
35    include_dirs = [
36      "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
37      "//drivers/peripheral/audio/supportlibs/interfaces/include",
38      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
39      "//drivers/peripheral/audio/interfaces/include",
40      "//drivers/hdf_core/framework/include/core",
41      "//drivers/hdf_core/framework/include/utils",
42      "//drivers/hdf_core/framework/include/osal",
43      "//drivers/hdf_core/framework/utils/include",
44      "//third_party/bounds_checking_function/include",
45      "//drivers/hdf_core/adapter/khdf/liteos/osal/include",
46      "//drivers/hdf_core/adapter/uhdf2/shared/include",
47      "//drivers/hdf_core/adapter/uhdf2/include/hdi/",
48      "//drivers/peripheral/audio/test/systemtest/common/lib_common/include",
49      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
50      "//drivers/peripheral/audio/test/systemtest/supportlibs/hardwaredependence/capture/include",
51      "//third_party/googletest/googletest/include/gtest",
52    ]
53
54    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
55  }
56} else {
57  module_output_path = "drivers_peripheral_audio/audio"
58
59  ohos_systemtest("hdf_audio_lib_capture_hardwaredependence_test") {
60    module_out_path = module_output_path
61    sources = [
62      "../../../common/hdi_common/src/audio_hdi_common.cpp",
63      "../../../common/lib_common/src/audio_lib_common.cpp",
64      "src/audio_libcapture_hardwaredependence_test.cpp",
65    ]
66
67    include_dirs = [
68      "//drivers/peripheral/audio/supportlibs/adm_adapter/include",
69      "//drivers/peripheral/audio/supportlibs/interfaces/include",
70      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
71      "//drivers/peripheral/audio/interfaces/include",
72      "//third_party/bounds_checking_function/include",
73      "//drivers/peripheral/audio/test/systemtest/common/lib_common/include",
74      "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include",
75      "//drivers/peripheral/audio/test/systemtest/supportlibs/hardwaredependence/capture/include",
76    ]
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      defines += [ "AUDIO_ADM_SO" ]
89    }
90    if (enable_audio_adm_service) {
91      defines += [ "AUDIO_ADM_SERVICE" ]
92    }
93    if ("${product_name}" == "rk3568") {
94      defines += [ "PRODUCT_RK3568" ]
95    }
96  }
97}
98