1# Copyright (C) 2021 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. 13import("//base/telephony/core_service/telephony.gni") 14import("//build/test.gni") 15SOURCE_DIR = "//base/telephony/cellular_data" 16ability_runtime_path = "//foundation/ability/ability_runtime" 17ability_runtime_inner_api_path = 18 "//foundation/ability/ability_runtime/interfaces/inner_api" 19 20ohos_unittest("tel_cellular_data_test") { 21 subsystem_name = "telephony" 22 part_name = "cellular_data" 23 test_module = "tel_cellular_data_test" 24 module_out_path = part_name + "/" + test_module 25 26 sources = [ 27 "$SOURCE_DIR/frameworks/native/cellular_data_service_proxy.cpp", 28 "$SOURCE_DIR/test/cellular_data_test.cpp", 29 "$SOURCE_DIR/test/zero_branch_test.cpp", 30 ] 31 32 include_dirs = [ 33 "$SOURCE_DIR/services/include", 34 "$SOURCE_DIR/services/include/common", 35 "$SOURCE_DIR/services/include/state_machine", 36 "$SOURCE_DIR/services/include/utils", 37 "$SOURCE_DIR/services/include/apn_manager", 38 "$SOURCE_DIR/interfaces/innerkits", 39 "$SOURCE_DIR/frameworks/native", 40 "${ability_runtime_inner_api_path}/dataobs_manager/include", 41 "//base/telephony/data_storage/pdp_profile/include", 42 ] 43 configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] 44 deps = [ 45 "${ability_runtime_inner_api_path}/dataobs_manager:dataobs_manager", 46 "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", 47 "${ability_runtime_path}/frameworks/native/ability/native:data_ability_helper", 48 "//base/telephony/cellular_data:tel_cellular_data", 49 "//base/telephony/core_service/utils:libtel_common", 50 ] 51 external_deps = [ 52 "ability_base:want", 53 "access_token:libaccesstoken_sdk", 54 "access_token:libnativetoken", 55 "access_token:libtoken_setproc", 56 "c_utils:utils", 57 "cellular_data:tel_cellular_data_api", 58 "common_event_service:cesfwk_innerkits", 59 "core_service:tel_core_service_api", 60 "eventhandler:libeventhandler", 61 "init:libbegetutil", 62 "ipc:ipc_core", 63 "netmanager_base:net_conn_manager_if", 64 "netmanager_base:net_policy_manager_if", 65 "netmanager_base:net_stats_manager_if", 66 "relational_store:native_dataability", 67 "relational_store:native_rdb", 68 "safwk:system_ability_fwk", 69 "samgr:samgr_proxy", 70 ] 71 defines += [ 72 "TELEPHONY_LOG_TAG = \"CelllularDataTest\"", 73 "LOG_DOMAIN = 0xD000F00", 74 ] 75 if (is_standard_system) { 76 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 77 } else { 78 external_deps += [ "hilog:libhilog" ] 79 } 80 81 part_name = "cellular_data" 82 subsystem_name = "telephony" 83} 84 85group("unittest") { 86 testonly = true 87 deps = [ ":tel_cellular_data_test" ] 88} 89