# 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/adapter/uhdf2/uhdf.gni") import("//drivers/peripheral/audio/audio.gni") } if (defined(ohos_lite)) { ###########################LITEOS########################################## ###########################hdf_audio_hdi_path_route_test########################### unittest("hdf_audio_hdi_path_route_test") { sources = [ "../../common/hdi_common/src/audio_hdi_common.cpp", "//drivers/framework/ability/sbuf/src/hdf_sbuf.c", "src/audio_pathroute_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", "//drivers/framework/include/core", "//drivers/framework/include/utils", "//drivers/framework/include/osal", "//drivers/framework/ability/sbuf/include", "//drivers/framework/utils/include", "//drivers/framework/include", "//drivers/framework/core/sec/include", "//drivers/framework/core/shared/include", "//drivers/framework/core/host/include", "//drivers/framework/core/manager/include", "//drivers/framework/core/common/include/host/", "//third_party/bounds_checking_function/include", "//drivers/adapter/khdf/liteos/osal/include", "//drivers/adapter/uhdf2/shared/include", "//drivers/adapter/uhdf2/include/hdi/", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//drivers/peripheral/audio/test/systemtest/audio_function/audio_pathroute/include", "//third_party/googletest/googletest/include/gtest", ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", ] deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", "//drivers/adapter/uhdf/manager:hdf_core", "//drivers/adapter/uhdf/posix:hdf_posix_osal", "//third_party/bounds_checking_function:libsec_shared", ] } } else { module_output_path = "hdf/audio" ###########################hdf_audio_hdi_path_route_test########################### ohos_systemtest("hdf_audio_hdi_path_route_test") { module_out_path = module_output_path sources = [ "../../common/hdi_common/src/audio_hdi_common.cpp", "src/audio_pathroute_test.cpp", ] include_dirs = [ "//drivers/peripheral/audio/hal/hdi_passthrough/include", "//drivers/peripheral/audio/interfaces/include", "//drivers/peripheral/audio/hal/hdi_binder/proxy/include", "//drivers/adapter/uhdf2/include/hdi", "//drivers/adapter/uhdf2/shared/include", "//drivers/framework/include/core", "//drivers/framework/include/utils", "//drivers/framework/include/osal", "//drivers/framework/include", "//third_party/bounds_checking_function/include", "//drivers/framework/ability/sbuf/include", "//drivers/framework/utils/include", "//drivers/framework/ability/sbuf/include", "//drivers/adapter/uhdf2/osal/include", "//drivers/peripheral/audio/test/systemtest/common/hdi_common/include", "//drivers/peripheral/audio/test/systemtest/audio_function/audio_pathroute/include", "//third_party/googletest/googletest/include/gtest", ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", ] deps = [ "//drivers/adapter/uhdf2/config:libhdf_hcs", "//drivers/adapter/uhdf2/hcs:hdf_default.hcb", "//drivers/adapter/uhdf2/hdi:libhdi", "//drivers/adapter/uhdf2/host:hdf_devhost", "//drivers/adapter/uhdf2/host:libhdf_host", "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", "//drivers/adapter/uhdf2/manager:hdf_devmgr", "//drivers/adapter/uhdf2/manager:hdf_devmgr.rc", "//drivers/adapter/uhdf2/osal:libhdf_utils", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] defines = [] if (enable_audio_adm_so) { defines += [ "AUDIO_ADM_SO" ] } if (enable_audio_mpi_so) { defines += [ "AUDIO_MPI_SO" ] } if (enable_audio_adm_service) { defines += [ "AUDIO_ADM_SERVICE" ] } if (enable_audio_mpi_service) { defines += [ "AUDIO_MPI_SERVICE" ] } } } ###########################end###########################