# 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. import("//build/test.gni") import("//drivers/adapter/uhdf2/uhdf.gni") RIL_ADAPTER = "//base/telephony/" ohos_unittest("tel_ril_adapter_gtest") { install_enable = true subsystem_name = "telephony" part_name = "ril_adapter" test_module = "tel_ril_adapter_gtest" module_out_path = part_name + "/" + test_module sources = [ "ril_manager_test.cpp", "ril_radio_indication_test.cpp", "ril_radio_response_test.cpp", "ril_unit_test.cpp", ] include_dirs = [ "//base/telephony/ril_adapter/services/hril/include", "//base/telephony/core_service/utils/common/include", "//utils/native/base/include", "//third_party/json/include", "//drivers/adapter/uhdf2/include/hdi", "include", ] configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] deps = [ "$RIL_ADAPTER/ril_adapter/services/hril:hril", "$RIL_ADAPTER/ril_adapter/services/vendor:ril_vendor", "$hdf_uhdf_path/hdi:libhdi", "//base/telephony/core_service:tel_core_service", "//drivers/adapter/uhdf2/host:libhdf_host", "//drivers/adapter/uhdf2/ipc:libhdf_ipc_adapter", "//drivers/adapter/uhdf2/utils:libhdf_utils", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] external_deps = [ "ces_standard:cesfwk_innerkits", "eventhandler:libeventhandler", "ipc:ipc_core", "ril_adapter:hril_innerkits", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", ] defines = [ "TELEPHONY_LOG_TAG = \"RilAdapterGtest\"" ] if ("${product_name}" == "rk3568" || "${product_name}" == "DAYU") { defines += [ "TEL_TEST_UNSUPPORT" ] } if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { external_deps += [ "hilog:libhilog" ] } } group("unittest") { testonly = true deps = [ ":tel_ril_adapter_gtest" ] }