# 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("//base/telephony/core_service/telephony.gni") import("//build/test.gni") SOURCE_DIR = "//base/telephony/cellular_data" ability_runtime_path = "//foundation/ability/ability_runtime" ability_runtime_inner_api_path = "//foundation/ability/ability_runtime/interfaces/inner_api" ohos_unittest("tel_cellular_data_test") { subsystem_name = "telephony" part_name = "cellular_data" test_module = "tel_cellular_data_test" module_out_path = part_name + "/" + test_module sources = [ "$SOURCE_DIR/frameworks/native/cellular_data_service_proxy.cpp", "$SOURCE_DIR/test/cellular_data_test.cpp", "$SOURCE_DIR/test/zero_branch_test.cpp", ] include_dirs = [ "$SOURCE_DIR/services/include", "$SOURCE_DIR/services/include/common", "$SOURCE_DIR/services/include/state_machine", "$SOURCE_DIR/services/include/utils", "$SOURCE_DIR/services/include/apn_manager", "$SOURCE_DIR/interfaces/innerkits", "$SOURCE_DIR/frameworks/native", "${ability_runtime_inner_api_path}/dataobs_manager/include", "//base/telephony/data_storage/pdp_profile/include", ] configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] deps = [ "${ability_runtime_inner_api_path}/dataobs_manager:dataobs_manager", "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", "${ability_runtime_path}/frameworks/native/ability/native:data_ability_helper", "//base/telephony/cellular_data:tel_cellular_data", "//base/telephony/core_service/utils:libtel_common", ] external_deps = [ "ability_base:want", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "cellular_data:tel_cellular_data_api", "common_event_service:cesfwk_innerkits", "core_service:tel_core_service_api", "eventhandler:libeventhandler", "init:libbegetutil", "ipc:ipc_core", "netmanager_base:net_conn_manager_if", "netmanager_base:net_policy_manager_if", "netmanager_base:net_stats_manager_if", "relational_store:native_dataability", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines += [ "TELEPHONY_LOG_TAG = \"CelllularDataTest\"", "LOG_DOMAIN = 0xD000F00", ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { external_deps += [ "hilog:libhilog" ] } part_name = "cellular_data" subsystem_name = "telephony" } group("unittest") { testonly = true deps = [ ":tel_cellular_data_test" ] }