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