• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 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("sim_gtest") {
18  install_enable = true
19  subsystem_name = "telephony"
20  part_name = "core_service"
21  test_module = "sim_gtest"
22  module_out_path = part_name + "/" + test_module
23
24  sources = [
25    "csim_file_controller_gtest.cpp",
26    "isim_file_gtest.cpp",
27    "multi_sim_controller_gtest.cpp",
28    "operator_config_loader_gtest.cpp",
29    "operator_matching_rule_test.cpp",
30    "pdp_profile_rdb_helper_test.cpp",
31    "ruim_file_gtest.cpp",
32    "sim_file_gtest.cpp",
33    "sim_manager_gtest.cpp",
34    "sim_sms_controller_gtest.cpp",
35    "sim_utils_gtest.cpp",
36    "stk_controller_gtest.cpp",
37    "usim_dialling_numbers_service_gtest.cpp",
38  ]
39
40  include_dirs = [
41    "$SOURCE_DIR/services/core/include",
42    "$SOURCE_DIR/utils/log/include",
43    "$SOURCE_DIR/utils/preferences/include",
44    "$SOURCE_DIR/services/sim/include",
45    "$SOURCE_DIR/services/network_search/include",
46    "$SOURCE_DIR/services/tel_ril/include",
47    "$SOURCE_DIR/services/telephony_ext_wrapper/include",
48    "$SOURCE_DIR/test/mock",
49  ]
50
51  configs = [ "$SOURCE_DIR/utils:telephony_log_config" ]
52
53  deps = [
54    "$SOURCE_DIR:tel_core_service",
55    "$SOURCE_DIR/interfaces/innerkits:tel_core_service_api",
56    "$SOURCE_DIR/utils:libtel_common",
57  ]
58
59  external_deps = [
60    "ability_base:want",
61    "ability_base:zuri",
62    "ability_runtime:ability_manager",
63    "ability_runtime:data_ability_helper",
64    "ability_runtime:wantagent_innerkits",
65    "access_token:libaccesstoken_sdk",
66    "access_token:libnativetoken",
67    "access_token:libtoken_setproc",
68    "cJSON:cjson",
69    "c_utils:utils",
70    "common_event_service:cesfwk_innerkits",
71    "config_policy:configpolicy_util",
72    "core_service:libtel_vcard",
73    "data_share:datashare_common",
74    "data_share:datashare_consumer",
75    "drivers_interface_ril:ril_idl_headers",
76    "eventhandler:libeventhandler",
77    "ffrt:libffrt",
78    "googletest:gmock_main",
79    "googletest:gtest_main",
80    "hdf_core:libhdi",
81    "hilog:libhilog",
82    "init:libbegetutil",
83    "ipc:ipc_single",
84    "netmanager_base:net_conn_manager_if",
85    "netmanager_ext:net_tether_manager_if",
86    "power_manager:powermgr_client",
87    "safwk:system_ability_fwk",
88    "samgr:samgr_proxy",
89  ]
90  defines = [
91    "TELEPHONY_LOG_TAG = \"CoreServiceGtest\"",
92    "LOG_DOMAIN = 0xD000F00",
93  ]
94
95  if (defined(global_parts_info) &&
96      defined(global_parts_info.location_location) &&
97      global_parts_info.location_location) {
98    external_deps += [
99      "location:lbsservice_common",
100      "location:locator_sdk",
101    ]
102    defines += [ "ABILITY_LOCATION_SUPPORT" ]
103  }
104
105  cflags = [
106    "-flto",
107    "-fvisibility=hidden",
108  ]
109
110  ldflags = [ "-flto" ]
111}
112
113group("unittest") {
114  testonly = true
115  deps = [ ":sim_gtest" ]
116}
117