• 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("//build/test.gni")
15SOURCE_DIR = "../../../"
16
17ohos_unittest("tel_ril_adapter_gtest") {
18  install_enable = true
19  subsystem_name = "telephony"
20  part_name = "ril_adapter"
21  test_module = "tel_ril_adapter_gtest"
22  module_out_path = part_name + "/" + test_module
23
24  sources = [
25    "ril_call_test.cpp",
26    "ril_callback_test.cpp",
27    "ril_data_test.cpp",
28    "ril_modem_test.cpp",
29    "ril_network_test.cpp",
30    "ril_sim_test.cpp",
31    "ril_sms_test.cpp",
32    "ril_test_util.cpp",
33    "zero_branch_test.cpp",
34  ]
35
36  include_dirs = [
37    "include",
38    "$SOURCE_DIR/services/hril/include",
39    "$SOURCE_DIR/services/hril_hdf/include",
40  ]
41  deps = [
42    "$SOURCE_DIR/services/hril:hril",
43    "$SOURCE_DIR/services/hril_hdf:hril_hdf",
44  ]
45  defines = [
46    "TELEPHONY_LOG_TAG = \"RilAdapterGtest\"",
47    "LOG_DOMAIN = 0xD000F00",
48  ]
49
50  # defines += [ "TEL_TEST_PIN_PUK" ]
51  configs = [ "$SOURCE_DIR/utils:utils_config" ]
52  if (is_standard_system) {
53    external_deps = [
54      "c_utils:utils",
55      "drivers_interface_power:libpower_proxy_1.1",
56      "drivers_interface_ril:libril_proxy_1.1",
57      "hdf_core:libhdf_utils",
58      "hilog:libhilog",
59      "init:libbegetutil",
60      "ipc:ipc_single",
61    ]
62  } else {
63    external_deps = [ "hilog:libhilog" ]
64  }
65  external_deps += [ "ipc:ipc_single" ]
66}
67
68group("unittest") {
69  testonly = true
70  deps = [ ":tel_ril_adapter_gtest" ]
71}
72