# Copyright (c) 2021-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") } 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_hdi_capture_attr_test") { sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_attr_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_passthrough/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/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] } moduletest("hdf_audio_hdi_capture_control_test") { sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_control_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_passthrough/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/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] } moduletest("hdf_audio_hdi_capture_volume_test") { sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_volume_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_passthrough/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/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] } moduletest("hdf_audio_hdi_capture_scene_test") { sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_scene_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_passthrough/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/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] } moduletest("hdf_audio_hdi_capture_test") { sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_passthrough/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/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] } } else { module_output_path = "drivers_peripheral_audio/audio" ohos_systemtest("hdf_audio_hdi_capture_attr_test") { module_out_path = module_output_path sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_attr_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/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", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] defines = [] if (enable_audio_adm_passthrough) { deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_adm_service) { deps += [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] defines += [ "AUDIO_ADM_SERVICE" ] } if (defined(drivers_peripheral_audio_alsa_lib) && drivers_peripheral_audio_alsa_lib == true) { defines += [ "ALSA_LIB_MODE" ] } if (!drivers_peripheral_audio_rich_device) { defines += [ "FEATURE_SMALL_DEVICE" ] } } ohos_systemtest("hdf_audio_hdi_capture_control_test") { module_out_path = module_output_path sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_control_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/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", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] defines = [] if (enable_audio_adm_passthrough) { deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_adm_service) { deps += [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] defines += [ "AUDIO_ADM_SERVICE" ] } if (defined(drivers_peripheral_audio_alsa_lib) && drivers_peripheral_audio_alsa_lib == true) { defines += [ "ALSA_LIB_MODE" ] } if (!drivers_peripheral_audio_rich_device) { defines += [ "FEATURE_SMALL_DEVICE" ] } } ohos_systemtest("hdf_audio_hdi_capture_volume_test") { module_out_path = module_output_path sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_volume_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/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", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] defines = [] if (enable_audio_adm_passthrough) { deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_adm_service) { deps += [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] defines += [ "AUDIO_ADM_SERVICE" ] } if (defined(drivers_peripheral_audio_alsa_lib) && drivers_peripheral_audio_alsa_lib == true) { defines += [ "ALSA_LIB_MODE" ] } if (!drivers_peripheral_audio_rich_device) { defines += [ "FEATURE_SMALL_DEVICE" ] } } ohos_systemtest("hdf_audio_hdi_capture_scene_test") { module_out_path = module_output_path sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_scene_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/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", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] defines = [] if (enable_audio_adm_passthrough) { deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_adm_service) { deps += [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] defines += [ "AUDIO_ADM_SERVICE" ] } if (defined(drivers_peripheral_audio_alsa_lib) && drivers_peripheral_audio_alsa_lib == true) { defines += [ "ALSA_LIB_MODE" ] } if (!drivers_peripheral_audio_rich_device) { defines += [ "FEATURE_SMALL_DEVICE" ] } } ohos_systemtest("hdf_audio_hdi_capture_test") { module_out_path = module_output_path sources = [ "../../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_hdicapture_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/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", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//third_party/googletest/googletest/include/gtest", "//drivers/peripheral/audio/test/systemtest/hdi/common/capture/include", ] deps = [ "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] defines = [] if (enable_audio_adm_passthrough) { deps += [ "//drivers/peripheral/audio/hal/hdi_passthrough:hdi_audio" ] defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_adm_service) { deps += [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] defines += [ "AUDIO_ADM_SERVICE" ] } if (!drivers_peripheral_audio_rich_device) { defines += [ "FEATURE_SMALL_DEVICE" ] } } }