# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. if (defined(ohos_lite)) { import("//build/lite/config/test.gni") import("//drivers/peripheral/audio/audio.gni") } else { import("//build/test.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") import("//drivers/peripheral/audio/audio.gni") } if (defined(ohos_lite)) { ###########################LITEOS########################### ###########################hdf_audio_lib_render_test########################### unittest("hdf_audio_lib_render_test") { sources = [ "//drivers/peripheral/audio/test/unittest/supportlibs/interface_lib_render/src/audio_adm_if_lib_render_test.cpp" ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/supportlibs/adm_adapter/include", "//drivers/peripheral/audio/supportlibs/interfaces/include", "//drivers/hdf_core/adapter/uhdf2/include/hdi", "//drivers/hdf_core/adapter/uhdf2/shared/include", "//drivers/hdf_core/framework/include/core", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/framework/include/osal", "//drivers/hdf_core/framework/include", "//third_party/bounds_checking_function/include", "//drivers/hdf_core/framework/utils/include", "//drivers/hdf_core/adapter/uhdf2/osal/include", "//third_party/googletest/googletest/include/gtest", ] deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils", "//drivers/peripheral/audio/supportlibs:hdi_audio_interface_lib_render", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] } } else { ###########################unittest########################### module_output_path = "hdf/audio" ###########################hdf_audio_lib_render_test########################### ohos_unittest("hdf_audio_lib_render_test") { module_out_path = module_output_path sources = [] include_dirs = [] if (drivers_peripheral_audio_alsa_lib) { sources += [ "//drivers/peripheral/audio/test/unittest/supportlibs/interface_lib_render/src/audio_alsa_if_lib_render_test.cpp" ] include_dirs += [ "//drivers/peripheral/audio/supportlibs/alsa_adapter/include", "//third_party/alsa-lib/include", ] } else { sources += [ "//drivers/peripheral/audio/test/unittest/supportlibs/interface_lib_render/src/audio_adm_if_lib_render_test.cpp" ] include_dirs += [ "//drivers/peripheral/audio/supportlibs/adm_adapter/include" ] } include_dirs += [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/supportlibs/interfaces/include", "//third_party/bounds_checking_function/include", "//third_party/googletest/googletest/include/gtest", ] deps = [ "//drivers/peripheral/audio/supportlibs:hdi_audio_interface_lib_render", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] if (is_standard_system) { external_deps = [ "c_utils:utils", "hdf_core:libhdf_utils", "hiviewdfx_hilog_native:libhilog", ] } } }