• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "$SOURCE_DIR/opkey_version/include",
34  ]
35  defines = [
36    "TELEPHONY_LOG_TAG = \"TelephonyDataGtest\"",
37    "LOG_DOMAIN = 0xD000F00",
38  ]
39
40  external_deps = [
41    "ability_base:want",
42    "ability_base:zuri",
43    "ability_runtime:ability_manager",
44    "ability_runtime:abilitykit_native",
45    "access_token:libaccesstoken_sdk",
46    "access_token:libnativetoken",
47    "access_token:libtoken_setproc",
48    "c_utils:utils",
49    "common_event_service:cesfwk_innerkits",
50    "data_share:datashare_common",
51    "data_share:datashare_consumer",
52    "data_share:datashare_provider",
53    "eventhandler:libeventhandler",
54    "hilog:libhilog",
55    "init:libbegetutil",
56    "ipc:ipc_single",
57    "relational_store:native_appdatafwk",
58    "relational_store:native_rdb",
59    "relational_store:rdb_data_share_adapter",
60    "safwk:system_ability_fwk",
61    "samgr:samgr_proxy",
62  ]
63
64  cflags = [
65    "-flto",
66    "-fsanitize=cfi",
67    "-fsanitize-cfi-cross-dso",
68    "-fvisibility=hidden",
69  ]
70
71  ldflags = [
72    "-flto",
73    "-fsanitize=cfi",
74    "-fsanitize-cfi-cross-dso",
75  ]
76
77  if (defined(global_parts_info) &&
78      defined(global_parts_info.telephony_telephony_enhanced) &&
79      global_parts_info.telephony_telephony_enhanced) {
80    print(
81        "telephony_telephony_enhanced = ${global_parts_info.telephony_telephony_enhanced}")
82    defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_EXT" ]
83  }
84}
85
86group("unittest") {
87  testonly = true
88  deps = [ ":tel_telephony_data_gtest" ]
89}
90