• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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("//base/telephony/core_service/telephony.gni")
15import("//build/test.gni")
16ohos_unittest("tel_sms_mms_gtest") {
17  subsystem_name = "telephony"
18  part_name = "sms_mms"
19  test_module = "tel_sms_mms_gtest"
20  module_out_path = part_name + "/" + test_module
21
22  sources = [
23    "//base/telephony/sms_mms/frameworks/native/sms/src/sms_service_proxy.cpp",
24    "sms_delivery_callback_gtest.cpp",
25    "sms_mms_gtest.cpp",
26    "sms_mms_test_helper.cpp",
27    "sms_send_callback_gtest.cpp",
28    "zero_branch_test.cpp",
29  ]
30
31  include_dirs = [
32    "//base/telephony/sms_mms/services/include",
33    "//base/telephony/sms_mms/interfaces/innerkits",
34    "//base/telephony/sms_mms/interfaces/kits/native",
35    "//base/telephony/call_manager/services/telephony_interaction/include",
36    "//base/telephony/sms_mms/frameworks/native/sms/include",
37    "//base/telephony/sms_mms/utils",
38    "//third_party/curl/include",
39  ]
40
41  configs = [ "//base/telephony/core_service/utils:telephony_log_config" ]
42
43  deps = [
44    "//base/telephony/core_service/utils:libtel_common",
45    "//base/telephony/sms_mms:tel_sms_mms",
46    "//base/telephony/sms_mms/frameworks/native:tel_sms_mms_api",
47    "//foundation/ability/ability_runtime/frameworks/native/ability/native:data_ability_helper",
48    "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager:ability_manager",
49    "//third_party/curl:curl",
50    "//third_party/googletest:gtest_main",
51  ]
52
53  external_deps = [
54    "access_token:libaccesstoken_sdk",
55    "access_token:libnativetoken",
56    "access_token:libtoken_setproc",
57    "c_utils:utils",
58    "common_event_service:cesfwk_innerkits",
59    "core_service:tel_core_service_api",
60    "eventhandler:libeventhandler",
61    "init:libbegetutil",
62    "ipc:ipc_core",
63    "netmanager_base:net_conn_manager_if",
64    "relational_store:native_dataability",
65    "relational_store:native_rdb",
66    "safwk:system_ability_fwk",
67    "samgr:samgr_proxy",
68  ]
69  defines += [
70    "TELEPHONY_LOG_TAG = \"SmsMmmsGtest\"",
71    "LOG_DOMAIN = 0xD000F00",
72  ]
73  if (is_standard_system) {
74    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
75  } else {
76    external_deps += [ "hilog:libhilog" ]
77  }
78}
79
80group("unittest") {
81  testonly = true
82  deps = [ ":tel_sms_mms_gtest" ]
83}
84