# Copyright (c) 2021 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") } else { import("//build/test.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") } import("//drivers/peripheral/audio/audio.gni") if (defined(ohos_lite)) { moduletest("hdf_audio_adm_interface_test") { sources = [ "../../common/adm_common/src/audio_adm_common.cpp", "../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_adm_interface_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/interfaces/include", "//drivers/hdf_core/framework/include/core", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/framework/include/osal", "//drivers/hdf_core/framework/utils/include", "//drivers/hdf_core/framework/include", "//drivers/hdf_core/framework/core/sec/include", "//drivers/hdf_core/framework/core/shared/include", "//drivers/hdf_core/framework/core/host/include", "//drivers/hdf_core/framework/core/manager/include", "//drivers/hdf_core/framework/core/common/include/host/", "//third_party/bounds_checking_function/include", "//drivers/hdf_core/adapter/khdf/liteos/osal/include", "//drivers/hdf_core/adapter/uhdf2/shared/include", "//drivers/hdf_core/adapter/uhdf2/include/hdi/", "//drivers/peripheral/audio/test/systemtest/common/adm_common/include", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/adm/audio_adm_interface/include", ] deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", "//third_party/bounds_checking_function:libsec_shared", ] } } else { module_output_path = "drivers_peripheral_audio/audio" ohos_systemtest("hdf_audio_adm_interface_test") { resource_config_file = "//drivers/peripheral/audio/test/resource/ohos_test.xml" module_out_path = module_output_path sources = [ "../../common/adm_common/src/audio_adm_common.cpp", "../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_adm_interface_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/interfaces/include", "//third_party/bounds_checking_function/include", "//drivers/peripheral/audio/test/systemtest/common/adm_common/include", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/adm/audio_adm_interface/include", ] deps = [ "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hdf_core:libhdf_utils", ] defines = [] if (enable_audio_adm_passthrough) { defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_adm_service) { defines += [ "AUDIO_ADM_SERVICE" ] } if ("${product_name}" == "rk3568") { defines += [ "PRODUCT_RK3568" ] } } }