1# Copyright (c) 2021-2022 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_telephony_data_gtest") { 18 part_name = "telephony_data" 19 subsystem_name = "telephony" 20 test_module = "telephony_data" 21 test_suite = "tel_telephony_data_gtest" 22 module_out_path = part_name + "/" + test_module + "/" + test_suite 23 24 sources = [ "$SOURCE_DIR/test/unittest/data_gtest/data_storage_gtest.cpp" ] 25 26 include_dirs = [ 27 "$SOURCE_DIR/common/include", 28 "$SOURCE_DIR/interfaces/innerkits/include", 29 "$SOURCE_DIR/opkey/include", 30 "$SOURCE_DIR/pdp_profile/include", 31 "$SOURCE_DIR/sim/include", 32 "$SOURCE_DIR/sms_mms/include", 33 "$SOURCE_DIR/global_params/include", 34 "$SOURCE_DIR/opkey_version/include", 35 ] 36 defines = [ 37 "TELEPHONY_LOG_TAG = \"TelephonyDataGtest\"", 38 "LOG_DOMAIN = 0xD000F00", 39 ] 40 41 external_deps = [ 42 "ability_base:want", 43 "ability_base:zuri", 44 "ability_runtime:ability_manager", 45 "ability_runtime:abilitykit_native", 46 "access_token:libaccesstoken_sdk", 47 "access_token:libnativetoken_shared", 48 "access_token:libtoken_setproc", 49 "c_utils:utils", 50 "common_event_service:cesfwk_innerkits", 51 "data_share:datashare_common", 52 "data_share:datashare_consumer", 53 "data_share:datashare_provider", 54 "eventhandler:libeventhandler", 55 "hilog:libhilog", 56 "init:libbegetutil", 57 "ipc:ipc_single", 58 "relational_store:native_appdatafwk", 59 "relational_store:native_rdb", 60 "relational_store:rdb_data_share_adapter", 61 "safwk:system_ability_fwk", 62 "samgr:samgr_proxy", 63 ] 64 65 cflags = [ 66 "-flto", 67 "-fsanitize=cfi", 68 "-fsanitize-cfi-cross-dso", 69 "-fvisibility=hidden", 70 ] 71 72 ldflags = [ 73 "-flto", 74 "-fsanitize=cfi", 75 "-fsanitize-cfi-cross-dso", 76 ] 77 78 if (defined(global_parts_info) && 79 defined(global_parts_info.telephony_telephony_enhanced) && 80 global_parts_info.telephony_telephony_enhanced) { 81 print( 82 "telephony_telephony_enhanced = ${global_parts_info.telephony_telephony_enhanced}") 83 defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_EXT" ] 84 } 85} 86 87group("unittest") { 88 testonly = true 89 deps = [ ":tel_telephony_data_gtest" ] 90} 91