1# Copyright (C) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15SOURCE_DIR = "../../../" 16 17ohos_unittest("tel_ril_adapter_gtest") { 18 install_enable = true 19 subsystem_name = "telephony" 20 part_name = "ril_adapter" 21 test_module = "tel_ril_adapter_gtest" 22 module_out_path = part_name + "/" + test_module 23 24 sources = [ 25 "ril_adapter_service_test.cpp", 26 "ril_call_test.cpp", 27 "ril_callback_test.cpp", 28 "ril_data_test.cpp", 29 "ril_modem_test.cpp", 30 "ril_network_test.cpp", 31 "ril_sim_test.cpp", 32 "ril_sms_test.cpp", 33 "ril_test_util.cpp", 34 "zero_branch_test.cpp", 35 ] 36 37 include_dirs = [ 38 "include", 39 "$SOURCE_DIR/services/hril/include", 40 "$SOURCE_DIR/services/hril_hdf/include", 41 ] 42 deps = [ 43 "$SOURCE_DIR/interfaces/innerkits:hril_innerkits", 44 "$SOURCE_DIR/services/hril:hril", 45 "$SOURCE_DIR/services/hril_hdf:hril_hdf", 46 ] 47 defines = [ 48 "TELEPHONY_LOG_TAG = \"RilAdapterGtest\"", 49 "LOG_DOMAIN = 0xD000F00", 50 ] 51 52 # defines += [ "TEL_TEST_PIN_PUK" ] 53 configs = [ "$SOURCE_DIR/utils:utils_config" ] 54 if (is_standard_system) { 55 external_deps = [ 56 "bounds_checking_function:libsec_shared", 57 "c_utils:utils", 58 "drivers_interface_power:libpower_proxy_1.2", 59 "drivers_interface_ril:libril_proxy_1.2", 60 "drivers_interface_ril:libril_proxy_1.3", 61 "hdf_core:libhdf_utils", 62 "hilog:libhilog", 63 "init:libbegetutil", 64 "ipc:ipc_single", 65 ] 66 } else { 67 external_deps = [ "hilog:libhilog" ] 68 } 69 external_deps += [ "ipc:ipc_single" ] 70 if (defined(global_parts_info) && 71 defined(global_parts_info.hdf_drivers_interface_power) && 72 global_parts_info.hdf_drivers_interface_power) { 73 external_deps += [ "drivers_interface_power:libpower_proxy_1.2" ] 74 defines += [ "ABILITY_POWER_SUPPORT" ] 75 } 76} 77 78group("unittest") { 79 testonly = true 80 deps = [ ":tel_ril_adapter_gtest" ] 81} 82